Eve Aqua Water valve

I will try and give this a shot but can’t make any promises at this point! I’ve never run the dev install of HA so I could be opening up a can of worms. Will let you know if I’m successful.

1 Like

I’m also interested in using the eve aqua in home assistant. Can you tell me if it works for you? 0.108 is out, so no need to test it in dev anymore. I haven’t bought the eve yet, hoping you can confirm if it works.

I am also interested.

@Jc2k Quick update - the Eve Aqua valve is detected, but so far I have not been able to get the switch to work. I can confirm that I can control the device from HomeKit, but HomeAssistant isn’t able to. Other HomeKit devices (Rachio) are working OK from HomeAssistant.

Logger: homeassistant.core
Source: components/homekit_controller/connection.py:342
First occurred: 9:48:43 AM (2 occurrences)
Last logged: 9:51:03 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohomekit/controller/ip/pairing.py", line 90, in _ensure_connected
    await asyncio.wait_for(self.connection.ensure_connection(), 10)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1255, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 412, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 600, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 443, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/switch.py", line 66, in async_turn_on
    await self.async_put_characteristics({CharacteristicsTypes.ACTIVE: True})
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/__init__.py", line 98, in async_put_characteristics
    return await self._accessory.put_characteristics(payload)
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 342, in put_characteristics
    results = await self.pairing.put_characteristics(characteristics)
  File "/usr/local/lib/python3.7/site-packages/aiohomekit/controller/ip/pairing.py", line 246, in put_characteristics
    await self._ensure_connected()
  File "/usr/local/lib/python3.7/site-packages/aiohomekit/controller/ip/pairing.py", line 93, in _ensure_connected
    "Timeout while waiting for connection to device"
aiohomekit.exceptions.AccessoryDisconnectedError: Timeout while waiting for connection to device

Cheers @billclerico

So to be clear, you paired your Eve Aqua to the Eve Extend, then unpaired Eve Extend from iOS and paired it with HA. This worked enough for pairing to complete and a valve to show up in your HA environment.

And the pairing itself worked - because it’s only able to know to create a Valve entity if its retrieved the entity map over a secure paired connection.

All of that is very positivie in its own right.

But after that point nothing works?

It did for me - for months. I’ve had a lot of pain with my Eve Extend lately, and i’ve not had time to investigate why. It seemed to start intermittently refusing to join the wifi, or at least not be visible in Bonjour after starting up.

And all connections to it (even with e.g. curl) fail. It’s like its crashed.

Hello @Ernst,
I have made this workaround to turn on/off Eve Aqua from Home Assistant

  • create an input boolean in HA (example: eve-ha)
  • expose this input boolean to Apple Homekit

Then in Apple Homekit:

  • create a scene sc-eve-on to turn Eve Aqua on
  • create a scene sc-eve-off to turn Eve Aqua off
  • write an automation: if switch eve-ha turns on call scene sc-eve-on
  • write an automation: if switch eve-ha turns off call scene sc-eve-off

—> if I flip eve-ha in HA, the homekit automations will turn on/off Eve Aqua.

I am using scenes to turn on/off Eve Aqua because I could not control Eve Aqua directly in the automation.

Does this help?

2 Likes

Yes, thanks for your explanation. Will try it when I receive the Eve.

That’s a great workaround, thanks for sharing.

The only issue I see is that you won’t be able to track the state of the Eve Aqua in Home Assistant if you turn it on/off manually or with HomeKit.

Do you have an idea how to track the state in HA?
One idea could be to add more automations in HomeKit to turn on/off the input boolean if the Eve Aqua turns on/off.

Example:

  • automation: if switch eve-ha turns on call scene sc-eve-on
  • automation: if switch eve aqua turns on switch eve-ha

However I don’t think this will work, because both automations would probably end up triggering themselves in a loop.

Hello @h4nc,
you raise a good point about tracking the Eve Aqua state in Home Assistant.
I have two strategies for that.

Strategy 1
Control the Eve Aqua from Home Assistant only. That means the state in Homekit is a “slave” of Home Assistant
Use only the state in Home Assistant.

Strategy 2
Here is how I prevent loops from happening.
You will need to write a slightly more complex automation in Homekit

  • automation: if switch eve-ha turns on call scene sc-eve-on
    will be rewritten to:
  • if switch eve-ha turns on then if “device Eve Aqua” is in use then (nothing) else call scene
    sc-eve-on

The additional if statement will break the loop. If you switch on Eve Aqua in Homekit then eve-ha will turn on in Home Assistant. This will trigger the iOS automation. The iOS automation will only switch on Eve Aqua if it is not already “on”. If Eve Aqua is already “on” the automation ends and the loop is broken.
See the attached screen shot

Note 1:
I am forced to use ‘if device “eve aqua” is in use’ because iOS Shortcuts app does not give me the option to code ‘if device xxx is not in use’

Note 2:
the comparison “in use” could also be “Active”.
I have to test this automation, but I hope you will get the idea

Note 3:
It seems the Homekit automations trigger on state changes (and not the state of a Homekit device). To be safe I will add the “additional if statement” in the iOS shortcut automation anyway.

Note 4:
As a final “fail safe” (in case Home Assistant dies, automations stop half way) I have limited the “open time” of Eve Aqua to 10 seconds. This is an option in the Eve app. I am using Eve Aqua in my “Pigeon Reponse System” to scare away pigeons in my garden so 10 seconds is more than enough (that is a topic for an entirely different thread).

1 Like

Thanks for your detailed answer. So you make those automations in the Shortcuts app? Good to know because I thought you added those directly in HomeKit.

Could you clarify what you mean? Isn’t it normal that triggers work with state changes? A workaround could be to use a time trigger (every x minutes) and a condition for the state.

Sorry, I was probably not clear in my previous post.

1
The scenes are made in the iOS app Home / tab Home (bottom left) / + sign upper right / Add Scene

2
about Note 3: check for state changes
In the Shortcuts app the if statement checks the current state of the switch.

And I just discovered I made “Rules” in the Eve app which monitor a switch set by Home Assistant. So that’s Homekit!

In Homekit / Eve app I can check on state changes
Below the screenshot with the rule which turns on Eve when the HA switch is flipped

Sorry, I don’t understand what you mean here with “check for state changes” or is it just meant as heading for the things below.

So it’s a condition and not a trigger, right?

So you made the scenes in the Home App, and the automations in the Eve app? Are the automation made in the Eve App shown in Home too, so is it just a “mirror”. So in the end you have three apps involved: Home, Shortcuts and Eve.

Yes, it’s just a header

1 Like

Correct. The if statement is a condition.

This is the what I did

  1. install Eve App
  2. with Eve App add the device Eve Aqua
  3. with Eve App /" tab Automation" / “SCENES” create the scenes on and off
    I created scenes because in the Rules in step 4 you cannot change the state of a device directly, but you can invoke a scene.
    I tried to do create the scenes in Home but I could not select the accesory Eve Aqua (weird)
  4. with Eve App / “tab Automation” / “RULES” create the rules (triggers) which turn on/off Eve Aqua when the Home Assistant switch is turned on/off

I have not implemented yet to update the Home Assistant switch when you use Homekit to turn on/off Eve Aqua. For this I am planning to use iOS Shortcuts.

1 Like

Would it be possible to control the valve from terminal using pi/nuc ble interface if someone wrote a script/integration? Or does the device have some kind of certificate that only makes it work with apple? I don´t know have homekit certified products work, to protect the apple ecosystem?

Just wanted to post an update about Eve Extend. My first Eve Extend had been really patchy with my home WiFi (Unifi). I recently resolved to reset it and try again. Unfortunately the usb socket came off the PCB. Not great.

2nd Eve Extend just arrived. I set it up exactly as before. Used the Eve app on iOS to pair each Eve device i have (the bridge itself + Eve Thermo, Eve Motion, Eve Smoke and Eve Energy) with my phone (not HA). Then used the Eve app to “move” each of those devices to the Extend. (So phone then routes all requests to the devices using the Eve Extend as a bridge). Then i used the Eve app to unpair my phone from the Eve Extend. Made sure to patch all the firmware levels (v 1.1 of Eve Extend claims to improve Wifi connectivity). Finally I paired with HA. It worked first time. Event notifications not only work but the reaction from the Eve Motion are nearly as fast as my Hue motion sensors (normally within a second).

Given my chronic lack of time for HA at the moment this remains your best shot at “good” integration of Eve accessories into HA, but I could do with more field reports from people using this sort of setup.

4 Likes

Awesome! I’ll give it a try immediately

worked nicely with my Eve Aqua, sometimes takes 5 seconds but it also shows battery state in HA. nice!

Hi @Jc2k. I just wanted to share my feedback about your method of connecting EVE devices to HA.

I followed your instructions to pair 2 Eve Degree devices (temperature+humidity sensors) via an Eve Extend. As you mentioned on another thread, setting up the Extend was a royal pain but eventually I got there. I now have the entities on HA and the values “appear” to be ok (the pressure entities are missing but that’s a minor issue).

Problem is: The updates. It can take hours/days to update a single value. And when it does it only updates some of the values. ie, it does not update everything at once (temp, humidity, battery).

At first I thought it was a range issue so I reset everything and confirmed that the Extend can update all the devices on a matter of seconds using the official app.

I tried attaching a debugger and increasing the log level. I can confirm that the Homekit controller update process is running every minute and values are being returned (unfortunately I haven’t been able to debug inside aiohomekit so I don’t know what’s happening after homekit_controller.connection.get_characteristics).

I don’t know what might be wrong. Maybe the Eve Extend isn’t requesting updated values from the sensors and keeps reporting back the last values known. Are there any debug categories I should enable besides theses ones?

logger:
  default: info
  logs:
    homeassistant.components.homekit_controller: debug
    homeassistant.components.homekit: debug

Btw, you also mentioned on another thread that to unpair the Eve Extend from HA we should use homekit_python. But in order to call most of the commands a PAIRINGDATAFILE is required. How can I extract this file from my HA system? It would be interesting to call the Eve Extend directly. At least I would like to experiment with it and call get_accessories and get_characteristic :slight_smile:

Thanks for the good work !