Git Product home page Git Product logo

Comments (23)

mmiller7 avatar mmiller7 commented on August 30, 2024 4

I think I finally got the MQTT stuff working after a solid 3 days of digging deep into it. And I am reasonably happy with the results, aside from the fact it uses TheCloud and not local control (this will be my first ever not-local-control IoT device).

I've tried to document my efforts on my own GitHub: https://github.com/mmiller7/ecoflow-withoutflow/tree/main/cloud-mqtt

But I'm overall pleased:
image

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

The v3.0.1.11 update for WiFi seems to be what breaks the integration (closes port 8055). That firmware only applies to DP units with certain WiFi chips (not all units have the same WiFi chip). But may only be a matter of time before an update closes the port on units as yet unaffected...

from hassio-ecoflow.

merlin-zaraza avatar merlin-zaraza commented on August 30, 2024

@Ne0-Hack3r Got it. Somehow Ecoflow mobile app works, maybe you can figure out how? Thanks

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

@Ne0-Hack3r Got it. Somehow Ecoflow mobile app works, maybe you can figure out how? Thanks

The app works locally over Bluetooth or 'direct wireless' (ad Hoc), depending on the device, so it does not appear to use the local TCP connection that was open on some devices (at least not anymore).

Over WiFi the device communicates with a cloud server and will retrieve or publish MQTT messages on a set of defined topics. The app, in turn, communicates with that same MQTT server and, using MQTT messaging, exchanges status, settings, commands, etc.

Others, including myself, have begun tapping into the MQTT data as an alternative method of integration (though less elegant and more labor intense than using this integration to be sure).

Maybe EF will eventually have an advanced setting that allows us to enable port 8055 for specific IPs (like the IP of the HA server) so we can have private local integration without the security concern of having a wide open port...

from hassio-ecoflow.

garithd avatar garithd commented on August 30, 2024

Anyone care to share their HA MQTT "workaround" config?

from hassio-ecoflow.

mmiller7 avatar mmiller7 commented on August 30, 2024

I'm experiencing the same thing with a Delta Max 2000. Add is hanging forever spinning.

This is the first I've seen anything about MQTT, I would be interested in any info people have on that...suppose I could MITM and Wireshark it and speculate whether it's using SSL or not but if someone has a guide that would be even easier.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

Check out this thread if you want to attempt MQTT integration... there are a number of steps and pieces involved...

v1ckxy/ecoflow-withoutflow#1

from hassio-ecoflow.

mmiller7 avatar mmiller7 commented on August 30, 2024

Check out this thread if you want to attempt MQTT integration... there are a number of steps and pieces involved...

v1ckxy/ecoflow-withoutflow#1

Thanks - I'm making a bit of progress...at least got a script written to reliably fetch credentials for MQTT. Now just have to work out what data exists, and what data I care about.

Most people seem to not have much info about sending control commands yet, bit of a bummer. Would be cool to like have it command the Ecoflow to begin charging when there's a storm approaching so it can be stored at like 75% but topped up ahead of bad weather, and then brought back down again (running the inverter or something to bring the % back down faster)

from hassio-ecoflow.

mmiller7 avatar mmiller7 commented on August 30, 2024

Check out this thread if you want to attempt MQTT integration... there are a number of steps and pieces involved...

v1ckxy/ecoflow-withoutflow#1

Seems like Home Assistant only allows one MQTT connection...so that may be a dead-end since I already use MQTT for things on my own broker.
image

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

Most people seem to not have much info about sending control commands yet, bit of a bummer. Would be cool to like have it command the Ecoflow to begin charging when there's a storm approaching so it can be stored at like 75% but topped up ahead of bad weather, and then brought back down again (running the inverter or something to bring the % back down faster)

There are lots of clues in that thread... though I don't think anyone has published an actual list... If you setup MQTT Explorer and watch the ../set topic for the given device while changing settings in the app you can start collecting the payloads required to make changes using HA...

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

Seems like Home Assistant only allows one MQTT connection...

I have not gone down this road, yet, but it is my understanding that the Mosquitto Broker can support multiple bridges... I imagine you'd want to be careful about mapping to unique local topics to be sure messages to/from the disparate MQTT servers are routed properly...

This thread might point you in the right direction:
https://stackoverflow.com/questions/48982780/bridging-an-mqtt-broker-to-2-remote-mqtt-brokers-simultaneously

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

Nice... I see you're making good use of the multi-entity row module as well (I just discovered it recently myself)...

from hassio-ecoflow.

mmiller7 avatar mmiller7 commented on August 30, 2024

Nice... I see you're making good use of the multi-entity row module as well (I just discovered it recently myself)...

Yes, I have also learned about SO many new template integration functions this past 3 days that I never knew previously existed!

Also learned on the "Glance" card you can put other stuff like "name" or "icon" in the YAML just like the Entities card, it just doesn't have a UI editor to populate the fields. I have much more verbose names "under the hood" but simple names on the display.

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

Also learned on the "Glance" card you can put other stuff like "name" or "icon" in the YAML just like the Entities card, it just doesn't have a UI editor to populate the fields. I have much more verbose names "under the hood" but simple names on the display.

Cool... I'll have to look into that one... Yes, this project has immersed me in JSON, YAML, and much more of what can be done with HA... a bit of a learning curve at first but I'm quickly becoming much more comfortable and advanced...

from hassio-ecoflow.

skpow55 avatar skpow55 commented on August 30, 2024

from hassio-ecoflow.

STaN33130 avatar STaN33130 commented on August 30, 2024

I think I finally got the MQTT stuff working after a solid 3 days of digging deep into it. And I am reasonably happy with the results, aside from the fact it uses TheCloud and not local control (this will be my first ever not-local-control IoT device).

I've tried to document my efforts on my own GitHub: https://github.com/mmiller7/ecoflow-withoutflow/tree/main/cloud-mqtt

But I'm overall pleased: image

I just install it a big work ! I have a question, is it possible to control the switches like AC output on your configuration or no ?

from hassio-ecoflow.

mmiller7 avatar mmiller7 commented on August 30, 2024

I just install it a big work ! I have a question, is it possible to control the switches like AC output on your configuration or no ?

Yes, that seems to work. I had to use the advice in this thread to use MQTT explorer to capture the commands my Delta Max uses for the on/off from the app so I could re-play them correctly from Home Assistant as a template-switch action.

All the sliders, switches, and option-selects in the screenshot I was able to get working for my Delta Max by carefully capturing each app-action in MQTT explorer and writing a template/script to replay the right commands to the same MQTT topic.

I don't know if it may change what is sent for each model battery

from hassio-ecoflow.

STaN33130 avatar STaN33130 commented on August 30, 2024

i probably have made a mistake because when i click on a switch in HA, nothing happens in EF app. But when i click on a switch in EF app, no problem to see it in HA. I think there is a problem with the MQTT publish (but it's probably my fault!... I'm a MQTT noob)

from hassio-ecoflow.

mmiller7 avatar mmiller7 commented on August 30, 2024

i probably have made a mistake because when i click on a switch in HA, nothing happens in EF app. But when i click on a switch in EF app, no problem to see it in HA. I think there is a problem with the MQTT publish (but it's probably my fault!... I'm a MQTT noob)

If you have a different model than the delta max it might use a different command. May have to figure out what it sends from the app and modify the switch sensors

from hassio-ecoflow.

STaN33130 avatar STaN33130 commented on August 30, 2024

you're right. I have a Delta 2 with extra battery and a River 2 max. Most of the sensors are different compare to your battery. Thank you for your help

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

you're right. I have a Delta 2 with extra battery and a River 2 max. Most of the sensors are different compare to your battery. Thank you for your help

Delta 2 operates quite a bit different than Delta Pro / Delta Max - I have a full package built for Delta 2 and I ended up using a "workaround" where anytime any sensor is updated, and D2 publishes that change, one automation publishes a 'request for all states' to ../get and another automation re-publishes the resulting payload with 'state of everyting' from ../get_reply to ../status - thus I built most of my sensors around data in ../status -- still feel a bit kludgy but when I tried building all sensors around the data periodically published by D2 I ended up with a lot of sensors that sat for long periods of time in "unknown" as the D2 only appears to publish the state of certain sensor when/if they change... In contrast, Delta Pro, for example, publishes the state of all sensors for a given module (EMS, BMS, Inverter, MPPT, etc.) frequently (every 1-5 seconds) so as long as you build sensors with logic to capture the desired data "if" it exists in the payload everything populates quickly and stays up to date...

It looks like, in the case of all EF devices I've looked at thus far, the native app will query for 'state of everything', populate the data into the app and then watch for changes as published... This is a bit tricky for HA and could require a lot more code/logic to implement... So, unless/until I or someone else discover a better way to populate HA sensors given this behavior I'm using this workaround...

from hassio-ecoflow.

Ne0-Hack3r avatar Ne0-Hack3r commented on August 30, 2024

@STaN33130

Have a look at:
v1ckxy/ecoflow-withoutflow#1
v1ckxy/ecoflow-withoutflow#6

from hassio-ecoflow.

STaN33130 avatar STaN33130 commented on August 30, 2024

Cool thank you for your help !

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.