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

User avatar
McMelloW
Posts: 434
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: Thursday 17 October 2019 13:28 Very interesting indeed. Will try to install as well and perhaps optimize the script in order to sent the sensor info to Domoticz.

Thanks!
Looking forward to that.
Greetings McMelloW
cmddlm
Posts: 3
Joined: Tuesday 04 February 2020 18:26
Target OS: Windows
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by cmddlm »

Hi everyone.
I can communicate with my solaredge SE3000H with command on windows console.
I have created 11 dummy devices with idx' numbers, correct ip and port of domoticz sever.
I have this dzVent script that doesn't update dummy devices :

return {
on = {
timer = {'every minute'}
},
execute = function(domoticz,device)
domoticz.utils.osExecute('perl C:\\Mia\\solar2.pl -n -m 0 192.168.1.13 > C:\\Mia\\SEoutput.txt')
domoticz.log()
end
}

All seems to work and no errors appears in logging domotics.
Domotics create the file SEoutput.txt with correct content:

1581066840,4,1822,1850,129345,245.40,7.44,390.50,4.74,32.55,0,0

bat devices don't receive any updating and report all 0 value.
Thanks everybody who will help me.
cmddlm
Posts: 3
Joined: Tuesday 04 February 2020 18:26
Target OS: Windows
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by cmddlm »

I have to add that if I add a the command
Print 'Hallo' at the beginning of script perl solar2.pl, at the beginning of file SEoutput.txt Domoticz write correctly Hallo and values of my solaredge.
I think my script Solar2.pl have something wrong bat I don't know what.
I attach my file that I have modified in txt file.
Thanks
Attachments
solar2.txt
(22.9 KiB) Downloaded 81 times
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 »

Hi

You are missing the -z parameter

domoticz.utils.osExecute('perl C:\\Mia\\solar2.pl -n -m 0 192.168.1.13 > C:\\Mia\\SEoutput.txt')
domoticz.log()

should be

domoticz.utils.osExecute('perl C:\\Mia\\solar2.pl -n -z -m 0 192.168.1.13 > C:\\Mia\\SEoutput.txt')
domoticz.log()
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 »

Micha123 wrote: Tuesday 15 October 2019 16:19 I found sunspec_ardexa

It ia a python script and is working much faster then the pearl script

https://pypi.org/project/sunspec-ardexa
Anybody worked on this already ?

I have found that

sunspec_ardexa log 192.168.1.140 1 /home/pi/sun

Generates a nice .csv file in the logdir. But where or in what file is this generated as I would like to make the json calls from
there directly into the Domoticz

Anybody ?
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 »

Contacted the support email address.

Till now very responsive , hopefully I get some hints so can modify the script for Domoyicz :-)
cmddlm
Posts: 3
Joined: Tuesday 04 February 2020 18:26
Target OS: Windows
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by cmddlm »

freijn wrote: Saturday 08 February 2020 21:41 Hi

You are missing the -z parameter

domoticz.utils.osExecute('perl C:\\Mia\\solar2.pl -n -m 0 192.168.1.13 > C:\\Mia\\SEoutput.txt')
domoticz.log()

should be

domoticz.utils.osExecute('perl C:\\Mia\\solar2.pl -n -z -m 0 192.168.1.13 > C:\\Mia\\SEoutput.txt')
domoticz.log()
Thanks frejjn. Now is all OK.
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 »

Guys,

Who already installed the sunspec_ardexa python tool ?

Can you please run the below command and tell me in which directory your sunspec_ardexa.py is located ?
I like to see the full path.
If you do not understand the question.. please run the below command and sent the output

Code: Select all

sudo find / -name sunspec_ardexa.py
I have found where I can / have to change the file in order to use sunspec_ardexa as an interface between the SolarEdge and Domoticz.
I will have a test version ready this week, but need some help from you guys for testing on serveral systems and feedback on the install.

Will keep you updated...

Frank
User avatar
McMelloW
Posts: 434
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 »

Frank,

Code: Select all

pi@mcmellow-pi:~ $ sudo find / -name sunspec_ardexa.py
/usr/local/lib/python2.7/dist-packages/sunspec_ardexa.py
I am not sure or i use it. But it is on my RPi present anyway.
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 »

Perfect, McMellow

Same place as me :-)

If I have made my modifications to the file, I think you would like to use it :-)
User avatar
McMelloW
Posts: 434
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 18 February 2020 16:01 Perfect, McMellow

Same place as me :-)

If I have made my modifications to the file, I think you would like to use it :-)
Please keep me updated.
Greetings McMelloW
rogerthn
Posts: 28
Joined: Thursday 26 July 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by rogerthn »

Jackb wrote: Friday 06 September 2019 19:08 To make the script work you have to install several PERL modules:
...
@Jackb Many thanks!
I do have it working with update every minute when there is no light and "every second" when my Aeotec ZW074 MultiSensor Gen5+ gives Lux > 0 but energy Today in device SolarEdge Actual Power DC and AC is lower than https://monitoringpublic.solaredge.com/ ... /dashboard
Any suggestions?

PS
Crontab entry

Code: Select all

1 0 * * * /home/pi/scripts/SolarEdge.sh > /tmp/SolarEdge.log 2>&1
/home/pi/scripts/SolarEdge.sh

Code: Select all

#!/bin/bash
echo "$(date +%Y-%m-%d\ %H:%M:%S.%N) start"

HOUR=$(date +%H)

while [ "$HOUR" -lt 23 ]
do
  Lux=$(wget -O - -q "http://192.168.C.D:8080/json.htm?type=devices&rid=63" | grep Data | awk -F '"' '{print $4}' | awk '{print $1}')
  if [ "$Lux" -eq 0 ]
  then
    /usr/bin/perl /home/pi/scripts/SolarEdge.pl -m 0 -z 192.168.C.D
    status=$?
    if [ "$status" -ne 0 ];then
      echo "$(date +%Y-%m-%d\ %H:%M:%S.%N) status = $status"
    fi
    /bin/sleep 60
  else
    /usr/bin/perl /home/pi/scripts/SolarEdge.pl -m 0 -z 192.168.C.D
    status=$?
    if [ "$status" -ne 0 ];then
      echo "$(date +%Y-%m-%d\ %H:%M:%S.%N) status = $status"
    fi
    /bin/sleep 1
  fi
  HOUR=$(date +%H)
done

echo "$(date +%Y-%m-%d\ %H:%M:%S.%N) done"
i.e. Updates are done between 00:01 and 23:00
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 fire the script to update the solar when the P1 update comes in.

I do fire it from the update event of the P1.
Within this P1 update event you could check the Lux...
rogerthn
Posts: 28
Joined: Thursday 26 July 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by rogerthn »

freijn wrote: Saturday 22 February 2020 19:53 I fire the script to update the solar when the P1 update comes in.

I do fire it from the update event of the P1.
Within this P1 update event you could check the Lux...
I've no P1?
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 »

Ohhh sorry... Still I would solve it in Lua of Dzvents.. not in bash...
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 »

Guys,

I have started a new topic for the Python SolarEdge script

https://www.domoticz.com/forum/viewtopi ... 65&t=31455
rogerthn
Posts: 28
Joined: Thursday 26 July 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by rogerthn »

freijn wrote: Sunday 23 February 2020 15:06 Ohhh sorry... Still I would solve it in Lua of Dzvents.. not in bash...
OK!
rogerthn
Posts: 28
Joined: Thursday 26 July 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by rogerthn »

freijn wrote: Sunday 23 February 2020 20:44 Guys,

I have started a new topic for the Python SolarEdge script

https://www.domoticz.com/forum/viewtopi ... 65&t=31455
Thanks!

My issue is that the dummy devices (Instant+Counter, Computed) gets correctly? updated with Power but the calculated? Energy is a bit to low.
Today I do have DC Energy = 6.084 kWh and AC = 5.994 kWh
https://monitoringpublic.solaredge.com/ ... /dashboard has 6.185 kWh
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 do not have computed but from device :

Perfect match.. although SolarEdge does a round up...
Capture.JPG
Capture.JPG (161.26 KiB) Viewed 1788 times
rogerthn
Posts: 28
Joined: Thursday 26 July 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SolarEdge via LAN interface

Post by rogerthn »

OK, I'll change AC Power to From device and see, fingers crossed :D
You can get three decimals on the SolarEdge page if you change to month view and hover with the mouse over the days ;)
2020-02-24.jpg.png
2020-02-24.jpg.png (5.16 KiB) Viewed 2141 times
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest