michbeck100 / pimatic-hap

Pimatic homekit bridge
GNU General Public License v2.0
30 stars 10 forks source link

Can't change color #24

Closed Xento closed 8 years ago

Xento commented 8 years ago

I can't change the color via siri.

I get the following error message: error [pimatic]: A uncaught exception occured: TypeError: Cannot read property '0' of undefined at convert.rgb.hex (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/color-convert/conversions.js:574:33) at /usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/color-convert/route.js:60:10 at Object.wrappedFn as hex at null. (/usr/local/pimatic-app/node_modules/pimatic-hap/accessories/ledlight.coffee:93:29) at EventEmitter.emit (events.js:106:17) at Characteristic.setValue (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:151:10) at Bridge. (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:537:22) at Array.forEach (native) at Bridge.Accessory._handleSetCharacteristics (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:486:8) at HAPServer.EventEmitter.emit (events.js:106:17) at HAPServer._handleCharacteristics (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:696:10) at HAPServer. (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:178:39) at IncomingMessage.EventEmitter.emit (events.js:92:17) at _stream_readable.js:920:16 at process._tickCallback (node.js:415:13) This is most probably a bug in pimatic or in a module, please report it!

michbeck100 commented 8 years ago

Can you tell what the command was you were using?

Xento commented 8 years ago

For example "set lamp to green". I tried different colors.

Am 31.01.2016 um 19:38 schrieb Michael Kotten notifications@github.com:

Can you tell what the command was you were using?

— Reply to this email directly or view it on GitHub.

michbeck100 commented 8 years ago

@Xento What kind of led light device are you using?

Xento commented 8 years ago

I'm using pimatic-led-light. With my implementation of the saturation it worked.

michbeck100 commented 8 years ago

I mean what kind of device are you using with the pimatic-led-light plugin? Milight, blinkstick etc. BTW: I did a rewrite of the color handling, so i just have a single dependency (color-convert). And i did test it with my hyperion installation at home, which worked flawless.

michbeck100 commented 8 years ago

The issue is probably inside one of the other device implementations, because i have absolutely no problem changing the color using the Hyperion or DummyLedLight device.

michbeck100 commented 8 years ago

And please make sure that you use the most recent version of pimatic-hap. Just delete it from node_modules and restart pimatic.

michbeck100 commented 8 years ago

@Xento Does this issue with the newest plugin version still exist?

Xento commented 8 years ago

It is still there but I noticed, when I change the color once after a restart of pimatic everything works as expected.

michbeck100 commented 8 years ago

Ok, i'll close this issue for now. And will optimize the plugin.