Water Valves Not Updating in HKLS

A plugin to integration Indigo devices into HomeKit (and Siri)
7rdr7
Posts: 200
Joined: Wed Aug 16, 2017 7:06 pm
Location: Gulfport, FL

Water Valves Not Updating in HKLS

Post by 7rdr7 »

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.
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Water Valves Not Updating in HKLS

Post by GlennNZ »

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
7rdr7
Posts: 200
Joined: Wed Aug 16, 2017 7:06 pm
Location: Gulfport, FL

Re: Water Valves Not Updating in HKLS

Post by 7rdr7 »

Thanks Glenn. Appreciate the response, safe travels.
Yes, Indigo is representing an "on" or "off" state for these devices.
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Water Valves Not Updating in HKLS

Post by GlennNZ »

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.
7rdr7
Posts: 200
Joined: Wed Aug 16, 2017 7:06 pm
Location: Gulfport, FL

Re: Water Valves Not Updating in HKLS

Post by 7rdr7 »

Thanks Glenn. Makes sense! As always, I appreciate your thoughtful analysis.
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Water Valves Not Updating in HKLS

Post by GlennNZ »

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.
7rdr7
Posts: 200
Joined: Wed Aug 16, 2017 7:06 pm
Location: Gulfport, FL

Re: Water Valves Not Updating in HKLS

Post by 7rdr7 »

Thanks Glenn, valves appear to be updating correctly now.
LSpad
Posts: 32
Joined: Mon Oct 01, 2018 5:40 am

Re: Water Valves Not Updating in HKLS

Post by LSpad »

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
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Water Valves Not Updating in HKLS

Post by GlennNZ »

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
Post Reply

Return to “HomeKitLink Siri”