epodegrid / ecostream_homeassistant_integration

A home assistant integration that allows the user to control their Buva Ecostream units.
MIT License
7 stars 2 forks source link

Ventilation mode override active constantly #4

Closed ikbenfrank closed 1 month ago

ikbenfrank commented 2 months ago

Hey,

First off, thanks for starting the project. This was the last piece of our home climate control that wasn't connected to home assistant.

I tried the project for the past week and I also use the Buva app. In the app I have the following settings:

Problem: when I have the integration active the schedule doesn't work anymore and it's not reacting to sensors like humidity after the shower. When I have the app open the ventilation mode is constantly overrided. I added a screenshot from the Buva app. When I look at the fan speed in home assistant then it's also constant in quiet/low mode and not in auto mode. I don't use the switch to have it max for 30 minutes.

screenshot

Let me know if I need to provide logs or if this is to be expected from the integration. Thanks in advance. Dear regards, Frank

epodegrid commented 2 months ago

Hello!

Thanks for bringing this up. I also find similar issues when using the app and the homeassistant integration simultaneously. I've noticed that the ecostream unit only handles one websocket client at any time. I tried this using postman, and when I connect to the unit using postman, the app and the homeassistant integration get websocket errors.

So unfortunately, I don't think you can use both app and the homeassistant integration very well together. The integration has a retry method, so even if the app connects temporarily, the integration will override the connection and connect to the unit again. There's not much I can do about this to be honest, since the device handles connection this way, and retry method is important for the integration to recover from network issues.

About the 3 issues you've mentioned I can only suppose the following:

  1. The device is not reading data from the app or the app is not sending data the way it should do, when the integration is connected, and the above mentioned network conflict happens. Hence, the day and night schedules might not be working.
  2. The auto reaction function should be working as normal. It works for me, during showers and stuff, the fan ramps up and the ventilation is at max. So I don't really know why it's not working for you.
  3. The integration should not override your speed settings. I'm guessing again that this issue is because of the network conflict, probably because the integration takes over, before the app can even send out the settings data.

While I don't have a complete solution, here's what I can recommend as a fix (this is how I have my setup):

  1. Move everything to homeassistant and use automations in there for managing your unit. So HASS becomes the brains of the unit.
  2. Use a mixture of datasets and devices for automations Eg: I have a couple of cheap zigbee xiaomi temp and humidity sensors, and I use the following automation in Homeassistant to run the ecostream unit at max speed if certain events happen:

image

Similarly, I also have:

image

Hope this helps! I'll leave the issue open for your response, and if someone else has a solution, they can also respond in this discussions.

Cheers!

ikbenfrank commented 1 month ago

Thanks for the reply. I'll try to use the integration for a week and delete the app to rule out interference between the two.

I'll observe how the fan speed is during the week to see if it reacts to internal sensors or not. After the week I'll reply here if it fixed the issues or not.

ikbenfrank commented 1 month ago

I looked at the data from the past few days and don't see the fan reacting to internal sensors. Here is a screenshot from the first 4 days. The first peak is when I tried the max ventilation button, the second I don't know. 20240913_screenshot_supply_fan

I've looked at the sensor for the humidity and those are showing peaks during showers etc so is working.

Then for the max ventilation button. It should work for 30 minutes but after a few minutes it returns to the lower state. I have the screenshot with an hour of data of the fan speed where you see the button pressed. 20240913_screenshot_max_ventilation

Over the weekend I'll try some different settings in the Ecostream and check some debug logs if I can find anything.

ikbenfrank commented 1 month ago

I tried, without succes:

I've been trough the logs and there are a lot of disconnects. Like every few minutes. @epodegrid Is this similar to what you are seeing at home? The Buva app was not installed at this moment.

I don't know for sure but it looks like it is overriding everytime when it is reconnecting. But I have to experiment a bit further to see.

This is an excerpt:

2024-09-14 12:00:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:00:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:01:20.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:01:20.371 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:01:20.371 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:01:50.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:02:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:02:20.370 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:02:20.370 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:02:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:03:20.369 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:03:50.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:04:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:04:20.371 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:04:20.372 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:04:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:05:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:05:20.371 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:05:20.372 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:05:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:06:20.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:06:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:07:20.369 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:07:50.369 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:08:20.369 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:08:20.373 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:08:20.373 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:08:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:09:20.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:09:20.371 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:09:20.371 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:09:50.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:10:20.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:10:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:11:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:11:20.372 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:11:20.372 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:11:50.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:12:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:12:20.368 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:12:20.368 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:12:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:13:20.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:13:50.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:14:20.367 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True) 2024-09-14 12:14:20.371 ERROR (MainThread) [custom_components.ecostream] Connection closed. Reconnecting... 2024-09-14 12:14:20.372 DEBUG (MainThread) [custom_components.ecostream] Reconnecting to 192.168.2.39 2024-09-14 12:14:50.368 DEBUG (MainThread) [custom_components.ecostream.sensor] Finished fetching ecostream data in 0.000 seconds (success: True)

epodegrid commented 1 month ago

Hello, thanks for sending the logs. This is weird because I don't have the same issue. I get disconnects sometimes, but once every 3 hours on average, and not as frequently as you're seeing it.

Also, my graph seems to be consistent, instead of the breaks in the line that you see.

image

I don't really know why is happening. Could you please reinstall the integration and try? I'm out of ideas tbh.

ikbenfrank commented 1 month ago

I'll try to diagnose the problem within my own network. Thank you for your help and I'll update back after it's fixed. I closed the issue.