Water Valves Not Updating in HKLS

Posted on
Tue Apr 11, 2023 12:39 pm
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Water Valves Not Updating in HKLS

I have two water valves, a Custos valve controller, and a Zooz valve controller. Both work fine within Indigo, although only the Custos is officially supported (They are identical hardware). In HKLS they work initially, but once the Home app does a refresh, they get permanently stuck in "starting...." and no longer show their state. The status continues to show correctly within Indigo, even after refresh. Thoughts? Thanks.

Posted on
Fri Apr 14, 2023 1:53 pm
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Water Valves Not Updating in HKLS

Hi

Thanks for the GitHub report - at first guess will likely be the state that has been selected.

Here you have selected onOffstate - which should be correct. Are these devices on / off devices in indigo?

I’m travelling back next 24 hours - but will have a deeper look and update GitHub issue soon. Will also check code as HomeKit Valve devices probably haven’t had much usage

Thanks

Glenn

Posted on
Fri Apr 14, 2023 2:05 pm
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Re: Water Valves Not Updating in HKLS

Thanks Glenn. Appreciate the response, safe travels.
Yes, Indigo is representing an "on" or "off" state for these devices.

Posted on
Sun Apr 16, 2023 2:07 am
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Water Valves Not Updating in HKLS

Hi,

I'm back and have gone down a very deep rabbit hole after his - in fact I'm am still in it!

Can see the issue.
Valves are a special test case which need Active to be set, a period of time to pass and InUse then to be set to the same, and then the reverse.
The devices here are On/Off devices and don't follow the same logic.

This is an issue - as there is a race condition with threads/async and timing of one versus another can't be guaranteed. Well particularly the issue is we don’t receive any feedback that the first has been successful, to know when to send the 2nd. Then there is a 2nd issue where deviceUpdate catches the device change and tries again, with these 2 events crashing into each other. This means sometimes updates correctly, sometimes doesn't. Always turns device on correctly though.
Potentially may need separate event handler (but ideally that would be in pyHAP library)

Also seeing some likely unrelated issues, so still at it - although will have a pause and see if solution jumps out

Would suggest meanwhile - delete devices and then re-add them as switches, this more closes follows what they are in Indigo - and will work fine.

Glenn
Last edited by GlennNZ on Sun Apr 16, 2023 3:05 pm, edited 2 times in total.

Posted on
Sun Apr 16, 2023 6:48 am
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Re: Water Valves Not Updating in HKLS

Thanks Glenn. Makes sense! As always, I appreciate your thoughtful analysis.

Posted on
Wed Apr 19, 2023 1:13 am
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Water Valves Not Updating in HKLS

Hi again

Pre-release 0.6.0 better supports all the Valves, Showerhead, Faucet (this ideally shouldn't be used - but appears to work), Irrigation.

There is a delay before the Home App updates for some reason.
Also at times - it never appears to, but when open details screen of accessory - it quickly updates (presumably this will be fixed in Home app versions)

See how you go.

Thjanks
Last edited by GlennNZ on Wed Apr 19, 2023 2:44 pm, edited 1 time in total.

Posted on
Wed Apr 19, 2023 6:13 am
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Re: Water Valves Not Updating in HKLS

Thanks Glenn, valves appear to be updating correctly now.

Posted on
Wed May 31, 2023 5:04 pm
LSpad offline
Posts: 30
Joined: Oct 01, 2018

Re: Water Valves Not Updating in HKLS

Thanks Glen - I see from a previous post that irrigation systems are supported in the plug-in. I’m just wondering which property of a standard indigo sprinkler system I need to set as the attribute shared to HomeKit? Is it the main state?

Many thanks
Luke

Posted on
Thu Jun 01, 2023 2:16 am
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Water Valves Not Updating in HKLS

Hi

(see the Rachio post as well - not a plugin I’m familiar with)

HomekitLink is almost infinitely adjustable, and by that definition also infinitely break-able!

Create new HKLS bridge.
Add something simple to it - a light for a light
Add to Home App via QR code website pop up.
Check and install in Home app and check Light working.

Then come back to Bridge:

& Add - slightly more difficult devices, using show all Options.

For example:
Could add a temperature sensor to HomeKit using the appropriate Rachio state.

Sprinkler or water valve HomeKit type - that may be an issue - because the devices are not onOff type devices. And when enabled HKLS will try to send a onOff command - which I presume will fail?

Can duplicate as a Virtual Device and use this as Valve for OnOff function, or use the masquerade plugin.

Really depends on how much you are trying to add to the Home app …


Sent from my iPad using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest