luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

Event polling #4

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi!

I'm trying to use homebridge to bridge between an iKettle (and Smarter Coffee) using https://github.com/Tristan79/iBrew (my own code), I currently use your cmdSwitch2 (as recommended by another ibrew user), but there is a little situation.

I can get the kettle on/off and I can get status of the device... but the status only changed sometimes, but it does reflect the proper status when I leave the home app and open it again (I see the home app update the status).

Is there a way to push status changed to homebridge that it reflects the change? Or an example for polling it such that the status in the home app reflects the actual status? Or any hints how to do this?Is it possible to add event polling

Already asked on the homebridge issues and it is possible, so my question can you add this to cmdSwitch2?

https://github.com/snowdd1/homebridge-knx/blob/plugin-2.0/lib/knxaccess.js#L278 https://github.com/nfarina/homebridge/issues/894#issuecomment-258540199

luisiam commented 7 years ago

My plugin won't support polling. I believe you can use curl forcing homebridge to update the status when you run homebridge in insecure mode

luisiam commented 7 years ago

Please checkout the latest version

ghost commented 7 years ago

Real cool! Checking it out...

JohanLeirnes commented 7 years ago

Sweet! Thank you @luisiam!