-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add consumption sensor #157
Comments
If the data can be called with an APS command I could add it, even without owning an ECU-C myself testers could confirm all is good when implementing. At the moment it is unknown with which APS command this data can be called. |
Is there a website where I can research/get information about APS commands? I am a computer programmer and I would like to be able to investigate the subject. Greetings and thank you. |
Just dropping a note that I'd be happy to help with the testing too as I own an ECU-C. |
I've tried the steps from #91 to grab the data from my ECU-C, and command 53 does not seem to include the consumed power (only produced): I guess the key thing would be to find which command retrieves the consumed energy. |
This could also be useful: http://<ecu_ip>/index.php/hidden/ . It list a set of internal URLs which provide additional info. This is quite interesting as it seems to display a record of all the internal transmissions: http://<ecu_ip>/index.php/display/record The latest record seems to match what the ECU graph is showing for production and injection: There is no consumption reported, as it's logically derived from the production minus export. |
Actually the response already includes the Produced and Exported values: And the response:
Produced = meter_data > power1 > powerA = 2156 W |
Bonjour, 1 rennais35000 On récupère ainsi le courant importé et exporté. C’est qui m’intéressait le plus pour pouvoir activer des relais pour piloter mes appareils." Comment peut on faire pour HA ? |
I toyed with the idea to implement a proxy between the ECU and EMA website as this is probably the most stable and generic solution. Maybe you could use some of it. I'm pretty busy so I can't do much with it. I need help with the data interpretation and the further development to sensors. I'm currently running this proxy 24/7 alongside the integration and it works super stable. https://github.com/HAEdwin/APsystems_ECU2EMA_proxy |
@HAEdwin I'm giving it a try. So far I've installed Adguard and followed the instructions from your link to install the proxy, although I'm getting an error after restarting HA. I've raised an issue on the proxy project itself to avoid missing stuff. I'm new to your proxy, Adguard, APsystems and HA, so be patient please :) Is the info from the sensor supposed to appear somewhere in HA or shoul that be directly in the logs? |
I'm also interested in this. Not sure if anyone is aware, but there's straight JSON available at http://IP/index.php/meter/old_meter_power_graph |
Thats's great. Thanks for sharing! I ended up using the internal display records from http://<ECU_IP>/index.php/display/record and a scrape sensor: Select:
Value template:
This gives me the imported/exported energy, and based on that I enable/disable some appliances: |
Hi, Tediroca. Could you tell us how to add that sensor to HA? I go over the top in HA but I don't know how to include that sensor. On the other hand, I notice that the sensor that you have included gives you the imported/exported energy but at least I am looking for the energy that your house is consuming. Do you know how to get it? By the way, this topic is also found in the following discussion: #91 And for the creator of the plugin (@HAEdwin ), do you think this sensor can be added to the plugin itself? Regards, and thank you very much. ------------------------------------------- Spanish Por otro lado, observo que el sensor que has incluido te da la energia importada/exportada pero al menos yo estoy buscando la energia que esta consumindo tu casa. ¿Sabes cómo obtenerla? Por cierto, este tema se encuentra también en la discusion siguiente: #91 Y ya para el creador del plugin (@HAEdwin ), ¿Crees que se podrá añadir este sensor en el propio plugin? Un saludo y muchas gracias. |
I'm in the process of creating power and energy sensors for HA from the CT clamps. |
I'd be happy to help you test implementing this via the TCP socket. Here's a dump of the ECU-C with CT clamps enabled:
Maybe we can chat on discord and debug this in realtime. |
Found the CT energy meters: |
This queries the ECU: |
What I'm looking for (ordered by prio) is:
Thanks for the mapping table, this could help give clues to find the "energy consumption total" in the data the socket returns.
Both app and web UI.
This solution returns the last measured power per day, not energy. There is however a way to get the energy per day in the same way (http://<ECU_IP>/index.php/meter/old_meter_energy_graph), but since it is both a net meter (can go up and down) and daily (so it resets to 0 at night) it is really hard to get a reliable total production and consumption meter (which the Energy Dashboard requires) from that data. Could not find a rest interface for the totals unfortunately. The web page in my comment above does provide this, so this with a few scrape sensors is a reasonable way to solve the need and create a reliable energy dashboard. |
Updated my Gist. It now also contains energy sensors for use in the Energy Dashboard of Home Assistant.
All these sensors have state_class: total_increasing. This means they contain positive, increasing values and will never reset. Have fun with your new Energy Dashboard! |
If I was to copy this for my own use, can you think of what values I'd need to change? Obviously the ECU IP will likely be different. I also see ECU ID which I imagine needs to be changed... Any others? |
Nope, that's it! |
Hi! sorry for the beginner question, but I'm trying to apply that YAML file and I'm not able to do it. Could someone explain to me how to do it? I've looked into everything I could in the Home Assistant documentation (I've tried including it in configuration.yaml in all possible ways). Thanks in advance. |
No problemo.
If this does not work, I would recommend checking the logs and removing some of the contents to see what is causing the error. |
It worked!! Thank you very much!!!! |
You are the boss 👍 BR |
Since people find this useful, I'll give reading these values from the socket another try, so I can get this merged into this repo. The more I understand of APSystems hardware, the more enraged I become, so no promises. |
Indeed, there is reason to be a little confused. It is possible to receive a lot of data via Modbus, but I am not sure it is possible to get the values of the CT, they are however "essential". However, with the current script, I have a strange behavior, at night, the system records a very light solar output 0.01KW while this value is 0 in the EMA APP. Any idea what that behavior was? |
I have the same issue, but for me the value is 0,002kW. The reason is that the ECU rest API still really does report this value at night:
I assume this is really just a calibration issue in the ECU, so I don't really want to fix that in my scripts, since it can vary per ECU. There are CT clamp calibration settings in the ECU at http://[ip]/index.php/configuration/meter, but I don't feel comfortable editing those myself. I learned to live with it, but if you are able to get the values calibrated I'd love to hear it. |
Thank you for the feedback, it would be interesting to get some feedback from other users to determine the importance / average of "drift" in the worst case, we could via the code, consider that anything below the drift value is considered to be 0 Calibration requires a constant and calibrated source of voltage/current, which is not within everyone’s reach, I guess APS use a filter that probably only considers a value above a certain threshold to be considered "real" That said, the script works very well as it is, and you can easily live with this micro production at night, we only have to say that it is induced by the light of the full moon :) |
{"time":1701213125000,"powerA":11,"powerB":0,"powerC":0},{"time":1701213427000,"powerA":11,"powerB":0,"powerC":0},{"time":1701213728000,"powerA":11,"powerB":0,"powerC":0},{"time":1701214029000,"powerA":11,"powerB":0,"powerC":0} |
Hello, I am interested in integrating consumption and production values. Have you managed to do it? Thank |
read above :) |
Hi,
Ecu-c have two clamp meters. One that measures the generation of the solar panels and another that measures the consumption of the house.
It would be nice if the sensor that measures the consumption of the house could be included. Would it be possible to include that sensor?
If I need to become a tester, no problem.
Thank you so much
The text was updated successfully, but these errors were encountered: