There are a few projects out there that connect directly with your inverter to get some data. Someone over on DIYSolarForums asked if there was an API for the web. There's only a B2B API at the moment, so I decided to write a Python wrapper for people to be able to query their inverter and battery data vis the web (Monitor.eg4...).
Then I decided to use that to try to create my first Home Assistant integration/Custom Component. Note that I only have access to a single 12000XP so YMMV!
....
ok so the first attempt at custom integration has started...Feel free to try it out
https://github.com/twistedroutes/eg4_inverter_ha
using the api from
https://github.com/twistedroutes/eg4_inverter_api
Done:
ToDo:
Really appreciate this! Happy to help package for HACS or just buy beer.
@galvan TY. I think much more testing and a bit more development is require before HACS. Hoping some people try it out so I can make it useful for people other than myself 🙂
I'll be checking this out! I have a Flexboss21 so not sure how much will work 1:1, but will find out.
I can confirm this works with Flexboss18! Thanks SO much for this work!!!
I just wanted to say thanks for this and I can confirm it works with my GridBoss and FlexBoss 21!
Nice work! You might take a look at Python Protocol Gateway( https://github.com/HotNoob/PythonProtocolGateway ) to see if there's anything missing in your implementation. I'm using PPG with my EG4 18kPV inverter sending MQTT messages to Home Assistant. I have PPG running on an old Raspberry Pi connected to the EG4 via USB-RS485 cable.
Interestingly, on my 18kPV TRadiator1 runs hotter than TRadiator2.
@lemming I've been using Python protocol Gateway(PPG) to talk to my EG4 18kPV and since it exports MQTT I'm pulling in the data to Home Assistant from MQTT.
I like the familiar animation/dashboard so might have to pull that in and setup all the data points. I also have YAMBMS running between my batteries and EG4 so i have lots of battery info too.
Thanks for pointing out the Lux Power Distribution Card.
@lemming regarding getting the Update Time data from Python Protocol Gateway, I didn't find it in the spec( EG4-18KPV-12LV-Modbus-Protocol ) for things from the inverter and don't see it in the MQTT message just to see if it's outside of the message list stated in variable_mask file. But sounds like a message which might be of interest to others so I'll ask the PPG developer.
@dougl For you it would be something you'd probably just have to code as it's not one of the data points for what you're using. You can also just remove that entry. I just thought it may be nice to see when the monitor.eg4electronics.com site updates the data.
You'd just remove these fields if you want to remove it:
update_time:
entities:
- sensor.
show_last_update: true
And it'll remove it from the card.