EG4 Community Forum

EG4 Web API and Hom...
 
Notifications
Clear all

EG4 Web API and Home Assistant

1 Posts
1 Users
0 Reactions
11 Views
(@twistedroutes)
Eminent Member
Joined: 3 months ago
Posts: 17
Topic starter  

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:

  • Inverter Runtume
  • Inverter Energy
  • Inverter Battery Data
  • Inverter Battery Unit Data
  • Inverter Read Func, Hold and Bit Parameters
  • Inverter Write Hold Parameters

ToDo:

  • Inverter Write Func and Bit Parameters
  • Obtain Value Limits for write functions
  • Build some example dashboards
  • Add Home Assistant ability to change values
  • I've got to write up some tests
  • validate the data scaling (e.g. where EG4 provide 5100 to represent 51.00 V),
  • create a few more virtual sensors (a sensor made from other sensors data, like capacity in KWh = voltage and capacity in amp-hours).
  • Then add some switches and inputs to change data
  • Then add an example dashboard (though this data can already be used in the Energy dashboard)
  • This can be loaded into your .homeassistant/custom_components (or wherever your custom_components folder is).
  • I dunno... whatever I figure I need at the time.
image
image

 


   
Quote
Share: