SolarEdge via LAN interface

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

SolarEdge via LAN interface

Post by freijn »

Many thanks, will start reading this evening, but looks good from a quick view.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: SolarEdge via LAN interface

Post by EddyG »

@McMelloW Which port did you use, or what is the complete commandline?
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

EddyG wrote: Monday 29 January 2018 15:34 @McMelloW Which port did you use, or what is the complete commandline?
See README.md on github., it is all there

You can try

Code: Select all

perl sunspec-status -v -p 502 192.168.xxx.yyy 
Greetings McMelloW
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: SolarEdge via LAN interface

Post by EddyG »

I can read, and I did read the README.
But with port 502 the script responded with: Unable to open a connection
So I wondered if it might be an other port. That's why I asked. ;)
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

@EddyG

For my SolarEdge, I use port 502. You also have to configure Modbus TCP and the port (default 502) at your SolarEdge inverter first.

What is the exact error. You can try and repeat the command 2 or more times rapidly after each othe because of a first time time out. I also used the win10 application ShortBus Modbus Scanner to see or I could make a connection at all.

Code: Select all

perl sunspec-status -v -t 5 -p 502 192.168.xxx.yyy
Greetings McMelloW
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge via LAN interface

Post by freijn »

Just tested on mine :-( with the ShortBus Modbus Scanner my inverter does not respond #$%@$$%

I have found the following in the manual :

Enter the inverter Setup mode: Press the internal Enter button for 5-10 seconds and release. Enter the password 123xxxx

► To setup MODBUS TCP:
1 Select Communication LAN Conf  Modbus TCP (the default port is 502).
2 To modify the TCP port, select Modbus TCP  TCP Port, set the port number and long-press <Enter>.

Can this be enabled without the connection to the Solaredge monitoring website is lost? So no harm done on fuctionality?
Yes.. stupid question but not a brave guy here :-)

Cheers,

Frank
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

freijn wrote: Tuesday 30 January 2018 9:57 Just tested on mine :-( with the ShortBus Modbus Scanner my inverter does not respond #$%@$$%
You have to set up the Mobus TCP configuration first. According the documentation, it only works with a LAN cable, no WifI support for Modbus.
freijn wrote: Tuesday 30 January 2018 9:57 I have found the following in the manual :

Enter the inverter Setup mode: Press the internal Enter button for 5-10 seconds and release. Enter the password 123xxxx

► To setup MODBUS TCP:
1 Select Communication LAN Conf  Modbus TCP (the default port is 502).
2 To modify the TCP port, select Modbus TCP  TCP Port, set the port number and long-press <Enter>.

Can this be enabled without the connection to the Solaredge monitoring website is lost? So no harm done on fuctionality?
Yes.. stupid question but not a brave guy here :-)

Cheers,

Frank
My cofiguration is a bit different. It is installed with WiFi, to avoid utp cabling. Then I found out about modbus-TCP. So I use an extra Devolo dlan 1000+ adapter in my LAN over the 230V main cabling. Works also OK, WifI and LAN

First I did the configuration after sunset, when no energy is produced. Make sure to switch of the solar panels first. According to the documentation the monitoring is still active. Mine is for sure, but it runs over WifI. If you configure Modbus-TCP it is easy to see what happens with your monitoring site at solaredge.com. Check it for a day or two to be sure. It is also possible to switch off the modbus configuration again.

Be aware not to touch the pairing with the optimizers. This has to be done at daylight. And have the installation guide at hand, paper or digital.
Greetings McMelloW
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

The sunspec-monitor has had an update. The -m option has also a 0 (zero) optionadded, in case there is no mobus meter installed. In case of a 0 the meter block is not read from the Inverter. So make sure you have the latest version of Sunspec-Monitor from github.

Also at the first call the script send a time-out error. On advise of the script writer, I asked SolarEdge to do an update of my Inverter firmware. This was done straight away. No time-out errors any more.

Next step is to run the perl-script within Domoticz. Any ticks and tips on how to are very welcome.
Greetings McMelloW
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge via LAN interface

Post by freijn »

small update :

I managed to enable my modbus on lan connection and the windows software is now able to connect to port 502

However.. making the perl script run will require some more googeling :-(

Anybody any ideas?

pi@raspberrypi:~/solarreader/Device-Modbus-TCP $ perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Device::Modbus 0.021 not found.
Warning: prerequisite Net::Server 2.008 not found.
Warning: prerequisite Role::Tiny 2 not found.
Generating a Unix-style Makefile
Writing Makefile for Device::Modbus::TCP
Writing MYMETA.yml and MYMETA.json
pi@raspberrypi:~/solarreader/Device-Modbus-TCP $ sudo perl Makefile.PL
Warning: prerequisite Device::Modbus 0.021 not found.
Warning: prerequisite Net::Server 2.008 not found.
Warning: prerequisite Role::Tiny 2 not found.
Generating a Unix-style Makefile
Writing Makefile for Device::Modbus::TCP
Writing MYMETA.yml and MYMETA.json
pi@raspberrypi:~/solarreader/Device-Modbus-TCP $
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

See this link http://search.cpan.org/~jfraire/Device- ... /Client.pm for all dependencies. See also a private mail.
Greetings McMelloW
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge via LAN interface

Post by freijn »

Tadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


pi@raspberrypi:~/sunspec-monitor-master $ perl sunspec-status -v -p 502 192.168.1.140
INVERTER:
Model: SolarEdge SE5K
Firmware version: 3.2186
Serial Number: 7E12CDEE

Status: SLEEPING

Power Output (AC): 0 W
Power Input (DC): 0 W
Efficiency: 0.00 %
Total Production: 2987.058 kWh
Voltage (AC): 0.00 V (50.01 Hz)
Current (AC): 0.00 A
Voltage (DC): 0.10 V
Current (DC): 0.00 A
Temperature: 0.00 C (heatsink)

Read of Meter 1 block registers failed (device does not support SunSpec?) at sunspec-status line 180.
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

Very nice, well done.

when you use the option -m 0 the meter reading is skipped and the error line is not received
Greetings McMelloW
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge via LAN interface

Post by freijn »

My new toy :-)

Status: ON (MPPT)

Power Output (AC): 907 W
Power Input (DC): 921 W
Efficiency: 98.50 %
Total Production: 2987.478 kWh
Voltage (AC): 405.60 V (49.98 Hz)
Current (AC): 4.05 A
Voltage (DC): 748.10 V
Current (DC): 1.23 A
Temperature: 39.68 C (heatsink)
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge via LAN interface

Post by freijn »

I have modified the PerlScript to be a single script updating counters in Domoticz.

It started working today but requires a bit more clean-up and testing. Mello has started testing it as well.

As soon as it is cleaned and working I will share the script here.

SolarEgde with a refresh rate as fast as you like :-)
Micha123
Posts: 62
Joined: Monday 28 August 2017 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by Micha123 »

It wil be nice to have it inside domoticz, to support SolarEdge over ModbusTCP


I have also hammered some lines inside the perl script to update my sensor inside domoticz, and run it every minute via cron. But it is realy an dirty hack.

If your script is working better and clean it wil be nice if you can share it.
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

Micha123 wrote: Monday 26 February 2018 21:42 It wil be nice to have it inside domoticz, to support SolarEdge over ModbusTCP
The perl script does this, but it is a kind of two stage rocket. I have tried this plugin, but so far without any succes. Also I don't think it can read the 122 or more register positions of a SolarEdge.
Of all SolarEdge ModbusTCP solutions, I have found on the internet so far, the perl sunspec-monitor works the best.
I have also hammered some lines inside the perl script to update my sensor inside domoticz, and run it every minute via cron. But it is realy an dirty hack.

If your script is working better and clean it wil be nice if you can share it.
freijn modified the script to read the SolarEdge and to update the sensor(s) as well. I am testing this script and it works OK.
Again, what is the best way to run this perl script on a Rpi ?? cron job or as an event within Domoticz ??
Greetings McMelloW
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge via LAN interface

Post by freijn »

Mischa

I am test running the perl script for the 2nd day now, BEAUTIFULL ! I have connected the incoming P1 meter event to read the
SolarEdge meters. So a SolarEdge update every 10 seconds :-)

I am still optimizing it.
The combined sensor.. Current power / Daily power / and lifetime power I am struggeling with at this moment.

Unless you are a hacker and can't wait ( I can share the current version ) please allow us a few day to optimize the script and create a
small installer document.

Again.. with the 10 sec update I am very very pleased using this Perl script , thanks to Mello !

Frank
Micha123
Posts: 62
Joined: Monday 28 August 2017 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by Micha123 »

I have also a curent using sensor. Its working fine.

We wait until hou have the script ready.

What ifno read your script from the inverter?


Mine reads,

Generated power (actual, total)
AC voltage
DC voltage
Efficiency of inverter
Ampere used of inverter
Frequentie AC

It wil be nice to have that in your script too.
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: SolarEdge via LAN interface

Post by McMelloW »

Micha123 wrote: Tuesday 27 February 2018 14:26 Generated power (actual, total)
AC voltage
DC voltage
Efficiency of inverter
Ampere used of inverter
Frequentie AC
It is all there already in the script.
How do you get your SolarEdge data, via the website API?
Greetings McMelloW
Micha123
Posts: 62
Joined: Monday 28 August 2017 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by Micha123 »

No, i have changed the "print" commands to commands update my domoticz sensors and now i run it every minute via cron in linux.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest