tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
353 stars 60 forks source link

Entities are updates only when Ecoflow app is open #57

Closed samfromlv closed 1 year ago

samfromlv commented 1 year ago

I am using v0.8.9 with Delta2. No matter what I set in refresh rate in configuration, entities state is not refreshed automatically. Entities are refreshed automatically while I am using Ecoflow android application, otherwise the state stays the same for hours.

Any suggestions how to debug it?

Tommi1977 commented 1 year ago

Same here with River 2 Pro since yesterday

buffcode commented 1 year ago

Reloading the integration forced an update, but the data won't be updated afterwards. Seems to be device-independent, Delta Pro here.

vedranius commented 1 year ago

same with my River 2 Max

unze commented 1 year ago

Same Here. River 2 Pro

samfromlv commented 1 year ago

I have researched this issue and it seems that the reason is in the Ecoflow API. The workaround for now is to reload integration and do not open the Ecoflow App after this (Settings > Integrations > EcoFlow-Cloud > Three dots > Reload).

I have created a second account, installed Ecoflow to another Android phone and shared my Delta 2 with a newly created account. The issue is reproducible using two phones. Open two Ecoflow apps on different devices, open the device dashboard, observe that metrics are updated on both devices, force close the application on the first device, and now app on the second device will stop receiving the updates. The only way to start getting updates on second device it is to force close the app and restart it.

I have checked integration debug logs, and there are no disconnects nor errors. I have tried using different IP addresses on two devices, doesn't help.

As mentioned before, reloading integration does help and entities are updated until you open the Ecoflow app, or anyone who can access your device opens the app. I have contacted in-app support to report the issue.

faken commented 1 year ago

I've resolved this issue with a hass.io automation:

alias: Restart EcoFlow Integration
description: ""
trigger:
  - platform: time_pattern
    minutes: /5
condition: []
action:
  - service: homeassistant.reload_config_entry
    data: {}
    target:
      entity_id: number.test_ac_charging_power
mode: single
unze commented 1 year ago

Thanks, good Idea. What ist your "entity_id: number.test_ac_charging_power"

neotigger commented 1 year ago

Genauso mach ich es auch, bei mir läuft die Automation 2x in der Stunde. Lieber ein paar Sekunden keine Daten, als stundenlang die falschen.

faken commented 1 year ago

Thanks, good Idea. What ist your "entity_id: number.test_ac_charging_power"

My entity is currently just called test.

tolwi commented 1 year ago

@samfromlv following your original description it looks like ecoflow somehow tracks application activity and updates data only when app is opened. The only periodical message I've found is "setRtcTime" (each 20sec), so I've implemented such 'pinging' for Delta2 in main_ping_sensor branch. In order to activate it - go to device config and set Ping period to 20.

faken commented 1 year ago

@tolwi I've checked your work in the main_ping_sensor-branch, but it seems to not have fixed the issue. The values are again not updated after a period of approximately 5 minutes. I am back to restarting the integration.

Milchbeck commented 1 year ago

I've resolved this issue with a hass.io automation:


alias: Restart EcoFlow Integration

description: ""

trigger:

  - platform: time_pattern

    minutes: /5

condition: []

action:

  - service: homeassistant.reload_config_entry

    data: {}

    target:

      entity_id: number.test_ac_charging_power

mode: single

How I can make this? Where I make this?

unze commented 1 year ago

Settings->Automations->Create->in the upper right corner "edit as yaml"

image

replace code

Milchbeck commented 1 year ago

Settings->Automations->Create->in the upper right corner "edit as yaml"

image

replace code

Supiii Danke 🤙

Milchbeck commented 1 year ago

Und was gebe ich bei id number.Test ein?

Hab's geschafft nochmals Dankeschön

tolwi commented 1 year ago

another try for Delta2 and River2Max - main_status_sensor

Milchbeck commented 1 year ago

How I can install this 👆

tolwi commented 1 year ago

another try for Delta2 and River2Max - main_status_sensor

https://github.com/tolwi/hassio-ecoflow-cloud/releases/tag/v0.10.0-pre

Tommi1977 commented 1 year ago

I have researched this issue and it seems that the reason is in the Ecoflow API. The workaround for now is to reload integration and do not open the Ecoflow App after this (Settings > Integrations > EcoFlow-Cloud > Three dots > Reload).

I have created a second account, installed Ecoflow to another Android phone and shared my Delta 2 with a newly created account. The issue is reproducible using two phones. Open two Ecoflow apps on different devices, open the device dashboard, observe that metrics are updated on both devices, force close the application on the first device, and now app on the second device will stop receiving the updates. The only way to start getting updates on second device it is to force close the app and restart it.

I have checked integration debug logs, and there are no disconnects nor errors. I have tried using different IP addresses on two devices, doesn't help.

As mentioned before, reloading integration does help and entities are updated until you open the Ecoflow app, or anyone who can access your device opens the app. I have contacted in-app support to report the issue.

I do agree: I have not opened the Ecoflow-App for the last 2 weeks - and no problems with the HA integration. I control my River 2 pro completely over HA

tolwi commented 1 year ago

Delta2/River2Max owners - try v0.10.0-pre2. Long story short - reconnecting mqtt client recovers 'activity' in the data topic. If this solution resolves the issue for all delta2/river2max owners - I'll try to generify this approach for other devices.

Milchbeck commented 1 year ago

Delta2/River2Max owners - try v0.10.0-pre2.

Long story short - reconnecting mqtt client recovers 'activity' in the data topic.

If this solution resolves the issue for all delat2/river2max owners - I'll try to generify this approach for other devices.

For now it's working for my Delta 2 Max & River 2 Pro 💪

tolwi commented 1 year ago

Delta2/River2Max owners - try v0.10.0-pre2. Long story short - reconnecting mqtt client recovers 'activity' in the data topic. If this solution resolves the issue for all delat2/river2max owners - I'll try to generify this approach for other devices.

For now it's working for my Delta 2 Max & River 2 Pro 💪

it is only for Delta2 and River2Max as i can debug only this devices

unze commented 1 year ago

Delta2/River2Max owners - try v0.10.0-pre2. Long story short - reconnecting mqtt client recovers 'activity' in the data topic. If this solution resolves the issue for all delat2/river2max owners - I'll try to generify this approach for other devices.

For now it's working for my Delta 2 Max & River 2 Pro 💪

it is only for Delta2 and River2Max as i can debug only this devices

yes, i can confirm it's not working for River 2 Pro, as you wrote it's only for the river 2 max and delta 2

Milchbeck commented 1 year ago

I don't but for me work's great with my River 2 Pro and Delta2 Max

tolwi commented 1 year ago

v0.10.0

Milchbeck commented 1 year ago

Thx 🙏🏼

tolwi commented 1 year ago

need verification feedback to close the issue - anybody?

Tommi1977 commented 1 year ago

My River 2 Pro runs without the update - I assume because I have not used the app during the last 3 weeks ;-) so therefore I'm a little afraid to update from V. 0.8.9 (never change a running system...)

unze commented 1 year ago

I can confirm its working. River 2 Pro - v0.10.0 Thanks @tolwi

Milchbeck commented 1 year ago

When we see Powerstream???