For my Solaredge inverter the TCP Modbus Port was 502 by default. Please check if yours is actually at 1502…
Other than that, i can recommend MBMD to read from Solaredge inverters via Modbus and pipe the data into openHAB via MQTT. MBMD is helpful to present them via MQTT with the homie standard, so your channels will be autodiscovered. It also good to test basis connectivity, if nothing else.
Best, Thomas
Here‘s how my basic /etc/mbmd.yaml config fiile would look like to read from SE:
#REST api, use 127.0.0.1 to restrict to localhost
api: 0.0.0.0:7071
rate: 3s
# mqtt config
mqtt:
broker: localhost:1883
topic: mbmd
# user:
# password:
clientid: mbmd
qos: 0
homie: homie
# adapters are referenced by device
adapters:
#- device: /dev/ttyUSB0
# baudrate: 9600
# comset: 8N1 # "8E1" needs be quoted as string or will error
- device: 192.168.x.y:502
rtu: false # Modbus RS485 to Ethernet converter uses RTU over TCP
# list of devices
devices:
- name: pv
type: sunspec
id: 1
subdevice: 0
adapter: 192.168.x.y:502
- name: grid
type: sunspec
id: 1
subdevice: 1
adapter: 192.168.x.y:502
You can watch it work using it‘s inbuilt webserver at localhost:7071. Just comment out the mqtt section if you don‘t want mqtt.
My default port is 1502 in the inverter. I even tried to change it to 502, does not work. I have power cycled the inverter, nothing is changed. I need to say, my inverter is not connected by Ethernet, only though WiFi. Could this be a problem?
I have power cycled the invertor several times, changed the port to 502 on the inverter and mbpoll too, played with RS485-1 and RS485-2… nothing helps.
Looks like Inverter problem? Is there someone having similar Inverter?
I don’t want to connect the Inverter over ethernet, as I am afraid of Thunderstorms.
Can you see Data from your inverter via the mySolarEdge app? That at least would show that the inverter is connected via the Wifi and it’s just Modbus being difficult. Also, can you verify that 192.168.1.105 is indeed the correct IP-Address for the inverter? Are you using DHCP? In that case you should set a static mapping for the MAC address of the inverter. Can you ping the interverter? Only if those things work try to debug the Modbus connectivity further.
yes, I can see the inverter data + monitoring through mySolarEdge app (wifi) + on the monitoring portal
yes, I am using static addresses for all my connected devices (mikrotik) and I am sure the IP belongs to inverter
yes, I can successfully ping my inverter
Before I have checked the inverter with mbpoll, i have disabled the OpenHAB MODBUS addon.
Will it help to find if the port 1502 is open? In manual, they wrote, the inverter is waiting for connection, so I am not sure, if the port is open from beginning.
Hi Jonathan,
yes, I saw it. I did try after power cycle, but nothing has been changed.
is your Slave ID value = 1? are my things parameter same like yours?
Luckily I have an LCD on my inverter where I can check the status of the Modbus and it switches between “clear” and “connected” regularly according to the polling cycle of the OH modbus settings. Is this also visible in the SetApp?
Thanks Jonathan,
this looks pretty the same like mine/standard ones. Except the port, as I red that for SetApp Inverter standard is 1502.
I haven’t seen any Modbus Statuses in SetApp.
Is your connection made Wireless, or Wired?
But what difference would that make? This should just affect the transport layer, not the application layer…
Maybe you can ask SolarEdge directly? For German users they have a very good support in Munich - I recently talked to them to fix some setting in my direct consumption settings and they answered very quickly via email and telephone.
Yes, I have done that earlier today, but it looks like very general answer, all the stuff are already in the SE Sunspec PDF note:
For MODBUS over TCP Configuration:
MODBUS/TCP uses the standard 100 Mbps Ethernet media in physical layers to carry the MODBUS message handling structure.
Here, it is used for remote 3rd party monitoring and control. MODBUS TCP is agnostic of the server connection.
It works only over LAN. When configured, MODBUS TCP does not initiate a connection. The server waits for a client to connect. Only one connection is supported.
To setup MODBUS TCP:
Select Communication → Modbus TCP port ->Activate (the default port for 1502 can select between 1025-66535)
To modify the TCP port, select Modbus TCP → TCP Port, set the port number and long-press .
When the MODBUS TCP feature is enabled, the following status screen is shown:
Status:
Init – Initializing server – This state only occurs after the first configuration until it reaches the ready status. This activity lasts about 10 seconds.
Ready – The server is up and waiting for a client to connect.
Connected – The client is connected.
Failed – The server is unable to accept clients (see error message).
Error messages:
Disconnected – The Ethernet cable is not connected
Gateway Ping Failed. – A ping to the 1st router failed
No IP - Either no DHCP configuration or static IP config (no DHCP server that assigned an IP address) or need to define a static IP.
Yes, it is. I will try to use Google DNS service / deactivate pihole in my network, but this should not affect the results I hope
EDIT: No change, even I have rebooted whole system.
Further ideas?
Answer from SE Support:
Basically, they said I would need Ethernet Cable to connect it.
Hello,
3rd party logger for Modbus over TCP works only over LAN, you can use standard LAN cable CAT5 with RJ45 connector.
Connection through WiFi is connecting the inverter to internet and SolarEdge monitoring portal.
Eventually you can connect the 3rd party logger into RS485-2 and then set as following:
To configure the inverter (when used without the Control and Communication Gateway):
Under the Communication menu, set the following:
Communication → RS485-2 Conf
RS485-2 Conf → Device Type → Non-SE Logger
RS485-2 Conf → Protocol → SunSpec
RS485-2 Conf → Device ID and enter the MODBUS address (a unique value 1…247). This will set the register C_DeviceAddress.
If needed, set the baud rate to a preferred value: RS485-1 Conf → Baud rate and enter the rate.
In this case you need to have connected the 3rd party logger into RS485-2 port.
Make sure the device ID of the non-SolarEdge monitoring device is different from all other device IDs configured in the inverters.
Hello,
so here the final answer from SolarEdge support team - I have even proposed them to implement Modbus/TCP over WiFi interface - answer at the end of their reply:
MODBUS/TCP uses the Ethernet media in physical layers to carry the MODBUS message handling structure because it can support a large number of devices in one network. The Wi-Fi communication option enables to wirelessly connect a SolarEdge device to the SolarEdge monitoring server and does not support the MODBUS/TCP.
I have passed your idea to our Resolution and Development team, however cannot promise or tell you when it can be implemented.
My solution - I will try to connect the inverter to router with the LAN cable to know, if it will work. Then I will see. I believe my home automation should work without internet
Hello,
I think the reply from SE Support is not correct. Just a few weeks ago they opened port 1502 for me and I can read from Modbus via WiFi successfully. I use the Modbus binding together with the SunSpec addon binding.