…coming to the point: is there kind of “downgrade path” to go back to a working constellation please?!
Thanks again.
DHT22 sensors stopped working after upgrading pimatic to v0.9.40
…coming to the point: is there kind of “downgrade path” to go back to a working constellation please?!
Thanks again.
@Cybolord said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
coming to the point: is there kind of “downgrade path” to go back to a working constellation please?!
If you think pimatic v0.9.40 is causing the problem you can downgrade pimatic as follows:
sudo service pimatic stop
# At this point I recommend to perform a back of config.json and the database file
cd /home/pi/pimatic-app
sudo npm install pimatic@0.9.39 --unsafe-perm
sudo service pimatic start
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
If you think pimatic v0.9.40 is causing the problem you can downgrade pimatic as follows:
sudo service pimatic stop # At this point I recommend to perform a back of config.json and the database file cd /home/pi/pimatic-app sudo npm install pimatic@0.9.39 --unsafe-perm sudo service pimatic start
Thank you very much. does this also downgrade following components?
…please let me ask again:
did you see the log file entries like - is this ‘fixable’ in board.js file:
Unhandled rejection Error: timeout_error at /home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:294:19
Thank you very much. does this also downgrade following components?
bluebird
pimatic-plugin-commons
Yes, it does.
did you see the log file entries like - is this ‘fixable’ in board.js file:
Well, I had a short look into this and I am not sure why the exception bubbles up here, but I have been looking at master which perhaps contains changes since the last release, I think the timeout is raised in the serialport board driver which appears odd to me as you said the 433 Mhz RF comms via Arduino is working fine, right?
Did you update anything else, e.g. at the OS-level?
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in [DHT22 sensors stopped working after upgrading pimatic
Well, I had a short look into this and I am not sure why the exception bubbles up here, but I have been looking at master which perhaps contains changes since the last release, I think the timeout is raised in the serialport board driver which appears odd to me as you said the 433 Mhz RF comms via Arduino is working fine, right?
Did you update anything else, e.g. at the OS-level?
Yes, indeed: all Homeduino 433MHz stuff is working like a charme
and Yes again: two weeks ago I compiled “unbound v1.6.2”, installed also some dependencies for that on my Pi 1 - rebooted several times and all pimatic related stuff seems to works without any issues… then a couple of days ago I decided to update pimatic to v0.9.40… restarted pimatic service/ later rebooted the Pi and straight ahead DHT22 communication was gone…
@mwittig said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
followed your guide…
sudo service pimatic stop # At this point I recommend to perform a back of config.json and the database file cd /home/pi/pimatic-app sudo npm install pimatic@0.9.39 --unsafe-perm sudo service pimatic start
pimatic@0.9.39 node_modules/pimatic
├── basic-auth@1.1.0
├── cookie-parser@1.4.3 (cookie-signature@1.0.6, cookie@0.3.1)
├── cookie-session@1.2.0 (on-headers@1.0.1, debug@2.2.0, cookies@0.5.0)
├── connect-timeout@1.9.0 (ms@2.0.0, on-headers@1.0.1, on-finished@2.3.0, http-errors@1.6.1)
├── method-override@2.3.9 (methods@1.1.2, parseurl@1.3.1, vary@1.1.1, debug@2.6.8)
├── cross-spawn@5.1.0 (shebang-command@1.2.0, lru-cache@4.1.1, which@1.2.14)
├── body-parser@1.17.2 (content-type@1.0.2, bytes@2.4.0, depd@1.1.0, on-finished@2.3.0, qs@6.4.0, http-errors@1.6.1, raw-body@2.2.0, debug@2.6.7, iconv-lite@0.4.15, type-is@1.6.15)
├── logrotate-stream@0.2.5 (byt@0.1.0, log-rotate@0.2.7, optimist@0.6.1)
├── socket.io@1.7.4 (object-assign@4.1.0, socket.io-adapter@0.5.0, has-binary@0.1.7, debug@2.3.3, socket.io-parser@2.3.1, engine.io@1.8.4, socket.io-client@1.7.4)
├── jsonlint@1.6.2 (nomnom@1.8.1, JSV@4.0.2)
└── request-promise@2.0.1 (bluebird@2.11.0, request@2.81.0, lodash@4.17.4)
starting v0.9.39...
``09:49:41.656 2017-07-07 Friday
coffee-cache: compiling coffee-script file "lib/api.coffee"...Done
coffee-cache: compiling coffee-script file "lib/users.coffee"...Done
coffee-cache: compiling coffee-script file "lib/devices.coffee"...Done
coffee-cache: compiling coffee-script file "lib/matcher.coffee"...Done
coffee-cache: compiling coffee-script file "lib/milliseconds.coffee"...Done
coffee-cache: compiling coffee-script file "lib/variables.coffee"...Done
coffee-cache: compiling coffee-script file "lib/variables-ast-builder.coffee"...Done
coffee-cache: compiling coffee-script file "lib/actions.coffee"...Done
coffee-cache: compiling coffee-script file "lib/predicates.coffee"...Done
coffee-cache: compiling coffee-script file "lib/rules.coffee"...Done
coffee-cache: compiling coffee-script file "lib/rules-ast-builder.coffee"...Done
coffee-cache: compiling coffee-script file "lib/plugins.coffee"...Done
coffee-cache: compiling coffee-script file "lib/database.coffee"...Done
coffee-cache: compiling coffee-script file "lib/groups.coffee"...Done
coffee-cache: compiling coffee-script file "lib/pages.coffee"...Done
coffee-cache: compiling coffee-script file "lib/framework.coffee"...Done
09:52:44.333 [pimatic] info: Starting pimatic version 0.9.39
coffee-cache: compiling coffee-script file "config-schema.coffee"...Done
...and same errors :(
at processImmediate [as _immediateCallback] (timers.js:383:17)
09:58:13.683 [pimatic-homeduino, HomeduinoDHTSensor] error: Error getting attribute value dht23.temperature: timeout_error
09:58:13.716 [pimatic-homeduino, HomeduinoDHTSensor] error: Error getting attribute value dht23.humidity: timeout_error
09:58:13.728 [pimatic] warn: Could not update variable dht23.temperature: timeout_error
09:58:13.739 [pimatic] warn: Could not update variable dht23.humidity: timeout_error
Unhandled rejection Error: timeout_error
at /home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:294:19
at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
Unhandled rejection Error: timeout_error
at /home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:294:19
at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
Unhandled rejection timeout
@Cybolord That’s what I expected, basically. The error does not appear to be related to pimatic v0.9.40 upgrade.
May be it is hardware problem. Do you have a spare DHT sensor to test with? Another which can be done is to connect the Arduino to a serial console to check whether or not the messages contain the DHT message probes.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
May be it is hardware problem. Do you have a spare DHT sensor to test with?
thank you again… I’ve two more to change existing and do some tests but actually both of them stopped working at the same time… this is strange, isn’t it?!
so what about the …/homeduino plugin path - I’ve got a file system backup - does it make sense to restore to this point only?
I am sorry - no idea how to do this:
Another which can be done is to connect the Arduino to a serial console to check whether or not the messages contain the DHT message probes.
meanwhile checked position 294:19 in board.js - what is this function exactly for please:
Board.prototype._waitForAcknowledge = function() {
return this._onAcknowledge().then((function(_this) {
return function(_arg) {
var args, cmd;
cmd = _arg.cmd, args = _arg.args;
switch (cmd) {
case 'ERR':
FAIL --> throw new Error(args[0]);
break;
case 'ACK':
switch (args.length) {
case 0:
break;
case 1:
return args[0];
default:
return args;
}
break;
default:
return assert(false);
}
};
})(this));
};
@Cybolord said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
what is this function exactly for please
This function analyses the repsonse messages sent by Arduino (ACK and ERR messages, basically). The error is thrown as the message “ERR timeout_error\r\n” has been received from Arduino (this can traced from the stack trace posted earlier). The message is sent at https://github.com/pimatic/homeduino/blob/master/dht_command.h#L39-L41 if the DHT read command has timed out. Please double-check your homeduino device configuration, i.e. make sure the pin assignments match up with actual wiring. Check contacts between DHT sensors and the Arduino board.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
@Cybolord said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
what is this function exactly for please
This function analyses the repsonse messages sent by Arduino (ACK and ERR messages, basically). The error is thrown as the message “ERR timeout_error\r\n” has been received from Arduino (this can traced from the stack trace posted earlier). The message is sent at https://github.com/pimatic/homeduino/blob/master/dht_command.h#L39-L41 if the DHT read command has timed out. Please double-check your homeduino device configuration, i.e. make sure the pin assignments match up with actual wiring. Check contacts between DHT sensors and the Arduino board.
thank you for the explanation!
conclusion and next steps:
… otherwise I’ll have to unsolder the Arduino Nano cause its on a circuit board in a wall mounted electric cabinet… will take a while
Homeduino was updatet at my system at the same time as pimatic.
And when I understand it right your DHTs are wired with the arduino with the homeduino sketch.
Maybee there is a problem with the new homeduino version!?
My DHTs are wired direktly with the PI and works fine after the update to V0.9.40.
@V1per said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
Homeduino was updatet at my system at the same time as pimatic.
Do you recap about which updates had been installed, specifically?
Considering that a timeout occurs when reading the DHT sensors on the Arduino, I think, it is more likely a software issue with the Arduino sketch if it is a software issue at all. @Cybolord did you change/update sketch on the Arduino recently, e.g. did you install the experimental sketch @TheOtherMarcus posted recently - https://forum.pimatic.org/topic/3065/homeduino-doesn-t-detect-first-single-transfer
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in DHT22 sensors stopped working after upgrading pimatic to v0.9.40:
@Cybolord did you change/update sketch on the Arduino recently, e.g. did you install the experimental sketch
nope - it is running for round about 10-14 month with that sketch - but I have to say it again: nothing touched at all - no wiring with DHTs, no other sketch for Arduino Nano, no changes to OS (Raspbian Jessie on Pi1)… BUT: installed “unbound DNSSEC” and a few weeks later upgraded to pimatic v.0.9.40 and the DHTs are gone… I have no ideas left
so: do you recommend to upload and use a ‘more stable’ sketch to Arduino?!
once again re-building the sketch… same DHT behavior as described before but 433MHz stuff working fine
Arduino.mk Configuration:
- [AUTODETECTED] CURRENT_OS = LINUX
- [USER] ARDMK_DIR = /home/pi/pimatic-app/homeduino/arduino-mk
- [AUTODETECTED] ARDUINO_DIR = /usr/share/arduino
- [AUTODETECTED] ARDUINO_VERSION = 105
- [DEFAULT] ARCHITECTURE =
- [DEFAULT] VENDOR = arduino
- [DEFAULT] ARDUINO_SKETCHBOOK = /root/sketchbook
- [BUNDLED] AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
- [COMPUTED] ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
- [DEFAULT] ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino//cores/arduino
- [COMPUTED] ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino//variants (from ARDUINO_DIR)
- [COMPUTED] BOARDS_TXT = /usr/share/arduino/hardware/arduino//boards.txt (from ARDUINO_DIR)
- [USER] USER_LIB_PATH = /home/pi/pimatic-app/homeduino/libraries
- [DEFAULT] PRE_BUILD_HOOK = pre-build-hook.sh
- [USER] BOARD_TAG = nano328
- [COMPUTED] OBJDIR = build-nano328 (from BOARD_TAG)
- [DETECTED] MONITOR_BAUDRATE = 115200 (in sketch)
- [DEFAULT] OPTIMIZATION_LEVEL = s
- [DEFAULT] MCU_FLAG_NAME = mmcu
- [DEFAULT] CFLAGS_STD =
- [DEFAULT] CXXFLAGS_STD =
- [COMPUTED] DEVICE_PATH = /dev/ttyUSB0 (from MONITOR_PORT)
- [AUTODETECTED] Size utility: AVR-aware for enhanced output
-
- ARDUINO_LIBS =
- [USER] SerialCommand
- [USER] RFControl
- [USER] Keypad
- [USER] DHTlib
- [USER] Keypad/utility
- [COMPUTED] BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino//bootloaders (from ARDUINO_DIR)
- [COMPUTED] ARDMK_VERSION = 1.3.4
- [COMPUTED] CC_VERSION = 4.8.1 (avr-gcc)
-------------------------
Device: atmega328p
Program: 11816 bytes (36.1% Full)
(.text + .data + .bootloader)
Data: 1545 bytes (75.4% Full)
(.data + .bss + .noinit)
make reset
make[1]: Entering directory '/home/pi/pimatic-app/homeduino'
/home/pi/pimatic-app/homeduino/arduino-mk/bin/ard-reset-arduino /dev/ttyUSB0
make[1]: Leaving directory '/home/pi/pimatic-app/homeduino'
make do_upload
make[1]: Entering directory '/home/pi/pimatic-app/homeduino'
/usr/share/arduino/hardware/tools/avr/../avrdude -q -V -D -p atmega328p -C /usr/share/arduino/hardware/tools/avr/../avrdude.conf -c arduino -b 57600 -P /dev/ttyUSB0 \
-U flash:w:build-nano328/homeduino.hex:i
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e950f
avrdude: reading input file "build-nano328/homeduino.hex"
avrdude: writing flash (11816 bytes):
avrdude: 11816 bytes of flash written
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.
---- Apologies For The Confusion ----
both (!) DHT22 died at the same time indeed - unbelievable IMO and no idea why
…the new DHT22 type is working flawlessly for 96 hours now!
Thank you very much for your support!!
Kind Regards,
Paule