Support for Delta 2
maltetgh opened this issue ยท 29 comments
Hi,
are there any plans/timeline to support Ecoflow Delta 2?
Is there anything I can help with (I have one).
Thank you :)
I also have a Delta 2 with additional battery device and need to use this cool integration.
@vwt12eh8 Let me know, if I can help
+1 for this !
Tell me if I can help, my delta 2 is on his way.
+1 here as well... Just got a Delta 2 and would also be willing to help/test/etc.
+1 again.
Waiting for the next realease contains DELTA 2 maybe ...
+1 Just got my Delta 2 today!
+1
+1 from me
Instead of spamming with +1 could one who already has the Delta 2 on hand test if 8055/tcp is only open in IOT mode or also when the device is connected to an access point? Please state your firmware version and whether it is the latest fw. I would be interested if the local API has also been "locked down" on the Delta 2, same as with the other Deltas. #60
Instead of spamming with +1 could one who already has the Delta 2 on hand test if 8055/tcp is only open in IOT mode or also when the device is connected to an access point? Please state your firmware version and whether it is the latest fw. I would be interested if the local API has also been "locked down" on the Delta 2, same as with the other Deltas. #60
Delta 2 IOT is always on, no button, and all TCP ports are closed
Instead of spamming with +1 could one who already has the Delta 2 on hand test if 8055/tcp is only open in IOT mode or also when the device is connected to an access point? Please state your firmware version and whether it is the latest fw. I would be interested if the local API has also been "locked down" on the Delta 2, same as with the other Deltas. #60
If you think there is a way to bypass the restrictions of the latest Delta 2 update, I can try to get one to work on.
Instead of spamming with +1 could one who already has the Delta 2 on hand test if 8055/tcp is only open in IOT mode or also when the device is connected to an access point? Please state your firmware version and whether it is the latest fw. I would be interested if the local API has also been "locked down" on the Delta 2, same as with the other Deltas. #60
Delta 2 IOT is always on, no button, and all TCP ports are closed
Confirmed. With Delta Pro I can telnet to 8055 and get a stream of data. With Delta 2, I cannot.
Sadly I let their support know that I'll return my new Delta Pro as they have chosen to close the comms port. For me it is vital to get/send data from the unit. Without it any integration is kind of crude.
Sadly I let their support know that I'll return my new Delta Pro as they have chosen to close the comms port. For me it is vital to get/send data from the unit. Without it any integration is kind of crude.
Is the service the same when using bluetooth (except that you have to have another bluetooth device in range)?
I got the API data from ECOFLOW for my Delta 2 and it works:
curl -X GET
https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=XXXXX
-H 'Content-Type: application/json'
-H 'appKey: xxx'
-H 'secretKey: xxx'
It shows the following output:
object
code: "0"
message: "Success"
data: object
soc: 74
remainTime: -5939
wattsOutSum: 0
wattsInSum: 0
Have you that as well to integrate to HA (in confguration.yaml). You need to request appKey and secretKey from Ecoflow.
Please note that there is a bug with soc with an extra battery, the return value is only of the main one, not the average of the 2.
- platform: rest
unique_id: ecoflow_time_left
unit_of_measurement: "min"
device_class: duration
name: Ecoflow Time Left
resource: https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=xxx
value_template: '{{ "%.1f" | format(value_json.data.remainTime)}}'
method: GET
headers:
content_type: 'application/json'
appKey: 'xxx'
secretKey: 'xxx'
- platform: rest
unique_id: ecoflow_watt_out
unit_of_measurement: "W"
device_class: power
name: Ecoflow Watt Out
resource: https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=xxx
value_template: '{{ "%.1f" | format(value_json.data.wattsOutSum)}}'
method: GET
headers:
content_type: 'application/json'
appKey: 'xxx'
secretKey: 'xxx'
- platform: rest
unique_id: ecoflow_watt_in
unit_of_measurement: "W"
device_class: power
name: Ecoflow Watt In
resource: https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=xxx
value_template: '{{ "%.1f" | format(value_json.data.wattsInSum)}}'
method: GET
headers:
content_type: 'application/json'
appKey: 'xxx'
secretKey: 'xxx'
- platform: rest
unique_id: ecoflow_soc
unit_of_measurement: "%"
device_class: battery
name: Ecoflow State of Charge
resource: https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=xxx
value_template: '{{ "%.1f" | format(value_json.data.soc)}}'
method: GET
headers:
content_type: 'application/json'
appKey: 'xxx'
secretKey: 'xxx'
How it looks (minutes have been converted to H:M:
@raphaelsavina
I think your use of the REST Platform is very unfriendly to the Ecoflow API.
If you would use RESTful (https://www.home-assistant.io/integrations/rest/) I believe the same sensors/result could be archived with just one API call. For each update your HA instance will execute four API calls!
I agree - e.g. something like this
sensor:
- platform: rest
name: ecoflow_xxxx
resource: https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=xxxxxxxxxxxxxxx
scan_interval: 5
timeout: 30
authentication: digest
headers:
User-Agent: Home Assistant
Content-Type: application/json
Accept: application/json
appKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
secretKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
json_attributes_path: '$.data'
json_attributes:
- soc
- remainTime
- wattsOutSum
- wattsInSum
template:
- sensor:
- name: "EcoFlow xxxx - State of charge"
unit_of_measurement: "min"
device_class: battery
state: >
{% if state_attr('sensor.ecoflow_xxx', 'soc') == None %}
0
{% else %}
{{ state_attr('sensor.ecoflow_xxx', 'soc') }}
{% endif %}
- sensor:
- name: "EcoFlow xxx - Remain time"
unit_of_measurement: "%"
device_class: duration
state: >
{% if state_attr('sensor.ecoflow_xxx', 'remainTime') == None %}
0
{% else %}
{{ state_attr('sensor.ecoflow_xxx', 'remainTime') }}
{% endif %}
- sensor:
- name: "EcoFlow xxx - Watts Out Sum"
unit_of_measurement: "W"
device_class: power
state: >
{% if state_attr('sensor.ecoflow_xxx', 'wattsOutSum') == None %}
0
{% else %}
{{ state_attr('sensor.ecoflow_xxx', 'wattsOutSum') }}
{% endif %}
- sensor:
- name: "EcoFlow xxx - Watts In Sum"
unit_of_measurement: "W"
device_class: power
state: >
{% if state_attr('sensor.ecoflow_xxx', 'wattsInSum') == None %}
0
{% else %}
{{ state_attr('sensor.ecoflow_xxx', 'wattsInSum') }}
{% endif %}
Can you only read or also write to that API? Especially setting the AC in Watts like in the App?
Can you only read or also write to that API? Especially setting the AC in Watts like in the App?
Nope, only read, sadly...
i have made like this (inspired by this thread)
sensor:
- platform: rest
name: ecoflow_xxxxxxxxxxxxxxxxxx
resource: https://api.ecoflow.com/iot-service/open/api/device/queryDeviceQuota?sn=xxxxxxxxxxxxxxxxxx
scan_interval: 5
timeout: 30
authentication: digest
headers:
User-Agent: Home Assistant
Content-Type: application/json
Accept: application/json
appKey: yyyyyyyyyyyyyyyyyyyy
secretKey: zzzzzzzzzzzzzzzzzzzzz
json_attributes_path: '$.data'
json_attributes:- soc
- remainTime
- wattsOutSum
- wattsInSum
template:
- sensors:
ecoflow_xxxxxxxxxxxxxxxxxx_in:
unique_id: 'ecoflow_xxxxxxxxxxxxxxxxxx_in'
device_class: power
unit_of_measurement: "W"
value_template: '{{int(state_attr("sensor.ecoflow_xxxxxxxxxxxxxxxxxx", "wattsInSum"))}}'
ecoflow_xxxxxxxxxxxxxxxxxx_out:
unique_id: 'ecoflow_xxxxxxxxxxxxxxxxxx_out'
device_class: power
unit_of_measurement: "W"
value_template: '{{int(state_attr("sensor.ecoflow_xxxxxxxxxxxxxxxxxx", "wattsOutSum"))}}'
ecoflow_xxxxxxxxxxxxxxxxxx_remain:
unique_id: 'ecoflow_xxxxxxxxxxxxxxxxxx_remain'
device_class: duration
unit_of_measurement: "min"
value_template: '{{int(state_attr("sensor.ecoflow_xxxxxxxxxxxxxxxxxx", "remainTime"))}}'
ecoflow_xxxxxxxxxxxxxxxxxx_bat:
unique_id: 'ecoflow_xxxxxxxxxxxxxxxxxx_bat'
device_class: battery
unit_of_measurement: "%"
value_template: '{{int(state_attr("sensor.ecoflow_xxxxxxxxxxxxxxxxxx", "soc"))}}'
ecoflow_delta_solar_in:
unique_id: 'ecoflow_delta_solar_in'
value_template: '{% if states("switch.sonoff_10013a7d14") == "on" %}0{% else %}{{ states("sensor.ecoflow_xxxxxxxxxxxxxxxxxx2_in")}}{% endif %}'
device_class: power
unit_of_measurement: "W"
ecoflow_delta_power_in:
unique_id: 'ecoflow_delta_power_in'
value_template: '{% if states("switch.sonoff_10013a7d14") == "on" %}{{ states("sensor.ecoflow_xxxxxxxxxxxxxxxxxx_in")}}{% else %}0{% endif %}'
device_class: power
unit_of_measurement: "W"
then if my sonoff plug is on (power from grid) i push watts in in power grid fake sensor else in solar fake sensor by this way i can have a "solar input" like value , if someone have an idea to make a fake sensor (calculated) to have a kwh value (input/output, solar/grid) to let us use it in energy tab it could be great
to put in configuration.yml.txt
this is for configuration.yml for visual i use a custom plugin (on HACS) custom tesla style power card
with code below (serial removed replaced by xxx)
type: custom:tesla-style-solar-power-card
show_w_not_kw: 1
speed_factor: 0.2
hide_inactive_lines: 1
show_gap: true
change_house_bubble_color_with_flow: 0
energy_flow_diagramm_line_factor: 2
battery_extra_entity: sensor.ecoflow_xxx_bat
grid_to_battery_entity: sensor.ecoflow_delta_power_in
generation_to_battery_entity: sensor.ecoflow_delta_solar_in
battery_to_house_entity: sensor.ecoflow_xxx_out
generation_extra_entity: null
grid_extra_entity: switch.sonoff_xxx
to put in configuration.yml.txt
this is for configuration.yml for visual i use a custom plugin (on HACS) custom tesla style power card
with code below (serial removed replaced by xxx)
type: custom:tesla-style-solar-power-card show_w_not_kw: 1 speed_factor: 0.2 hide_inactive_lines: 1 show_gap: true change_house_bubble_color_with_flow: 0 energy_flow_diagramm_line_factor: 2 battery_extra_entity: sensor.ecoflow_xxx_bat grid_to_battery_entity: sensor.ecoflow_delta_power_in generation_to_battery_entity: sensor.ecoflow_delta_solar_in battery_to_house_entity: sensor.ecoflow_xxx_out generation_extra_entity: null grid_extra_entity: switch.sonoff_xxx
Works, tks you.
I've implemented basic support for Delta 2 and River 2 Max.
I've implemented basic support for Delta 2 and River 2 Max.
I can confirm this working on my Delta 2
Fantastic! Works perfectly with my Delta 2. Thank you for the super job.
After send disable wifi mqqt command, this ports opening. Any wrong command (agressive scan) - closed. + private message on mastadon :)
PORT STATE SERVICE VERSION
340/tcp filtered unknown
1062/tcp filtered veracity
1216/tcp filtered etebac5
1600/tcp filtered issd
2030/tcp filtered device2
3333/tcp filtered dec-notes
4006/tcp filtered pxc-spvr
5051/tcp filtered ida-agent
5432/tcp filtered postgresql
6543/tcp filtered mythtv
9968/tcp filtered unknown
10002/tcp filtered documentum
10617/tcp filtered unknown
50000/tcp filtered ibm-db2
52869/tcp filtered unknown
- 9110 port