Hexagon / node-telldus

Node bindings for telldus-core
Other
34 stars 10 forks source link

(Not a bug) listeners never reports first "Device ON" after "Device OFF" #75

Closed polarlightning closed 7 years ago

polarlightning commented 7 years ago

Both 'addRawDeviceEventListener' and 'addDeviceEventListener' callback functions fail to see the first change to ON, after OFF. The second ON (repeated ON signal) is seen.

Test setup: I use NEXA remote controller (separate apparatus) to turn on and turn off a lamp (actually NEXA wall socket), which is device number 1 ('codeswitch' type of device). When I use the remote controller to turn OFF the lamp, I can always see "Device 1 is now OFF" (using the node-telldus -provided code example). But when I next turn ON the lamp, it neither of listener callback is called. If I press one more time the ON 1 in the remote controller, then that second time is reported. This is of course wrong. Each change should be reported.

I have telldus-core 2.1.2 (compiled in target) and node-telldus of this date (just downloaded and installed). My node-version is 4.4.4 (may 2016) and it is compiled in place in target in Solidrun's Cubox i4-Pro (iMX6,2GB RAM, 32GB SD).

Edit: This now seems more of a problem in telldus-core itself, since when I checked whether changes occur in /var/state/telldus-core.conf, there didn't happen any state change in the problem case. This is probably also why node-telldus isn't picking up the change either. I actually have temporarily two similar systems (Cubox, Tellstick duo[USB]) and the older one with telldus-core 2.1.0 is generating state file changes meanwhile the newer system with telldus-core 2.1.2 isn't ( in the problem case i.e. first ON following OFF).

And final edit: This seems to be FALSE positive. The same nodejs script that I used in original environment and didn't always work, worked in the reference environment, where also the state-file changes with each actual change. I will try to close this issue.

polarlightning commented 7 years ago

Closing as a false positive. This is environment related somehow, either CuBox version, their Linux/Debian versions (etc sw/fw) or the Telldus Duo USB-stick (Receive/Transmit capability) version/individual device related

Hexagon commented 7 years ago

Excellent work pinpointing the issue :+1: