Existing projects do give guidance, but you need an entity that measures energy in kWh and meets the definition for long term statistics Sensor Entity | Home Assistant Developer Docsand has the state_class of total_increasing.
I’d not recommend to use the current Fronius integration as example as it uses some deprecated HA functions (eg. yaml configuration).
That said going through mqtt is probably a good idea as it is well supported by HA (including discovery).
With Modbus you may run into troubles when you use pymodbus and the core Modbus integration requires a different pinned Version than yours at some point.
How can I troubleshoot the Energy dashboard if something is not working? In my case the carbon footprint is not working/not shown in the Energy dashboard.
I have setup the CO2 Signal integration and the 2 created sensors of this integration work fine and show data. Within the Energy dashboard configuration I have added the CO2 Signal integration at “Grid carbon footprint” 3 weeks ago, but the data is still not visible in the Energy dashboard.
Thanks for that. Ideally it should detect the system automatically. We have mDNS as well as uPNP. Once it has detected the device, we can connect either to MQTT or modbus-tcp. Until recently modbus-tcp was preferred because the MQTT integration was somewhat CPU heavy.
An absolutely insane amount of things can be accessed through MQTT or modbus, and not every system will have everything. For a start, I will likely have to expose the system energy counters, which is currently logged only to our own telemetry platform (VRM) and not exposed to other systems.
@dbrunt , the region is available (the Netherlands), also visible on the electricitymap website. The sensors of CO2 Signal are giving the correct values, it just doesn’t work with the Energy Dashboard and I cannot find out why…
In case you haven’t tested this since you posted last, the Smart Meter Texas integration is working again. Just need to be on 2021.9.0 at least. I currently have my setup and working in the Energy dashboard.
I’ve done some coding to take a steam from an Enphase system and feed it into HA via mqtt - you may be able to modified it to suit your Victron GX-device if it has a mqtt stream.
Hey, thanks for that. I already found the shiftr component which uses a similar way, also using paho. But I will probably not go that way. It seems far easier to just program our mqtt component, which happens to be a project I maintain, to do MQTT Discovery. Then you can either use the Mosquitto server on our GX device, or bridge the two, and it will just work.
The more challenging part now is to create the energy counters. Because our systems are insanely flexible. You can use a Carlo Gavazzi modbus-rtu connected meter to measure your energy, or you can use the inverter itself, your PV can be AC-coupled or DC-coupled, some managed batteries (those with a BMS) have their own energy counters, some people use a shunt (BMV-7xx or SmartShunt), for others we have to calculate it… and if there is a grid outage the Carlo Gavazzi loses power and you lose that counter…
So the actual interface to HA is easy now. Getting the data is now the hard part
Anxiously waiting for to to get your input meter sensor!
Without knowing what’s actually under the hood, I think you definitely want Return to Grid which looks to be absolute value(s). What shows up in the Energy Panel remains to be seen but as far as dials and graphs, you can do whatever your heart desires in Lovelace! As for Solar Production, I think you want that also since Return to Grid is not necessarily just solar…could be any entities. Plus it gives you Solar Forecasting…