Git Product home page Git Product logo

Comments (99)

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024 5

The local API for the Smart Home Panel is Bluetooth only, and no TCP API is provided, so this integration cannot handle it.

If you want to support it, you will have to develop EcoFlow integration for Bluetooth or EcoFlow integration for ESPHome separately.

It appears SHP data is available and settings can be controlled via public MQTT server @ mqtt.echoflow.com ... not certain how to obtain the keys/schema for SHP but it would appear there may be a way to integrate SHP similar to Delta Pro with the caveat of being dependent on a cloud server...

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 2

Just started editing my configuration.yaml file and now have access to tested SHP items. Lots of work ahead but this has been a good breakthrough for me.

@Ne0-Hack3r Could I get access to your repo?

All what follows assumes your HA MQTT broker is configured properly and is receiving messages in the correct topics.

Instead of modifying your configuration.yaml file directly, add this to it instead.

homeassistant:
  packages: !include_dir_named packages

Then download my YAML config gist for the Smart Home Panel from: https://gist.github.com/lwsrbrts/8d6a77b4306f284cd193635e5722ffcd

Some of the data access methods and set controls in the config were determined by @Ne0-Hack3r so I won't take credit for those.

Create a folder in the same location as your configuration.yaml file called packages

Then place the gist file as a .yaml extension in the packages folder.

From that configuration, I've created the following dashboards in HA - where you can also see some controls.

image

image

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024 2

legrandjeremy

@legrandjeremy - done

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 1

Have you looked into this further or made any progress? I can't really help figure this out, but I would be happy to help test if it proceeded that far. Monitoring individual circuits isn't that important to me, but switching circuits between automatic and battery using HA automation would be amazing. The Ecoflow app is so limited in that respect.

This has been achieved for the Smart Home Panel using Ecoflow's MQTT servers but implementation is non-trivial.

This all started here: v1ckxy/ecoflow-withoutflow#1 (comment) - which gives you an indication of where to be looking to do things.

When configuring your mosquitto.conf file however, follow this recommended format from @Ne0-Hack3r: v1ckxy/ecoflow-withoutflow#1 (comment) since that provides a method of subscribing to the topics in a non-specific manner and allows easy configuration of your HA sensors and controls.

I have slightly altered a PowerShell script I wrote to generate a suitable mosquitto.conf file.

#Requires –Version 7
$useremail = '[user email address]' # Edit this
$password = '[user password]' # Edit this

# The normal use is Unicode encoding but must specify UTF8 instead.
$base64password = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($password))

$authObject = [PSCustomObject]@{
    os         = 'android'
    scene      = 'IOT_APP'
    appVersion = '4.0.0.53'
    osVersion  = '13'
    password   = $base64password
    oauth      = @{
        bundleId = 'com.ef.EcoFlow'
    }
    email      = $useremail
    userType   = 'ECOFLOW'
}

$Result = Invoke-RestMethod -Method Post -Uri 'https://api.ecoflow.com/auth/login/' -ContentType 'application/json' -Body $($authObject | ConvertTo-Json) -ResponseHeadersVariable 'Headers' -StatusCodeVariable 'StatusCode'

$TokenString = ConvertTo-SecureString -AsPlainText -Force -String $Result.data.token

$certificateData = Invoke-RestMethod -Method Get -Uri 'https://api.ecoflow.com/iot-auth/app/certification' -ContentType 'application/json' -Authentication Bearer -Token $TokenString


Write-Host "Ecoflow User ID: $($Result.data.user.userId)"

<#
Write-Host "Certificate (MQTT) User: $($certificateData.data.certificateAccount)"
Write-Host "Certificate (MQTT) Password: $($certificateData.data.certificatePassword)"
Write-Host "URL: $($certificateData.data.url)"
Write-Host "Port: $($certificateData.data.port)"
Write-Host "Protocol: $($certificateData.data.protocol)"
#>

$SHPserial = Read-Host "Please enter the correct serial number of your smart home panel"

Write-Host "Example mosquitto.conf file:"

"
connection ecoflow-bridge
address $($certificateData.data.url):$($certificateData.data.port)
remote_username $($certificateData.data.certificateAccount)
remote_password $($certificateData.data.certificatePassword)
cleansession true
remote_clientid ANDROID_$([guid]::NewGuid().ToString().ToUpper())_$($Result.data.user.userId)
try_private true
bridge_insecure false
bridge_protocol_version mqttv311
bridge_tls_version tlsv1.2
bridge_cafile /etc/ssl/certs/ca-certificates.crt

# Smart Home Panel
topic """" in 0 ecoflow/SHP/data /app/device/property/$SHPserial
topic """" both 0 ecoflow/SHP/set /app/$($Result.data.user.userId)/$SHPserial/thing/property/set
"

This basically describes how to configure mosquitto in HA to connect to Ecoflow's MQTT server to subscribe to the correct topics (and bring them to your HA MQTT server) such that you can configure sensors and other controls to act on and send actions to Ecoflow's MQTT server from HA, and have those actions happen on your SHP.

There are lots of example YAML configurations for sensors in the same thread as above, including ones for SHP.

@Ne0-Hack3r has a private Github repository where implementation is fairly well documented for SHP, but you would have to ask him for access of course.

An example control for the circuit mode might look something like:

mqtt:
 binary_sensor:
    - name: SHP Circuit 1 Auto
      object_id: shp_circuit_1_auto
      unique_id: shp_circuit_1_auto
      state_topic: "ecoflow/SHP/data"
      payload_on: "0"
      payload_off: "1"
      qos: 0
      value_template: "{{ value_json.params.loadCmdChCtrlInfos[0].ctrlMode if value_json['params']['id'] == 2 else this.state }}"
 sensor:
    - name: SHP Circuit 1 State
      object_id: shp_circuit_1_state
      unique_id: shp_circuit_1_state
      state_topic: "ecoflow/SHP/data"
      qos: 0
      value_template: "{{ value_json.params.loadCmdChCtrlInfos[0].ctrlSta if value_json['params']['id'] == 2 else this.state }}"
template:
  - select:
      - name: "SHP Circuit 1 Mode"
        unique_id: shp_circuit_1_mode
        state: >-
          {% if is_state('binary_sensor.shp_circuit_1_auto','on') %}Auto
          {% else %}
              {% set i = int(states('sensor.shp_circuit_1_state')) %}
              {% set o = {0:'Grid',1:'Battery',2:'Off'} %}
              {{ o[i] if i in o.keys() }}
          {% endif %}
        options: "{{ ['Auto','Grid','Battery','Off'] }}"
        icon: >-
          {% set i = int(states('sensor.shp_circuit_1_state')) %}
          {% set o = {0:'mdi:home-lightning-bolt-outline',1:'mdi:home-battery-outline',2:'mdi:home-off-outline'} %}
          {{ o[i] if i in o.keys() }}
        select_option:
          - service: mqtt.publish
            data:
              topic: ecoflow/SHP/set
              payload: >-
                {% set i = option %}
                {% set p = '{"from":"HA","id":"' %}
                {% set s = '","moduleType":0,"operateType":"TCP","params":' %}
                {% set id = 999900000+(range(10000,99999)|random) %}
                {% set o = {
                  'Auto':'{"sta":0,"ctrlMode":0,"ch":0,"cmdSet":11,"id":16},"version":"1.0"}',
                  'Grid':'{"sta":0,"ctrlMode":1,"ch":0,"cmdSet":11,"id":16},"version":"1.0"}',
                  'Battery':'{"sta":1,"ctrlMode":1,"ch":0,"cmdSet":11,"id":16},"version":"1.0"}',
                  'Off':'{"sta":2,"ctrlMode":1,"ch":0,"cmdSet":11,"id":16},"version":"1.0"}'
                  }
                %}
                {% if i in o.keys() %}{{p}}{{id}}{{s}}{{o[i]}}{% endif %}

from hassio-ecoflow.

adampagot avatar adampagot commented on June 27, 2024 1

I think you need to activate custom configs first. In home assistant settings - device and services - supervisor - misqutto broker - visit - customize - set active to true.

Make sure you go to supervisor, not misqutto on the same screen

The file needs to go into \share\mosquito which you will need to create

I have samba and visual code studio, either would work, but I'm running on a odroid

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 1

I do in fact have an automation that heats up my hot water by enabling battery mode on my SHP but only if either battery's level is above 30% and the battery is both connected and enabled, so it's quite like what you're thinking of.

I start a timer such that I can trigger another automation when it finishes.

alias: Use battery to heat hot water
description: ""
trigger:
  - platform: time
    at: "10:30:00"
condition:
  - condition: or
    conditions:
      - condition: and
        conditions:
          - condition: state
            entity_id: binary_sensor.shp_delta_pro_1_enabled
            state: "on"
          - condition: numeric_state
            entity_id: sensor.shp_ac1_battery_percentage
            above: 30
        alias: Check AC1 is connected and above 50% battery
      - condition: and
        conditions:
          - condition: state
            entity_id: binary_sensor.shp_delta_pro_2_enabled
            state: "on"
          - condition: numeric_state
            entity_id: sensor.shp_ac2_battery_percentage
            above: 30
        alias: Check AC2 is connected and above 50% battery
    alias: Check if either battery is connected and above 50%
action:
  - service: select.select_option
    data:
      option: Battery
    target:
      entity_id: select.shp_circuit_10_mode
  - service: timer.start
    data: {}
    target:
      entity_id: timer.hot_water_battery_boost
mode: single

Maybe your trigger would be the battery level dropping below a value, a condition would be grid unavailable (there's a sensor for that) as well as whether the batteries were connected and enabled on your SHP then you can set the circuit state to Off.

from hassio-ecoflow.

horstlab avatar horstlab commented on June 27, 2024 1

@Ne0-Hack3r Thank you for your excellent work and for sharing your results with us. I've been trying for some time to get the load balancing for the two Delta Pro connected to the SHP using Homeassistant, but so far without success. You mentioned in one of the posts above that you let the SHP switch between the DP's every 10% SOC. Could you please help me to implement this for my SHP as well? Can you please send me your private repo for this? Thanks very much.

@horstlab invite sent...

The load balancing involves using an automation to watch the SOC and a few other conditions and then engage a dummy load (small space heater plugged into a Kasa smart plug) for a few seconds to induce the SHP to enter parallel mode:

alias: SHP - Load Balance
description: SHP - Load Balance
trigger:
  - platform: numeric_state
    entity_id: sensor.dp_all_soc_delta
    for:
      hours: 0
      minutes: 1
      seconds: 0
    above: 10
condition:
  - condition: numeric_state
    entity_id: sensor.shp_all_pro_output
    above: 300
  - condition: state
    entity_id: binary_sensor.shp_pro1_ac_charging
    state: "off"
  - condition: state
    entity_id: binary_sensor.shp_pro2_ac_charging
    state: "off"
  - condition: or
    alias: Only one DP discharging
    conditions:
      - condition: and
        alias: Only DP1
        conditions:
          - condition: state
            entity_id: switch.dp1_ac_output
            state: "on"
          - condition: state
            entity_id: switch.dp2_ac_output
            state: "off"
      - condition: and
        alias: Only DP2
        conditions:
          - condition: state
            entity_id: switch.dp1_ac_output
            state: "off"
          - condition: state
            entity_id: switch.dp2_ac_output
            state: "on"
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.basement_plug
  - wait_template: "{{ int(states('sensor.shp_all_pro_output')) > 1800 }}"
    alias: Wait up to 30 seconds for AC output >1800W
    timeout: "30"
    continue_on_timeout: true
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.basement_plug
  - delay:
      hours: 0
      minutes: 9
      seconds: 0
      milliseconds: 0
mode: single

@Ne0-Hack3r

Thank you very much for your invitation and your explanations.
Now I understand better how you realized the load balancing.
So far I had tried to manually switch the power supply back to mains and then back to battery. The Smart Home Panel (SHP) then automatically selects the battery with the higher SOC. However, this is not really practicable since the relays in the SHP have to carry out a relatively large number of switching operations under load.
Your approach seems better suited to me. Thank you again for your support.

By the way, I switch between mains and battery using a command in Homeassistant that is usually sent from the Ecoflow app to enable or disable a custom automation in the SHP.
If the set start time of such an automation is in the past, it will be executed immediately when the automation is activated. If the end point of the automation is far in the future (e.g. a few years), you can switch back and forth between mains and battery at any time by activating and deactivating this automation.

In my case, all circuits of the SHP are switched simultaneously, but you can also specify the circuits to be switched. The automation itself seems to be stored in the SHP.

I have written HA scripts for activating and deactivating the automation and these are called by a corresponding button (mains-battery) when switching on or off.:

Script to activate (switch from mains to battery):

ecoflow_shp_akku_an_set:
  sequence:
    service: mqtt.publish
    data:
      topic: /app/[your user ID here]/[SHP serial number here]/thing/property/set
      payload: '{"from":"Android","id":"138031008","moduleType":0,"operateType":"TCP","params":{"cfgIndex":0,"cfg":{"chSta":[1,1,1,1,1,1,1,1,1,1],"comCfg":{"isCfg":1,"isEnable":1,"setTime":{"day":{{now().day}},"hour":{{now().hour}},"min":{{now().minute}},"month":{{now().month}},"sec":{{now().strftime("%S")}},"week":{{now().strftime("%W")}},"year":{{now().year}}},"timeRange":{"endTime":{"day":1,"hour":23,"min":59,"month":1,"sec":59,"week":1,"year":2030},"isCfg":1,"isEnable":1,"startTime":{"day":19,"hour":0,"min":0,"month":4,"sec":0,"week":3,"year":2023},"timeMode":0},"timeScale":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"type":2}},"cmdSet":11,"id":82},"version":"1.1"}' 

Script to deactivate (switch from battery to mains):

ecoflow_shp_akku_aus_set:
  sequence:
    service: mqtt.publish
    data:
      topic: /app/[your user ID here]/[SHP serial number here]/thing/property/set
      payload: '{"from":"Android","id":"138031008","moduleType":0,"operateType":"TCP","params":{"cfgIndex":0,"cfg":{"chSta":[1,1,1,1,1,1,1,1,1,1],"comCfg":{"isCfg":1,"isEnable":0,"setTime":{"day":{{now().day}},"hour":{{now().hour}},"min":{{now().minute}},"month":{{now().month}},"sec":{{now().strftime("%S")}},"week":{{now().strftime("%W")}},"year":{{now().year}}},"timeRange":{"endTime":{"day":1,"hour":23,"min":59,"month":1,"sec":59,"week":1,"year":2030},"isCfg":1,"isEnable":1,"startTime":{"day":19,"hour":0,"min":0,"month":4,"sec":0,"week":3,"year":2023},"timeMode":0},"timeScale":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"type":2}},"cmdSet":11,"id":82},"version":"1.1"}'

(In both scripts, start time is 19.04.2023, 0:00:00 and end time 1.1.2030, 23:59:59, and all channels of the SHP will be switched)

I've also created some automations in Homeassistant that take into account the Delta Pro's charge level and input and output power. If a set charge level is reached when the conditions are met, the mains-battery button is switched on by the HA automation and if the charge level falls below a certain level, it is switched off again.
With this I can ensure that on sunny days almost the entire house is supplied by the two Delta Pros and that it is switched back to the mains when the minimum charge level set in the HA automation is reached. The problem, however, was that the two Delta Pros were not being discharged to the same extent.

PS: Please excuse my bad English.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 1

@Ne0-Hack3r - the custom_templates feature is essentially a method of calling a function (but it's called a macro). You write the function and save it in a file ending in .jinja which is placed in to the custom_templates folder under config - at the same level as custom_components.

You can define variables to pass to the function and then when you call the function, you pass the variables/content etc that you want to be processed by the function.

The section of dashboard in question just gets repeated 10 times in a 2 column grid and all I'm doing is passing different entity names in to the function/macro. The end result is that if I want to change the design of all 10 "buttons", all I do is edit the .jinja file once.

The code for the dashboard and the .jinja macro is in the github gist I linked to above and you can see how you call it from within the dashboard yaml.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 1

Yes, the tap action goes to a sub-view (so it's hidden) of the same dashboard and that's where I see additional information and can control the circuit manually also. I use the same grid circuit view with all the same settings meaning I can then navigate to different circuits also - since all the code and tap actions are defined in the same grid circuit view.

image

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 1

This might answer some questions.

screen.mp4

from hassio-ecoflow.

legrandjeremy avatar legrandjeremy commented on June 27, 2024 1

legrandjeremy

@legrandjeremy - done

Many Thanks @Ne0-Hack3r and congrats for this amazing work. I integrated my Smart Home Panel, it's a pleasure to see all actions and data inside HomeAssistant !

from hassio-ecoflow.

fakeshemp01 avatar fakeshemp01 commented on June 27, 2024 1

@fakeshemp01 - DONE

For 2 x SHP, be sure to setup your mosquito.conf such that you have and SHP1 and SHP2 for the local prefix of the topics mapped to the serial number based topics for each SHP and then make 2 copies of the YAML package (for SHP1 and SHP2) in each package copy replace all instances of "SHP" with "SHP1" and "shp" with "shp1" (or SHP2/shp2). That is what I did to support 2 DPs and I think it should work for 2 x SHP (though I have not tried it).

@Ne0-Hack3r - Thank you!

from hassio-ecoflow.

mdelrossi avatar mdelrossi commented on June 27, 2024 1

@Ne0-Hack3r

Thank you

from hassio-ecoflow.

Thomptronics avatar Thomptronics commented on June 27, 2024 1

@Ne0-Hack3r
Thanks. Looking forward to playing with this today.

And... just after I got your invite I saw this: EcoFlow Developer Platform

Looks like we now have a way to make some more official (and reliable) integrations!

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024 1

@lwsrbrts

The SHP support needs things like current per circuit power readings to be exposed but that is supposed to happen this month, hopefully. Better to have an officially supported API but still disappointing that no local access exists, beyond manually enabled BLE, for SHP and that they keep closing the TCP port for DP.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024 1

I've enrolled in the developer program and it looks pretty straight forward but they don't have any Smart Home Panel 2 docs yet. Does anyone have the commands available?

SHP2 and DPU are supposed to happen in Q2. It looks like some of the preliminary structure is there and you can pull sensor data but there is no documentation and it does not appear access to modify settings has been opened up yet. The data for both on the public MQTT side is encoded making it a rather involved process to try to reverse-engineer so waiting for the official support in the API.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024 1

I've updated the gist to include the raw configuration of that entire dashboard including the sub-views (the individual circuits). I use apexcharts card extensively and it is highly likely there are some custom sensors that aren't defined for you. If you need the yaml for those, let me know the names of the sensors that are missing for you and i'll dig them out of my config.

https://gist.github.com/lwsrbrts/03a697d23a0cdf6fa46898b54dbdf44c

from hassio-ecoflow.

vwt12eh8 avatar vwt12eh8 commented on June 27, 2024

The local API for the Smart Home Panel is Bluetooth only, and no TCP API is provided, so this integration cannot handle it.

If you want to support it, you will have to develop EcoFlow integration for Bluetooth or EcoFlow integration for ESPHome separately.

from hassio-ecoflow.

franki29 avatar franki29 commented on June 27, 2024

Hi, you can use Node-Red. What smart home panel do you like to use?

from hassio-ecoflow.

vwt12eh8 avatar vwt12eh8 commented on June 27, 2024

Unfortunately I have never used Smart Home Panel myself.
The reason I'm not able to use TCP is based on speculation based on the behavior of the official app.

If you have an example of using it with NodeRed, please share it.

from hassio-ecoflow.

franki29 avatar franki29 commented on June 27, 2024

Hi, if you have not yet used one I would recommend:

https://www.openhasp.com
https://github.com/sieren/Homepoint
https://github.com/souravj96/max7219-mqtt-esp8266

All are working over a MQTT Broker, so you do not need Node Red for it unless you like to change some messages.
I am not a expert in Home Assistant, but it should be possible to send the hassio-ecoflow information using home assistant mqtt connector to the panels.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Hi, if you have not yet used one I would recommend:

https://www.openhasp.com https://github.com/sieren/Homepoint https://github.com/souravj96/max7219-mqtt-esp8266

All are working over a MQTT Broker, so you do not need Node Red for it unless you like to change some messages. I am not a expert in Home Assistant, but it should be possible to send the hassio-ecoflow information using home assistant mqtt connector to the panels.

@franki29 I think you've misunderstood the OP. The "Smart Home Panel" is another Ecoflow product, not a display device. See: https://www.ecoflow.com/us/smart-home-panel for reference.

from hassio-ecoflow.

franki29 avatar franki29 commented on June 27, 2024

Oh sorry, yes I misunderstood. Sorry.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Just wanted to add to this issue that, while I haven't done a full port scan on my Smart Home Panel, its details and control topics (as in, an MQTT topic) are populated in Ecoflow's MQTT server. So it does like like the Smart Home Panel offers more than just Bluetooth as a connection mechanism.

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

It appears SHP data is available and settings can be controlled via public MQTT server @ mqtt.echoflow.com ... not certain how to obtain the keys/schema for SHP but it would appear there may be a way to integrate SHP similar to Delta Pro with the caveat of being dependent on a cloud server.

Have you looked into this further or made any progress? I can't really help figure this out, but I would be happy to help test if it proceeded that far. Monitoring individual circuits isn't that important to me, but switching circuits between automatic and battery using HA automation would be amazing. The Ecoflow app is so limited in that respect.

from hassio-ecoflow.

adampagot avatar adampagot commented on June 27, 2024

Currently access has been limited to beta testers. I have been selected as a beta tester. I have been able to switch automations on/off with a mqtt explorer app for windows. Unfortunately I have no experience developing for HA so trying to get things working in home assistant is going very slowly for me.

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

This has been achieved for the Smart Home Panel using Ecoflow's MQTT servers but implementation is non-trivial.

@lwsrbrts Wow. Thanks for all this info and sample scripts. This is exactly what I need. I've got a lot to learn in order to implement this but it looks doable.

from hassio-ecoflow.

adampagot avatar adampagot commented on June 27, 2024

@lwsrbrts I've been fighting with the MQTT bridge, your instructions allowed me to set it up.
@Ne0-Hack3r Would it be possible to get access to your repo where you have more documents? I am a beta tester

from hassio-ecoflow.

ipalchuk avatar ipalchuk commented on June 27, 2024

just for info... sorry if off topic.
nielsole/ecoflow-bt-reverse-engineering#2

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

@lwsrbrts Warning! Stupid Question Ahead:
I've used your Powershell script to create a mosquitto.conf file, but I can't figure out where it goes. Can you give a n00b some more help? I'm not sure if this is a stand-alone file or if it gets merged into an existing conf file.

I assume I'll be able to access the location using Samba. I'm running on a RPI 4 so don't think I can run Visual Studio and the File Editor seems to be limited to the config directory (unless that's where it goes). I've spent the last few weeks moving from Hubitat to HA and while I've learned a lot, I've got a very long way to go.

Thanks.

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

Thanks @adampagot I followed your instructions and now have my mosquitto.conf file in the \share\mosquitto directory. Tomorrow I'll read through the referenced thread more thoroughly and try setting up a yaml file to access and maybe even control a circuit. Hopefully I'm able to piece this together as I'm coming into this with absolutely no prior MQTT knowledge.

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

I'm now at the point where MQTT Explorer can see the Ecoflow SHP topic but I don't really know where to go from here. I see all the samples of sensor definitions and control but don't know where the yaml coding for this should go. What file names, folders, are there pointers needed in configuration.yaml? I guess I'm still looking for basics that most would assume someone in the forum already knew.

Just started editing my configuration.yaml file and now have access to tested SHP items. Lots of work ahead but this has been a good breakthrough for me.

@Ne0-Hack3r Could I get access to your repo?

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

Lewis @lwsrbrts -
Thanks so much! I've added your smart_home_panel.yaml as instructed and cleaned up my configuration.yaml. I now have access to every function of my SHP and can control it through HA. Now I can automate switching circuits to/from battery use to get the most from my solar panels. Of course, my dashboard doesn't look as nice as yours, but it works perfectly.

Thanks again to you and Adam @adampagot for helping me out and making this possible.
Lee

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@lwsrbrts I've been fighting with the MQTT bridge, your instructions allowed me to set it up. @Ne0-Hack3r Would it be possible to get access to your repo where you have more documents? I am a beta tester

Done.

Everything in the repo is related to the Ecoflow public MQTT server. This access is not supported by Ecoflow and was gained by collaboration between a number of people on this and other forums (which began by decompiling the native app on Android IIRC). There is no guarantee it will continue to work once the official API is publicly released. Also, EF recently added filtering of client IDs which my documentation/scripts have not been updated to reflect.

Bottom line: I'm not sure how much of what is in the repo will work with the API. It will depend on how much data EF decides to provide via that mechanism and if they keep the same topic structure or not...

Hopefully it can be helpful to you for at least providing ideas and some insight into the YAML configuration for Home Assistant.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

I'm now at the point where MQTT Explorer can see the Ecoflow SHP topic but I don't really know where to go from here. I see all the samples of sensor definitions and control but don't know where the yaml coding for this should go. What file names, folders, are there pointers needed in configuration.yaml? I guess I'm still looking for basics that most would assume someone in the forum already knew.

Just started editing my configuration.yaml file and now have access to tested SHP items. Lots of work ahead but this has been a good breakthrough for me.

@Ne0-Hack3r Could I get access to your repo?

DONE

from hassio-ecoflow.

Maxctran avatar Maxctran commented on June 27, 2024

@Ne0-Hack3r Could I get access to your repo as well? I am trying to integrate charging with my AC solar production on my roof. I'm brand new to Home Assistant and Github so any help would be amazing. I have managed to get Home Assistant running and Delta Pros linked with the Hassio-ecoflow repo already.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

Maxctran

Done.

from hassio-ecoflow.

aflusche avatar aflusche commented on June 27, 2024

Thanks to this thread and the other one linked above, I have tons of data coming from Ecoflow into Home Assistant. Small sample:

image

@Ne0-Hack3r I'd love access to your repo if possible to see what else can be done. For one, I saw mention in the other thread about you monitoring the Delta Pro state of charge. That's one of the main things I am wanting...

from hassio-ecoflow.

romsch1 avatar romsch1 commented on June 27, 2024

@Ne0-Hack3r nice job. Could you please grant me also access to your EcoFlow-Repo ? Thanks in advance :)

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@aflusche
@romsch1

Done and Done

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

Anyone on this thread worked with the SHP automations via MQTT?
Anyone have a dashboard example that displays automation data or allows manipulating it?

I'm playing with this now but any ideas or examples are appreciated.

from hassio-ecoflow.

aflusche avatar aflusche commented on June 27, 2024

Thank you!!

Anyone on this thread worked with the SHP automations via MQTT? Anyone have a dashboard example that displays automation data or allows manipulating it?

Not yet. My DREAM concept is for HA to monitor my DP battery level and smartly turn off non-critical circuits during an outage.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Not yet. My DREAM concept is for HA to monitor my DP battery level and smartly turn off non-critical circuits during an outage.

I'm pretty certain you could achieve that already with the custom integration in this repo and the work that @Ne0-Hack3r has put in on pulling in the sensors from the SHP using MQTT.

The gist I linked to above gives the code for all of the sensors you'd need to create an automation that would do exactly what you're dreaming of.

from hassio-ecoflow.

lk229 avatar lk229 commented on June 27, 2024

I'm not doing anything complicated, but I have a simple automation setup and running. Synopsis... I've got a small amount of power from my emergency backup system from which I want to use any excess over what I think I'll need for a power outage. I switch my living room circuit (channel 6) between the grid and battery as the following automation demonstrates.

`alias: Control Power Source - Living Room
description: >-
Switch the living room circuit to battery power at 1.5 hours after sunrise if
battery level is above 80%. Switch the living room circuit to grid power at
sunset or if battery level drops below 72% (if grid power is active).
trigger:

  • platform: sun
    event: sunrise
    offset: "01:30:00"
    id: Sunrise_1.5
  • type: battery_level
    platform: device
    device_id: 2bb09a815131533cfc5c5dbf0f2d38b0
    entity_id: sensor.delta_pro_100758_battery
    domain: sensor
    below: 72
    for:
    hours: 0
    minutes: 0
    seconds: 30
    id: Battery Low
  • platform: sun
    event: sunset
    offset: 0
    id: Sunset
    condition: []
    action:
  • choose:
    • conditions:
      • condition: trigger
        id: Sunrise_1.5
      • type: is_battery_level
        condition: device
        device_id: 2bb09a815131533cfc5c5dbf0f2d38b0
        entity_id: sensor.delta_pro_100758_battery
        domain: sensor
        above: 80
        sequence:
      • service: mqtt.publish
        data:
        qos: "0"
        retain: false
        topic: ecoflow/SHP/set
        payload: >-
        {"from":"Android","id":"51048nnnn","moduleType":0,"operateType":"TCP","params":{"sta":1,"ch":6,"cmdSet":11,"ctrlMode":1,"id":16},"version":"1.1"}
    • conditions:
      • condition: trigger
        id: Battery Low
      • condition: state
        entity_id: sensor.shp_circuit_7_state
        state: "1"
      • condition: state
        entity_id: binary_sensor.shp_grid_available
        state: "on"
        sequence:
      • service: mqtt.publish
        data:
        qos: "0"
        retain: false
        topic: ecoflow/SHP/set
        payload: >-
        {"from":"Android","id":"51048nnnn","moduleType":0,"operateType":"TCP","params":{"sta":1,"ch":6,"cmdSet":11,"ctrlMode":0,"id":16},"version":"1.1"}
    • conditions:
      • condition: trigger
        id: Sunset
      • condition: state
        entity_id: sensor.shp_circuit_7_state
        state: "1"
      • condition: state
        entity_id: binary_sensor.shp_grid_available
        state: "on"
        sequence:
      • service: mqtt.publish
        data:
        qos: "0"
        retain: false
        topic: ecoflow/SHP/set
        payload: >-
        {"from":"Android","id":"51048nnnn","moduleType":0,"operateType":"TCP","params":{"sta":1,"ch":6,"cmdSet":11,"ctrlMode":0,"id":16},"version":"1.1"}
        mode: single
        `

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

Thank you!!

Anyone on this thread worked with the SHP automations via MQTT? Anyone have a dashboard example that displays automation data or allows manipulating it?

Not yet. My DREAM concept is for HA to monitor my DP battery level and smartly turn off non-critical circuits during an outage.

That can be done by manipulating the config of the built in outage automation or by putting the circuits you want to load shed into "grid only" mode when your trigger/conditions hit... I have not done that specifically as I'm more focused on daily cycling with solar. My private repo now has sample automations for inducing parallel mode and switching between DPs every 10% SOC ('load balance').

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

I'm not doing anything complicated, but I have a simple automation setup and running. Synopsis... I've got a small amount of power from my emergency backup system from which I want to use any excess over what I think I'll need for a power outage. I switch my living room circuit (channel 6) between the grid and battery as the following automation demonstrates.

Yes. You can directly manipulate the channel states that way...

I'm looking to manipulate the onboard automations themselves (internal to SHP)...

Example1: I have 2 circuit switch automations that run daily 24x7 with 2 different sets of circuits configured to switch to battery... I want to enable/disable one or the other automation using an HA automation (based on whatever triggers).

Example2: An automation that runs 24x7 (governed by SHP charge/discharge limits and such) but manipulate which circuits are configured within that automation based on various conditions (say load vs solar input or whatever).

There are certain advantages to leveraging the internal automation engine in SHP as opposed to 'replacing' it entirely from HA... For example, if HA changes a circuit to 'run from battery' it will not automatically fall back to grid so you have to handle a condition like that within your HA logic...

from hassio-ecoflow.

dafmeuk avatar dafmeuk commented on June 27, 2024

Looks like some excellent work has been achieved in the past few weeks, and this looks like exactly what I need.

Are there any plans to get this work integrated into the hassio-ecoflow integration, or publish a separate HACS integration for SHP perhaps?

Huge thanks!

from hassio-ecoflow.

ebeiersdorfer avatar ebeiersdorfer commented on June 27, 2024

Great work here, this was super helpful in getting this all configured! @lwsrbrts I'm fairly new to HA, any chance you could share the Cards for your circuit config, I'm struggling to reproduce them.

@Ne0-Hack3r I'd love to get access to the repo as well!

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

ebeiersdorfer

Done

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

Looks like some excellent work has been achieved in the past few weeks, and this looks like exactly what I need.

Are there any plans to get this work integrated into the hassio-ecoflow integration, or publish a separate HACS integration for SHP perhaps?

Huge thanks!

dafmeuk

Sent invite to my Repo... There are YAML packages and sample dashboard code for SHP there... It's not a formal integration... I might get ambitious and create one at some point but I want to see what comes of the Ecoflow API beta first...

from hassio-ecoflow.

horstlab avatar horstlab commented on June 27, 2024

@Ne0-Hack3r
Thank you for your excellent work and for sharing your results with us.
I've been trying for some time to get the load balancing for the two Delta Pro connected to the SHP using Homeassistant, but so far without success. You mentioned in one of the posts above that you let the SHP switch between the DP's every 10% SOC. Could you please help me to implement this for my SHP as well? Can you please send me your private repo for this?
Thanks very much.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Great work here, this was super helpful in getting this all configured! @lwsrbrts I'm fairly new to HA, any chance you could share the Cards for your circuit config, I'm struggling to reproduce them.

@Ne0-Hack3r I'd love to get access to the repo as well!

@ebeiersdorfer - sorry for the...err, delay replying. Is there a specific part or thing you're interested in reproducing and I'll dig it out for you.

I've created a gist here which is for the following part:

image

Be aware though that I'm using the custom_templates macros feature to give me a way to make design changes in a single place, rather than doing it many times.

from hassio-ecoflow.

ebeiersdorfer avatar ebeiersdorfer commented on June 27, 2024

No worries, thank you! I'll get to messing around with it, but that's exactly the panel I was struggling to reproduce.

from hassio-ecoflow.

Tech-Doc23 avatar Tech-Doc23 commented on June 27, 2024

@Ne0-Hack3r - Can I please also have access to your Ecoflow-Repo?

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@Ne0-Hack3r Thank you for your excellent work and for sharing your results with us. I've been trying for some time to get the load balancing for the two Delta Pro connected to the SHP using Homeassistant, but so far without success. You mentioned in one of the posts above that you let the SHP switch between the DP's every 10% SOC. Could you please help me to implement this for my SHP as well? Can you please send me your private repo for this? Thanks very much.

@horstlab invite sent...

The load balancing involves using an automation to watch the SOC and a few other conditions and then engage a dummy load (small space heater plugged into a Kasa smart plug) for a few seconds to induce the SHP to enter parallel mode:

alias: SHP - Load Balance
description: SHP - Load Balance
trigger:
  - platform: numeric_state
    entity_id: sensor.dp_all_soc_delta
    for:
      hours: 0
      minutes: 1
      seconds: 0
    above: 10
condition:
  - condition: numeric_state
    entity_id: sensor.shp_all_pro_output
    above: 300
  - condition: state
    entity_id: binary_sensor.shp_pro1_ac_charging
    state: "off"
  - condition: state
    entity_id: binary_sensor.shp_pro2_ac_charging
    state: "off"
  - condition: or
    alias: Only one DP discharging
    conditions:
      - condition: and
        alias: Only DP1
        conditions:
          - condition: state
            entity_id: switch.dp1_ac_output
            state: "on"
          - condition: state
            entity_id: switch.dp2_ac_output
            state: "off"
      - condition: and
        alias: Only DP2
        conditions:
          - condition: state
            entity_id: switch.dp1_ac_output
            state: "off"
          - condition: state
            entity_id: switch.dp2_ac_output
            state: "on"
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.basement_plug
  - wait_template: "{{ int(states('sensor.shp_all_pro_output')) > 1800 }}"
    alias: Wait up to 30 seconds for AC output >1800W
    timeout: "30"
    continue_on_timeout: true
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.basement_plug
  - delay:
      hours: 0
      minutes: 9
      seconds: 0
      milliseconds: 0
mode: single

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@Ne0-Hack3r - Can I please also have access to your Ecoflow-Repo?

@Tech-Doc23 done.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@lwsrbrts that dashboard is nice. I'd be interested in looking at how you pulled that off... Never used custom template macros...

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@horstlab - What the payload for SHP automations is doing is basically togging the isEnable bit... There is also isConfig which setting to zero is basically the equivalent of deleting the automation in the SHP app... There are basically 16 "slots" for automations and they all are always present in the mqtt payload but they are only visible and "available" in the app if isConfig=1 and will only trigger if both isConfig=1 and isEnable=1...

The challenge with this approach is having to set all parameters for the automation every time even if you just want to change isEnable from 1 to 0 and also keeping track of which automation "slot" you're modifying... This can be problematic if you change things in the app and then your HA script rewrites all the settings...

An alternative is to have HA automation change the individual circuits to "use power station" and back to "auto" or "use grid" as desired... The downside of this approach is that if the battery reaches the discharge limit circuits set to "use power station" will turn OFF so you have to anticipate the condition in HA script/automation to switch back to auto/grid externally...

I don't like either approach due to the drawbacks... One thought I have had (but not explored) is using a script to obtain all current settings and then post them back with only isEnabled toggled... That would allow for a more refined setup where changes could be made in the app to the details of the automation and HA could then simply turn it on/off as desired...

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@lwsrbrts - Thanks. I got the template implemented. Now I'm curious what your sensor definition looks like for 'sensor.shp_ch1_battery_energy' I have 'sensor.shp_ch1_energy' defined as an integration sensor:

sensor: 
- name: SHP Circuit 1 Energy
  unique_id: shp_ch1_energy
  source: sensor.shp_ch1_power
  round: 3
  platform: integration
  unit_prefix: k

...but I'm not sure where you're getting the per circuit data for Wh on battery or if you're using another integration sensor to track that...

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Ah, sorry. Maybe that's a sensor I added to my yaml in addition to the work you did - my format is slightly different to yours so feel free to edit to suit.

mqtt:
  sensor:
    - name: SHP Circuit 1 Battery Energy
      state_topic: "ecoflow/SHPTopic"
      qos: 0
      device_class: energy
      unit_of_measurement: "Wh"
      state_class: total
      value_template: "{{ value_json.params.watth[0] | sum | round(0) if value_json['params']['id'] == 49 else states('sensor.shp_circuit_1_battery_energy') }}"
      last_reset_value_template: "{{ (as_timestamp(strptime(value_json.params.rtc, '%Y-%m-%d')) | as_datetime()).isoformat() if value_json['params']['id'] == 49 else state_attr('sensor.shp_circuit_1_battery_energy', 'last_reset') }}"

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@lwsrbrts - thanks for that... I had been wondering how that per circuit array worked in terms of deriving the actual Wh value... I just never got back round to digging into it...

Here is my rendition of the sensor:

  - name: SHP Circuit 1 Battery Energy
    object_id: shp_ch1_batt_energy
    unique_id: shp_ch1_batt_energy
    state_topic: "ecoflow/SHP/data"
    qos: 0
    device_class: energy
    unit_of_measurement: "Wh"
    state_class: total
    value_template: >-
      {% if value_json.params.id == 49 %}
        {% set d = value_json.params.watth[0] %}
        {% if d is defined %}
          {{d|sum|round(0)}}
        {%else%}{{this.state}}{%endif%}
      {%else%}{{this.state}}{%endif%}
    last_reset_value_template: >-
      {% if value_json.params.id == 49 %}
        {% set t = value_json.params.rtc %}
        {% if t is defined %}
          {{(as_timestamp(strptime(t,'%Y-%m-%d'))|as_datetime()).isoformat()}}
        {%else%}{{state_attr(this.state,'last_reset')}}{%endif%}
      {%else%}{{state_attr(this.state,'last_reset')}}{%endif%}

I made only slight tweaks to the dashboard YAML you provided:

views:
  - title: Circuits
    path: Circuits
    cards:
      - type: grid
        square: false
        columns: 2
        cards:
          - type: custom:mushroom-template-card
            primary: Upstairs Sub A
            secondary: >-
              {% from 'shp_dashboard.jinja' import shp_circuit_info %}
              {{ shp_circuit_info('sensor.shp_ch1_power',
              'sensor.shp_ch1_energy', 'sensor.shp_ch1_batt_energy' ) }}
            icon: mdi:numeric-1-circle
            entity: sensor.shp_ch1_power
            multiline_secondary: true
            badge_icon: |-
              {% from 'shp_dashboard.jinja' import shp_battery_icon %}
              {{ shp_battery_icon('select.shp_circuit_1_mode') }}
            fill_container: false
            layout: vertical
            icon_color: blue
            badge_color: |-
              {% from 'shp_dashboard.jinja' import shp_battery_badge %}
              {{ shp_battery_badge('select.shp_circuit_1_mode') }}
            tap_action:
              action: navigate
              navigation_path: /lovelace-energy/circuit-1

image

I am wondering where the tap action is supposed to go... Is that pointing to another custom dashboard in your setup or something within the native energy dashboard? When I tap any circuit it takes me to the primary view on my primary dashboard so I'm guessing the path is not valid...

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@lwsrbrts - got it! that clever... I'm still learning some of the advanced stuff you can do with dashboards... Beats the native app by miles!

from hassio-ecoflow.

ketoha avatar ketoha commented on June 27, 2024

@Ne0-Hack3r can I have access to your repo please?

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@Ne0-Hack3r can I have access to your repo please?
@ketoha done

from hassio-ecoflow.

maxisven avatar maxisven commented on June 27, 2024

Hey @Ne0-Hack3r, can I have acess to your repo pls ?

Thank you very much :-)

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@maxisven done

from hassio-ecoflow.

maxisven avatar maxisven commented on June 27, 2024

hey guys :-)
Can anyone help me with install this repo ? Im newbie in homeassistant and i dont unterstand where create the folder for the cacert.pem

from hassio-ecoflow.

bluefire100 avatar bluefire100 commented on June 27, 2024

@maxisven done

May I ask for access to your repo please, too?
Thank you!

from hassio-ecoflow.

bluefire100 avatar bluefire100 commented on June 27, 2024

Just started editing my configuration.yaml file and now have access to tested SHP items. Lots of work ahead but this has been a good breakthrough for me.
@Ne0-Hack3r Could I get access to your repo?

All what follows assumes your HA MQTT broker is configured properly and is receiving messages in the correct topics.

Instead of modifying your configuration.yaml file directly, add this to it instead.

homeassistant:
  packages: !include_dir_named packages

Then download my YAML config gist for the Smart Home Panel from: https://gist.github.com/lwsrbrts/8d6a77b4306f284cd193635e5722ffcd

Some of the data access methods and set controls in the config were determined by @Ne0-Hack3r so I won't take credit for those.

Create a folder in the same location as your configuration.yaml file called packages

Then place the gist file as a .yaml extension in the packages folder.

From that configuration, I've created the following dashboards in HA - where you can also see some controls.

image

image

Trying your solution and adding to "Energy dashboard" I got 2 error messages:

  • statistics_not_defined
  • entity not available
    sensor.shp_circuit_1_energy (unknown). (this error comes for all 10 circuits)

Any hint what to do?

regareds

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Statitics not defined happens because nothing is being populated, that's because you're selecting the wrong entities in the individual items section for the energy dashboard.

The sensors at the top of the gist are the ones you need to use in the individual items area of the energy dashboard. So these (I've highlighted the names of the sensors) are what you add to the dashboard.

image

And that gives you these in the dashboard config...

image

Which starts showing these in time:

image

from hassio-ecoflow.

bluefire100 avatar bluefire100 commented on June 27, 2024

Unfortunately the entities you mentioned do not appear, saying I cannot select them. I only can choose from this 2 (for all 10 circuits). In the config file at "packages" directory they are as shown in your screenshot.
Error (1)

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

I would check that you have data actually populating in MQTT - have you set up the MQTT bridge to ecoflow? The primary source of data is MQTT, that information is pushed through other sensors to make up the entities that you can place on the energy dashboard.

I don't know your skill level with Home Assistant or MQTT but please be aware that this Ecoflow integration (hassio-ecoflow) does not provide any Smart Home Panels data. That all comes from a connection (a bridge) to Ecoflow's own MQTT server which pulls the SHP data locally (to your MQTT server) and the YAML above pulls that data from your MQTT server to put it in to HA sensors. This "issue", among others in this repository has just turned in to a discussion area. @Ne0-Hack3r has done a great job of summarising everything needed to get the MQTT bridge set up and configure the dashboards etc. but that information is in his own private repo, which I'm sure he'll give you access to.

from hassio-ecoflow.

bluefire100 avatar bluefire100 commented on June 27, 2024

Thx, now I know why it's not working. My HA skills are not good enough to do this by myself.
I have to wait, until https://github.com/Ne0-Hack3r has finished the integration in Cassio EcoFlow cloud.

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

This repo belongs to someone else, it jsut so happens that this is where we all started discussing Smart Home Panel data.

@Ne0-Hack3r 's repo will give you all the information needed to set up the bridge connection but the pre-requisite is that you must have MQTT configured in HA already.

If you've not done that yet - watch this YouTube video to get it configured: https://www.youtube.com/watch?v=dqTn-Gk4Qeo&pp=ygUEbXF0dA%3D%3D

from hassio-ecoflow.

bluefire100 avatar bluefire100 commented on June 27, 2024

This repo belongs to someone else, it jsut so happens that this is where we all started discussing Smart Home Panel data.

@Ne0-Hack3r 's repo will give you all the information needed to set up the bridge connection but the pre-requisite is that you must have MQTT configured in HA already.

If you've not done that yet - watch this YouTube video to get it configured: https://www.youtube.com/watch?v=dqTn-Gk4Qeo&pp=ygUEbXF0dA%3D%3D

NeO-Hack3r was asking a few days ago in the [hassio-ecoflow-cloud] repo if he should integrate SHP into hassio-ecoflow cloud integration
Div

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Ah ok. Yeah, I've been keeping my eye on that repo too. You do have options though if you can't wait.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

bluefire100

@bluefire100 - done

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@bluefire100

I recently updated the YAML package for SHP integration. It has several additional items as well as added automations for doing various advanced things like manipulating the automations inside SHP itself. Be careful if you're just starting out as some of this stuff can do unexpected things and the SHP is controlling actual electrical circuits, etc.

image

The most current version of my package uses the names above for the cumulative energy sensors.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

Ah ok. Yeah, I've been keeping my eye on that repo too. You do have options though if you can't wait.

@lwsrbrts @bluefire100

I've heard nothing from the author of that repo. I'd be happy to help but I'm going to need some guidance from them to streamline the process. I've never written a full grown HA integration so I'll trade what I know about the SHP for some hand holding in that area. I have played with the cloud integration but I've already got packages for everything is provides and have steadily moved everything to local control (using a modified hasso integration or my own hacks/packages). The SHP is the only thing left on my list that still required the cloud MQTT server because it has no TCP access and BLE access requires manual enabling (Iot button) and even if that worked I don't feel like reverse engineering all the byte stream data/settings at this point.

from hassio-ecoflow.

legrandjeremy avatar legrandjeremy commented on June 27, 2024

hi All,

I'm very interested to implement my SPH in HomeAssistant.
@Ne0-Hack3r Can you please give me access to your repo ? πŸ™

Many thanks

from hassio-ecoflow.

fakeshemp01 avatar fakeshemp01 commented on June 27, 2024

@Ne0-Hack3r

Great work. I really wanted to wait until formal integration was done, but I am a child at heart waiting on Christmas Eve with excited trepidation.

That said, @Ne0-Hack3r , may I have access also please?

Being that I have two Smart Home Panels, would you have any consideration or concerns? Please and thank you!

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@fakeshemp01 - DONE

For 2 x SHP, be sure to setup your mosquito.conf such that you have and SHP1 and SHP2 for the local prefix of the topics mapped to the serial number based topics for each SHP and then make 2 copies of the YAML package (for SHP1 and SHP2) in each package copy replace all instances of "SHP" with "SHP1" and "shp" with "shp1" (or SHP2/shp2). That is what I did to support 2 DPs and I think it should work for 2 x SHP (though I have not tried it).

from hassio-ecoflow.

mdelrossi avatar mdelrossi commented on June 27, 2024

@Ne0-Hack3r

I'd like access to the SHP repo

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@mdelrossi
invite sent

from hassio-ecoflow.

Thomptronics avatar Thomptronics commented on June 27, 2024

@Ne0-Hack3r
Love to get access to your repo if I could. Thanks.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@Thomptronics - done!

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

Not gonna lie. That is some very good and very welcome news from Ecoflow. I believe that @Ne0-Hack3r was aware of this in a beta program of sorts but now that we have official documentation and an official method of interacting with our devices we are, as you say, very likely to get some official Home Assistant integrations, but it is a bit of a shame that it's cloud-based.

from hassio-ecoflow.

julrich1 avatar julrich1 commented on June 27, 2024

I've enrolled in the developer program and it looks pretty straight forward but they don't have any Smart Home Panel 2 docs yet. Does anyone have the commands available?

from hassio-ecoflow.

julrich1 avatar julrich1 commented on June 27, 2024

@Ne0-Hack3r could I also get access to your repo please?

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@julrich1

Invite sent

from hassio-ecoflow.

jrseliga avatar jrseliga commented on June 27, 2024

@Ne0-Hack3r may I have access to the repository as well?

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on June 27, 2024

@jrseliga

Sure thing... invite sent!

from hassio-ecoflow.

theneochan avatar theneochan commented on June 27, 2024

Hello, please can I get access?

Want to control charging based on Octopus Agile.

from hassio-ecoflow.

carfnann avatar carfnann commented on June 27, 2024

lwsrbrts many thanks for what you have shared! I have been able to add my SHP to HA.
thanks very much

can I ask you if you can share you dashboard yaml ? I have added the jinja part but I would love to have the same look and field and features as you.

thanks

from hassio-ecoflow.

carfnann avatar carfnann commented on June 27, 2024

@Ne0-Hack3r may I ask you to invite me as well? Please

from hassio-ecoflow.

lwsrbrts avatar lwsrbrts commented on June 27, 2024

lwsrbrts many thanks for what you have shared! I have been able to add my SHP to HA. thanks very much

can I ask you if you can share you dashboard yaml ? I have added the jinja part but I would love to have the same look and field and features as you.

thanks

I believe it's pretty much all here - well, the centre bit is. If you need something else, let me know what bit specifically.

https://gist.github.com/lwsrbrts/03a697d23a0cdf6fa46898b54dbdf44c

Should give you this:
image

Thanks

from hassio-ecoflow.

carfnann avatar carfnann commented on June 27, 2024

lwsrbrts many thanks for what you have shared! I have been able to add my SHP to HA. thanks very much
can I ask you if you can share you dashboard yaml ? I have added the jinja part but I would love to have the same look and field and features as you.
thanks

I believe it's pretty much all here - well, the centre bit is. If you need something else, let me know what bit specifically.

https://gist.github.com/lwsrbrts/03a697d23a0cdf6fa46898b54dbdf44c

Should give you this: image

Thanks

I have integrated this part, but I'm missing the left and right part of your dashboard. and especially how you managed to click on a circuit and have the dedicated page for it (for left and right part ;) ).

from hassio-ecoflow.

carfnann avatar carfnann commented on June 27, 2024

I've updated the gist to include the raw configuration of that entire dashboard including the sub-views (the individual circuits). I use apexcharts card extensively and it is highly likely there are some custom sensors that aren't defined for you. If you need the yaml for those, let me know the names of the sensors that are missing for you and i'll dig them out of my config.

https://gist.github.com/lwsrbrts/03a697d23a0cdf6fa46898b54dbdf44c

a million time : THANK YOU !!!

from hassio-ecoflow.

theneochan avatar theneochan commented on June 27, 2024

Hello, if anyone has to time to help me I would very much appreciate it. I'm hoping to control my SHP charging and discharging to make the most of variable electricity tariff.

I'm completely new to MQTT.
I've go through this thread and tried to follow the tips from lwsrbrts

I have all the SHP entities now in HA but they are all unavailable. I suspect MQTT is not connecting to Ecoflow but I have no idea how to test that.

I have a file \share\mosquitto\mosquitto.conf only adding my ecoflow username, password and SHP serial number to the code I coppied from here.
Screenshot 2024-04-08 221931

I have added

homeassistant:
packages: !include_dir_named packages

to my main configuration.yaml file and added yaml file in /packages

As I say I think this part has worked as it has created all the unavailable entities in HA.

Many thanks,

from hassio-ecoflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.