tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
281 stars 47 forks source link

No data collected UNTIL I start the official App #208

Open Fyr42 opened 4 months ago

Fyr42 commented 4 months ago

Hi,

Data are not collected and dispayed in Home Assistant, until I start the official App. I noticed that a long time ago, just report it now. Every day.

As soon as I started it I have these message inside Logbook :

PowerStream Inverter Relay Status  changed to 16
12:16:44 PM - 2 hours ago

PowerStream Battery Status  changed to 5
12:16:44 PM - 2 hours ago

PowerStream Solar 2 Status  changed to 4
12:16:44 PM - 2 hours ago

PowerStream Solar 1 Status  changed to 4
12:16:44 PM - 2 hours ago

PowerStream Status  changed to assume_online
12:16:38 PM - 2 hours ago

DELTA 2 Max Status  changed to online
12:16:38 PM - 2 hours ago

My battery are depleated every day and both battery and powerstream goes offline every day, until sunrise.

Do you need a debug trace ?

Kind regards

Fyr42 commented 4 months ago

The shutdown phase

The last 1% of the battery drained by the wifi for the powerstream and battery, until fully depleted :

PowerStream  was detected away
2:39:32 AM - 12 hours ago

DELTA 2 Max  was detected away
2:39:32 AM - 12 hours ago

DELTA 2 Max Status  changed to offline
2:37:03 AM - 12 hours ago

PowerStream Inverter Relay Status  changed to 24
2:36:28 AM - 12 hours ago

PowerStream Battery Status  changed to 1
2:36:28 AM - 12 hours ago

Mode changed to storage priority at 1% of the battery

PowerStream Inverter Relay Status  changed to 16
1:02:36 AM - 14 hours ago
chronbu commented 4 months ago

Hi,

Same issue. Every morning, there is no data collected in HA, and my Powerstream status is "assume_offline" until I start the Ecoflow app.

Fyr42 commented 4 months ago

I have a "workaround"

I use their automation to switch to storage mode at 5%

This is enough to keep the powerstream online until the next day.

ahaimerl82 commented 1 month ago

I'd like to push this issue. Got the same problem..everything workes just fine when i added my PowerStream. Somewhen in the late evening the device switched off, HA status went to "assume_offline"..but did not show up in the morning. My integration behaves slightly different to the one of @chronbu..it will not resume getting data even if i start the normal app. I'd assume removing it and re-add could fix it, but that's no solution at all.

Is anybody working on this issue?

Cheers

>> Edit <<

Never mind. Actually i figuered out that i also made an update in the evening that broke the integration, which is why using the the app wouldn't bring it back for me.

Was able to fix it like this: https://github.com/tolwi/hassio-ecoflow-cloud/issues/232#issuecomment-2089790213

Gooman-rus commented 3 weeks ago

I have got the same problem. My EcoFlow RIVER 2 MAX unexpectedly at first got status assume_online and then after ~20 minutes it changed to assume_offline. And after I launched the app on my phone to check what is going on, the status went to online.

Also there are logs in homeassistant:

Source: custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py:239
integration: Ecoflow-Cloud ([документация](https://github.com/tolwi/hassio-ecoflow-cloud), [issues](https://github.com/tolwi/hassio-ecoflow-cloud/issues))
First message: 12:56:55 (12 сообщений)
Last message: 13:18:42

Failed to connect to MQTT: not authorised
Source: custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py:247
integration: Ecoflow-Cloud (документация, проблемы)
First message: 2 июня 2024 г. в 18:11:36 (22 сообщений)
Last message: 13:18:42

Unexpected MQTT disconnection: 7. Will auto-reconnect
Unexpected MQTT disconnection: 16. Will auto-reconnect
Unexpected MQTT disconnection: 5. Will auto-reconnect
Source: custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py:254
integration: Ecoflow-Cloud (документация, проблемы)
First message: 2 июня 2024 г. в 19:19:40 (7 сообщений)
Last message: 14:20:12

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
    return self._handle_publish()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
    self._handle_on_message(message)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
    on_message(self, self._userdata, message)
  File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 254, in on_json_message
    raw = json.loads(payload)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)