Hi all,
I have a Solaredge SE10k inverter with a BYD battery installed which I want to monitor with OpenHAB. The inverter and the meter are beeing found via the Modbus/Sunspec discovery just fine (had to tweak the “time between transactions” a bit to make the solaredge happy, but nothing serious).
However, the values for the BYD battery are not discovered. I know that they are there, because if i run the “Solaranzeige” (Docker) project against my solaredge endpoint the battery values show up.
What would be a sane way of getting the battery data in openhab:
run a modbus poller alongside the sunspec discovery?
make a feature request for the modbus-binding to include it in the discovery process?
Of course i could run the above project and export the data via mqtt into openhab, but that doesn’t feel quite right…
Unfortunately I lack php skills to fully understand how the “solaranzeige” project gets the data, I can’t even figure out what modbus- ids they are using…
any hints are appreciated.
Update: I’ve read the sunspec documenation from solaredge, apparently the battery values are not part of the sunspec standard. I will try to reverse- engineer the Modbus IDs and implement it “by hand” via a poller. Will post here when I succeed.
Sorry, don’t know the Battery2 values. I reverse- engineered the above from this project: GitHub - DeBaschdi/docker.solaranzeige
That’s the dockerized setup of a german project (Solaranzeige / PV-Monitor - Solaranzeige). It is kind of open source and community driven, but a) the code quality is suprime and b) the project owner has some strange views, like he doesn’t want code to be publicly viewable in a repository (wtf?).
The values should all be in www/html/solaredge_serie.php, you have to find your way from the offset Modbus readings for Battery2, don’t rely on the values in the comments, they are copy/pasted and inaccurate. It’s messy, but the info should be there (whereever it comes from).
Just had a look in the files (don’t remember so good, because thankfully my wife did most of the reverse- engineering): the Battery2 values should start at 0xe200 / 57856, grep for Battery2 in the php and work your way up for the values.
Running the docker against the solaredge and “watching” it with wireshark also works well - wireshark has a ModBus TCP decoder builtin. Good luck.
There’s some (thin) evidence that only 2 batteries are accessible this way. (eg: that battery3 would not be @ b1 + 0x200). Since the HD Wave inverters support up to 3 batteries that would be curious. It won’t impact me since I’m only getting 2 but still curious.
I also found it odd that the battery data are little-endian. Everything else is big. Makes me think the inverter is just dumping battery-composed data into its address space and the battery designers went LE. Makes it all more phun I guess!