markbergsma / pimatic-hue-zll

Pimatic integration with Philips Hue (ZLL)
GNU General Public License v2.0
7 stars 4 forks source link

Errors after short connection loss #10

Closed thexperiments closed 8 years ago

thexperiments commented 8 years ago

Looks like the plugin has problems if the network connection gets corrupted. (simulate by shortly unplugging network cable in raspberry or shielding wifi adapter.)

00:27:14.695 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:19.783 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:24.859 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:29.930 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:35.026 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:40.111 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:45.190 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:50.240 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:27:55.406 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:00.487 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:05.573 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:10.640 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:15.698 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:20.768 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:25.836 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:30.914 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:35.984 [pimatic-hue-zll] error: @lightStatusResult?.state?
00:28:40.848 [pimatic] error: Cannot set property 'on' of undefined

Ther is an error every five seconds. Last line is when I try to switch one of my three lights. The other two are still working fine most of the time (I think I remember that I also had occasionally all of them failing after outage)

markbergsma commented 8 years ago

Yes, I noticed this too recently. I'll debug this soon.

markbergsma commented 8 years ago

This might be fixed in commit 82da9777, but unfortunately I can't test at the moment for maybe a couple of days. If someone is able to test this, please let me know. :)

markbergsma commented 8 years ago

This appears to be fixed in version 0.2.1 which I just published to npm. If you still see it occur, please reopen this issue.