+1 for that!
I am in a similar situation. I installed a modbus meter which I wanted to hook up to the inverter. Unfortunately it did not work. It seems that only very few non-SE meters are supported by the inverter. My meter (bernecker MPM) obviously recognized as modbus device by the inverter, but does not provide required/neccessary information (possibly wrong register) to the inverter and consumption stays zero all the time.
Im currently feeding the meter values into openhab and I was also thinking about (re)writing the neccessary registers to the bus in order to make the inverter recognize it. I guess this is technically possible but Iām not familiar enough with Modbus to achieve this.
I guess not many people are in this situation, since I did not find anything on the web about this yet.
If anyone can help or has an alternative idea, that would be great!
Hi all
Before I go too far down the rabbit hole, can I ask a dumb question; Iāve got an SE5000H which is connected via wifi for the solaredge server uploads, from where I then use the API to belatedly get my data; can I keep doing this if set up with modbus TCP, or is it a choice of either/or?
The modbus TCP can only be done via ethernet cable correct, not wifi? If I have to connect via ethernet I assume youād have to set the LAN to ethernet as well, negating the wifi?
As per the last two posts, Iād be interested to see if data can be fed back in as sunspec protocol, that could potentially open up using all manner of cheap non-sunspec meters, eg. the PZEM range (PZEM-004, 016, etc)
I think what you are suggesting is to have openHAB emulate a meter?
As I understand the setup to be emulated - the inverter is acting as Modbus master to read a meter, which is Modbus slave. Modbus is not peer-to-peer, it is master-slave.
The existing OpenHAB Modbus binding is only capable of acting as Modbus master - it cannot be used to emulate the meter directly.
That doesnāt mean it canāt be done - but you would need some new specialist āslave modeā script or binding to do it.
The Modbus binding does provide a development interface for āadd-onā device-specific bindings that use the underlying mechanics for the protocol.
I would guess the base binding would still need changes though for master mode.
It is possible in Modbus-TCP in general for one box to act as both master and slave to different partners.
This is not really workable for Modbus-RTU over serial - one bus should have one master.
But a single box can provide multiple serial buses and/or LAN. I expect this is what the inverter can do, and so can openHAB.
It was more a question from the solaredge perspective, Iām still rather lost in the documentation as itās all new to me but to my reading it will only do TCP over ethernet cable, not over wifi? Also questioning whether it will do both the solaredge portal comms AND TCP, or whether you only have an either/or option; Iām wanting to retain the solaredge portal as the primary, but have the option of querying the inverter directly.
Hmm, digging deeper into the documentation it appears that it should do both TCP and portal comms, if you enable modbus TCP on the inverter it will default to port 1502. All docs only talk about using ethernet, but as the wifi option is apparently only available for EU and APAC I wonder if it does work over wifi but just isnāt documented? Might be worth a test.
(actually it says port 1502 in one place and 502 in another, but the config screen should show the port anyway)
RE: emulating a meter, Iād be happy to have a different hardware connection on RS485 acting as a slave, but have no idea how to set this up or configure the data to be in the right sunspec format.
My experience getting real-time data from my SolarEdge inverter via Modbus TCP has been bumpy.
Initially, things worked super great and I was pumped at how (relatively) easy it had been to get things working!
Then I started getting tons and tons of repeated āconnection refusedā errors.
I suspect what happened is that OpenHAB rebooted, or maybe I had a network interruption, and during this time, the inverter Modbus TCP server timed out (2 minutes, apparently), and stopped accepting connections?
Or maybe I restarted the inverter (donāt do it frequentlyā¦) and thatās when the MB TCP server timed out?
In any case, tonight I went out, killed power to the inverter, powered it back on, and then within 2 minutes, re-implemented my Modbus thing in OH that reads data from the inverter. Poof. Everything worked.
So my questions are:
does anyone know when the SE inverterās 2-minute Modbus TCP server timeout applies? Do you just need to connect within the very first 2 minutes that the inverter is powered up, and then you are good? Or do you need to connect every 120 seconds, else the server goes idle and stops accepting connections?
is there any way to reboot the SE Modbus TCP server without cycling power to the inverter altogether? (i.e. with a handy-dandy OH rule???)
any thoughts on a rule on detecting repeated modbus refused connections with an OH rule? Iād love to send a notification via Prowl in this case.
You can certainly detect errors and run rules to ādo somethingā, like messaging.
I cannot help with what the ādo somethingā ought to be for Solaredge recovery.
I expect youāre doing this already, but make sure your router DHCP is set up to issue static IP addresses to to openHAB and Solaredge, or set fixed addresses in them, in case the ālossā was due to unexpected IP change.
Iām considering to get a Solardge inverter, too (an SE7K), and also stumbled across this.
The SunSpec doc says to connect using Modbus/IP via physical Ethernet. Inverter docs say thereās an internal Ethernet port and the option for a WiFi module.
The box however is said to be setup using WiFi only - the āSetAppā app is said to use a local WiFi between your box and your smartphone. But I have not seen any mention of how to configure that WiFi on the inverter to use DHCP w/ an Internet router for regular operation.
Could someone to run OH with any of these boxes clarify if I can actually make USE of WiFi instead of Ethernet ?
I just tried to enable Modbus on my wi-fi enabled SolarEdge inverter but I get the error āDisconnectedā which according to the doc means the ethernet cable is not connected so looks like you canāt setup the connection without hard wiring.
Thanks for checking out. Which model is that ? Am I correct in assuming you do NOT have the āWiFiā option?
Iāll never understand HVAC engineering people I think. I have a ventilation unit (marketed with a cloud monitoring, even for free) but again Ethernet only. All of these to be placed in a location (basement or attic) where really noone has prepared for a cable. WiFi is so much more the obvious choice as it does not require deploying another cable. Cheaper even, price of some ESP8266 is well below $10.
But this now is really topping it. They have even added WiFi for sake of an easy setup but you cannot use it ??
Itās a SE7300. I do have the wifi option which is how it communicates with the solaredge mothership and enables the smartphone app. Iām going to run an ethernet soon as I currently use the solaredge binding but it only refreshes every 10min and every now and again the solaredge mothership has issues updating.
Now you left me even more confused.
The SetApp requires the inverter to have WiFi so there must be WiFi inside even if you donāt get the WiFi option, right?
I found the following saying WiFi IS in and just requires an antenna ?
What do you mean by āmothershipā - a cloud portal ? Some other local device ?
I thought the binding would connect to the inverter and not to some cloud server ? And you cannot configure it how often to refresh ?
Sorry if that sounds silly but for someone to not have these devices yet thatās very confusing.
Markus, maybe you should consider SMA inverter insted, theyĀ“re even german
They have both WiFi and ethernet. (Their TPL inverters might have WiFi as optional. But my SMA Sunnyboy Storage 2.5 has both ethernet and Wifi as default. (I only use ethernet for my SMA inverters though)).
Yes, the mothership is a cloud portal that was also developed so that installers can monitor their clients and get alerts for bad panels, etc.
There is another SolarEdge binding that essentially polls the cloud portal using an API key but it has been restricted by SolarEdge to stop people smashing their servers. By using the Modbus binding you can go direct / local. While the doc mentions wifi you do need the aerial and all the setup can be done direct on the inverter screen so possibly you donāt even need it to connect to the internet.
Bottom line is that you will need the ethernet cable plugged in for the Modbus TCP to bind to, possibly you can stick the other end into a powerline or wifi extender if you canāt physically run an ethernet cable to your router.
There seems to be no binding for SMA inverters, just hand-scripted stuff ?
Well the real problem in Germany is that you cannot simply compile components on your own but have to take what your PV supplier offers in his bundle, and for my preferred supplier thatās a Solaredge device.
Another offer used a Kostal inverter (German, too, and thereās a binding available, too).
Ah, that now helped me understand. Thanks.
So I will want NOT to get the WiFi option or use the builtin WiFi (which is there for newer devices for the sake of an easy setup) because that would make me depend on their cloud portal.
Instead Iāll use this binding here to read the local Modbus. And that would NOT work via WiFi even if I had the WiFi option so I need to connect to Ethernet for this.
Most likely Iāll place the inverter next to my switch anyway.
Anyone without Ethernet in range can use a WiFi repeater - I also do that already with another Modbus-Ethernet-only unit I have for ventilation, installed in the attic.
I have a Kostal inverter running, but itās a smaller version which has a different interface than needed for the Kostal Binding The I also sought to interface via the RS-485, but thats also not so easy.
One year late I installed some more solar at another place with a Growatt inverter, again different interface.
So I decided not to hazzle around with all the different interfaces and just put a power meter with 2 clamps into my central E-distribution. It sends the data via MQTT to OH and is based on an ESP32.
So the current solar gain can be used by OH. If I want more statistics and history data, I still can interface with the inverters via thei web interface.
This is what I have done, and itās working well. You should be able to pick up a very cheap WiFi router that can attach to your main network for very low cost - maybe $10 USD if you pick up a used router.