ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
898 stars 91 forks source link

OSRAM Smart Plug as valve only max. opening time of 1h #990

Closed Ikissubetter closed 3 years ago

Ikissubetter commented 3 years ago

Hi,

I found some threads, where it is described, how to set up an OSRAM smart plug as a valve via resourcelink:

https://github.com/ebaauw/homebridge-hue/issues/410 https://github.com/ebaauw/homebridge-hue/issues/882

I managed to do so and I can see the plug as valve in Homekit. I can´t use it for automation in Home-app though, but therefore I can use the Eve app.

What was strange at the first glance, that when you trigger the valve aka smart plug via Home-app, it always comes with a standard ON-timer, which is very low (dont, know exactly, but something like 5min, 10min or 15min - 3 choices). In the Eve app there are plenty of settings, but only a maximum time of 1h can be set (others will not be saved) and if you do so, this time-choice also appears in the Home app. Even when I use a automation in Eve. like a Timer and set a scene for ValveOn and ValveOff and set the time for these two scenes to e.g. 6:00 for ON and 9:00 for OFF the valve only runs for 1h, not 3h.

My issue is:

1.) Why can´t the valve be used in Home automation? 2.) Why can´t I turn on the valve for longer than 1h?

I probably would undo the valve setting and set it to a plug, because then everything should work, but I guess that this is not the way it was meant to be? I want to trigger a pool pump by the way and it should run 3 times a day for 2-3 hours.

Thanks.

Regards, Marc

ebaauw commented 3 years ago
  1. Because Apple's Home app sucks doesn't support all of HomeKit.
  2. I'm using the standard SetDuration characteristic as defined by HAP-NodeKS (from the HomeKit runtime), without any modification. It appears to have a maximum allowed value of 3600. Somehow Home only displays 5 min, 10 min, and 1 hr as possible values; Eve displays a lot more, but setting it to a value outside the allowed range (i.e. more than 1 hr) rightfully results in an error. If I set 30 min in Eve, Home seems to honour it. I'll see if I HomeKit honours an alternate maxValue property.

Note that SetDuration is not preserved over Homebridge restarts. So best set both SetDuration and Active from your automation (and pray the order is deterministic) or have a special automation on Homebridge restart to set SetDuration.

ebaauw commented 3 years ago

Seems to work, but had to change the maxValue for Remaining Duration as well.

Ikissubetter commented 3 years ago

Hello, thanks for the investigation. Although I changed it back to a plug, so the automation is much easier to do so for the pool valve. Nevertheless I think it’s good for other „valve-user“.

Nice support. Appreciate it. Keep up the good work.

Regards.

ebaauw commented 3 years ago

In v0.13.13.