tolwi / hassio-ecoflow-cloud

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

Delta Pro all values at 0 #83

Closed tester546 closed 1 year ago

tester546 commented 1 year ago

Hi i'm new to HA and managed to get my Delta Pro connected but all the values are displayed as 0w or -1°C if i try to turn on a switch (dc on) it does nothing. Delta Pro fw: 1.0.1.55 & WiFi: 3.0.2.21

If any one could tell me if i'm missing any software/add-on or additional configuration I would appreciate it.

knyghtryda commented 1 year ago

hmm... I'm still on 1.0.1.49. It looks like 1.0.1.55 just rolled out to some people. Might need to update some values. @tester546 Can you post your diagnostic file here? @tolwi is there any provision in place if Ecoflow decides to change their naming on parameters? How do you go about supporting different firmware versions?

tolwi commented 1 year ago

I don't think they are allowed to change parameter names because of 'bindings" in native mobile apps, but if it were to happen, some kind of keys remapping can be implemented.

tester546 commented 1 year ago

config_entry-ecoflow_cloud-d6381847c601cc9f920afe36c95150f9.json.txt

tolwi commented 1 year ago

it looks like there is no connection to mqtt - is there anything in the logs?

tester546 commented 1 year ago

I you mean the logbook in the device tab of the ecoflow cloud in the integrations tab this is the oldest/1st one:

Delta Pro Status became unavailable

here is a section of the Logbook:

Delta Pro Backup Reserve Enabled became unknown 4:45:03 PM - 1 minute ago Delta Pro AC Always On became unknown 4:45:03 PM - 1 minute ago Delta Pro X-Boost Enabled became unknown 4:45:03 PM - 1 minute ago Delta Pro AC Enabled became unknown 4:45:03 PM - 1 minute ago DC ON/OFF became unknown 4:45:03 PM - 1 minute ago Delta Pro Beeper became unknown 4:45:03 PM - 1 minute ago Delta Pro Status changed to assume_offline 4:45:03 PM - 1 minute ago Delta Pro Backup Reserve Enabled became unavailable 4:45:00 PM - 1 minute ago Delta Pro AC Always On became unavailable 4:45:00 PM - 1 minute ago Delta Pro X-Boost Enabled became unavailable 4:45:00 PM - 1 minute ago Delta Pro AC Enabled became unavailable 4:45:00 PM - 1 minute ago DC ON/OFF became unavailable 4:45:00 PM - 1 minute ago Delta Pro Beeper became unavailable 4:45:00 PM - 1 minute ago Delta Pro Status became unavailable 4:45:00 PM - 1 minute ago

tolwi commented 1 year ago

System -> Logs - is there anything with "Ecoflow" keyword?

galmeida12 commented 1 year ago

Hey. Just tried to pair a Delta 2 and had the same issue. Here's the log:

Source: custom_components/ecoflow_cloud/sensor.py:269 
Integration: Ecoflow-Cloud ([documentation](https://github.com/tolwi/hassio-ecoflow-cloud), [issues](https://github.com/tolwi/hassio-ecoflow-cloud/issues)) 
First occurred: 15:17:49 (1 occurrences) 
Last logged: 15:17:49

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
    return self._handle_publish()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
    self._handle_on_message(message)
  File "/usr/local/lib/python3.11/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 256, in on_json_message
    self.data.add_get_reply_message(raw)
  File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 139, in add_get_reply_message
    self.__get_reply_observable.on_next(self.get_reply)
  File "/usr/local/lib/python3.11/site-packages/reactivex/subject/subject.py", line 59, in on_next
    super().on_next(value)
  File "/usr/local/lib/python3.11/site-packages/reactivex/observer/observer.py", line 39, in on_next
    self._on_next_core(value)
  File "/usr/local/lib/python3.11/site-packages/reactivex/subject/subject.py", line 66, in _on_next_core
    observer.on_next(value)
  File "/usr/local/lib/python3.11/site-packages/reactivex/observer/autodetachobserver.py", line 28, in on_next
    self._on_next(value)
  File "/config/custom_components/ecoflow_cloud/sensor.py", line 269, in __get_reply_update
    self._online = d["data"]["online"]
                   ~~~~~~~~~^^^^^^^^^^
KeyError: 'online'

EDIT: It's now working correctly. Had to reinstall it in HomeAssistant when updated the firmware.

tester546 commented 1 year ago

Hi managed to connect Delta Pro to HA by sharing the device in the ecoflow app to another account; it looks like if i use the account connected the ecoflow app by clicking the google button instead of creating an account for ecoflow & logging in manually; the integration does not connect to the google one.

Now I have some values but some are showing as:

Entity not available: sensor.delta_pro_battery_volts Entity not available: sensor.delta_pro_slave_1_battery_level Entity not available: sensor.delta_pro_slave_2_battery_level Entity not available: sensor.delta_pro_slave_1_in_power Entity not available: sensor.delta_pro_slave_2_in_power Entity not available: sensor.delta_pro_slave_1_out_power Entity not available: sensor.delta_pro_slave_2_out_power Entity not available: sensor.delta_pro_slave_1_battery_temperature Entity not available: sensor.delta_pro_slave_2_battery_temperature

Is this correct? please advise

if it is we can go ahead & close this issue.

FYI: Im running the latest ver. of HA & ecoflow-cloud

Thanks

tolwi commented 1 year ago

if you don't have slave batteries than it is ok

tester546 commented 1 year ago

i do have a slave battery connected to port 1 @tolwi