firsttris / homebridge-hyperion-light

:collision: Homebridge plugin to use Hyperion as HomeKit accessory
MIT License
8 stars 2 forks source link

HomeApp always shows Ambilight on when first loading #6

Closed pdemarco925 closed 7 years ago

pdemarco925 commented 7 years ago

Hi,

Great work. I just have one odd problem. When I first load the HomeApp it shows the Ambilight switch as on even though it is off. I can then control it properly. Each time I start the HomeApp it again shows it as on. Are you experiencing this?

firsttris commented 7 years ago

Hey,

problem is the hyperion-api has actually no method to check the ambilight status correctly.

There other open Issue is about the same problem. (but in german)

Here is the corresponding issue on hyperion repo: https://github.com/hyperion-project/hyperion/issues/738#issuecomment-275146910

regards Tristan

pdemarco925 commented 7 years ago

Thanks for the reply and reference. I'll watch the hyperion repo as well and close this.

BTW, I ended up just commenting out the get method so the HomeApp defaults to off when started. The HomeApp then tracks on/off correctly (since it assumes success of a command). Obviously not a solution for it, but will end up being 'correct' more often for my usage.

Thanks Paul

mitch7391 commented 6 years ago

@pdemarco925 how did you go about commenting out the get method?

pdemarco925 commented 6 years ago

Comment out lines 97-99 // }) // .on('get', (callback) => { // this.hyperion.getAmbiState(callback);

mitch7391 commented 6 years ago

@pdemarco925 cheers for that mate :) and which file was it?

pdemarco925 commented 6 years ago

index.js The specific location will depend upon your config, but something like: "/usr/lib/node_modules/homebridge-hyperion-light/index.js" or "/opt/node/lib/..."

mitch7391 commented 6 years ago

Perfect :) I did see that file, this should calm the perfectionist in me haha thanks so much!