markbergsma / pimatic-hue-zll

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

Unhandled rejection Error: Missing state object in light status result #19

Closed sebster6 closed 2 years ago

sebster6 commented 6 years ago

I had to setup my Pimatic installation from scratch after a problem (https://forum.pimatic.org/topic/4025/pimatic-hap-error-during-update). I'm using the old configuration file that worked fine before, but now I'm encountering frequent (every 5-10 seconds) Pimatic log entries like these:

Unhandled rejection Error: Missing state object in light status result
    at Error (native)
    at BaseHueLightGroup.BaseHueLight._statusReceived (/home/pi/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:246:45)
    at BaseHueLightGroup._statusReceived (/home/pi/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:350:14)
    at BaseHueLightGroup.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:4:57)
    at /home/pi/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:4:57
    at /home/pi/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:312:11
    at BaseHueLightGroup.allGroupsReceived (/home/pi/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:504:13)
    at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

Any idea what might cause this? Apart from the new Raspberry setup, I added five Osram Smart+ Plugs recently (added to the Hue hub). Not sure if this is connected though.

acefed commented 5 years ago

Similar error for me every minute or so. Fresh Pimatic installation, with an older restored config.json setup (Ubuntu 18.04 LTS, node v8.9.4):

Unhandled rejection Error: Missing state object in light status result
    at BaseHueLightGroup.BaseHueLight._statusReceived (/home/user/bin/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:246:45)
    at BaseHueLightGroup._statusReceived (/home/user/bin/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:350:14)
    at BaseHueLightGroup.<anonymous> (/home/user/bin/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:4:57)
    at /home/user/bin/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:4:57
    at /home/user/bin/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:312:11
    at BaseHueLightGroup.allGroupsReceived (/home/user/bin/pimatic-app/node_modules/pimatic-hue-zll/hue.coffee:504:13)
    at tryCatcher (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/promise.js:694:18)
    at _drainQueueStep (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate.Async.drainQueues (/home/user/bin/pimatic-app/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
sweebee commented 5 years ago

pimatic doesn't work with node v8, use node v4 instead.

acefed commented 5 years ago

Apart from the error above, Pimatic runs fine with node v8 in my case, including the Hue devices. But thanks for pointing me in the right direction @sweebee !