Page 3 of 4
Re: Python SolarEdge modbus script via lan
Posted: Sunday 08 March 2020 11:03
by jvdz
Frank,
Are you even sure the sunspec_ardexa process is done after 2 seconds?
I would keep it simple, because it will never be 100% correct and it is "only" about the consumption of your house at the given time. Total consumption will (eventually) be correct.
What I do is I run the sunspec_ardexa process each 15 seconds and my P1 info is updated each 10 seconds, so each time I get an update for P1 I calculate the consumption by using the last SolarPowerValue - P1Return + P1Usage and update another dummy P1 device.
This is fine for getting an good impression of the real consumption and doesn't stress the RPI too much as the sunspec_ardexa does take about 4 seconds to complete on my RPI 2B.
Jos
Re: Python SolarEdge modbus script via lan
Posted: Sunday 08 March 2020 19:21
by freijn
Hey Jos,
Running on an RP4 here :
This request took: 1.17648792267 seconds.
This is excluded the HTTP requests, but I think its still below the 2 sec.
The biggest step forward was from a RP2 to RP3 I can recommend it!
THanks for sharing your thoughts with me.
Frank
Re: Python SolarEdge modbus script via lan
Posted: Sunday 08 March 2020 19:48
by jvdz
freijn wrote: ↑Sunday 08 March 2020 19:21
This request took: 1.17648792267 seconds.
This is excluded the HTTP requests, but I think its still below the 2 sec.
Correct I get: "This request took: 2.19808793068 seconds.", but the total time including the load process for this script is just below the 4 seconds for me.
I know and am planning to install a couple of new PI's, but there hasn't been any need as yet as My current RPI2b runs on average at 3% cpu.
Jos
Re: Python SolarEdge modbus script via lan
Posted: Monday 23 March 2020 18:46
by patricksluis62
Hi,
I have follow the steps on the first post from Freijn.
The domo.ini file is stored in the domoticz map with the idx numbers I have made with the virtual sensors in domoticz.
I didn`t found the sunspec_ardexa.py file in the python 2.7/dist-packages folder.
I have found a folder in root/pysonspec but is wasn`t the sunspec-ardexa.py file. I have open an other file with thonny python IDE and paste the code you have made on the first post.
When I paste this (sunspec_ardexa discover 192.168.1.12 1) command in the terminal and execude it.
It works as you can see>
Amps (A) 0.0 A
Amps PhaseA (AphA) 0.0 A
Amps PhaseB (AphB) 0.0 A
Amps PhaseC (AphC) 0.0 A
Phase Voltage AB (PPVphAB) 376.8 V
Phase Voltage BC (PPVphBC) 380.3 V
Phase Voltage CA (PPVphCA) 379.6 V
Phase Voltage AN (PhVphA) 216.2 V
Phase Voltage BN (PhVphB) 218.0 V
Phase Voltage CN (PhVphC) 220.5 V
Watts (W) 0 W
Hz (Hz) 49.97 Hz
VA (VA) 0 VA
VAr (VAr) 0 var
PF (PF) 0 Pct
WattHours (WH) 15484252 Wh
DC Amps (DCA) 0 A
DC Voltage (DCV) 866.0 V
DC Watts (DCW) 0 W
Heat Sink Temperature (TmpSnk) 43.45 C
Operating State (St) Starting
Vendor Operating State (StVnd) 0
Vendor Event Bitfield 1 (EvtVnd1) 1
Vendor Event Bitfield 4 (EvtVnd4) 0
The question is how do I get the parameters in Domoticz?
In Domoticz I can see the devices I have made but they don`t get any data.
Thank you for your time!!
Patrick
Re: Python SolarEdge modbus script via lan
Posted: Monday 23 March 2020 20:21
by freijn
Patrick
run this command :
sudo find / -name sunspec_ardexa.py
This will show you where sunspec_ardexa.py file is located.
Now follow the procedure I wrote in the first post.
backup-replace.
Then run the script again and see if you get the results in your Domoticz.
If all fails, enable the debug ( set it to 1 ) and see if the script generates output.
Please let me know how you are going. and Stay Healty !
Re: Python SolarEdge modbus script via lan
Posted: Monday 23 March 2020 21:58
by patricksluis62
Hi,
Thanks for the fast response.
I have located the file with the search function and paste the new script over the existing script.
No results unfortunally, so I deleted all sunspec files and started from nr. 1
Completed all steps and located the files, replace it with the new script but unfortunally, again no updated parameter in Domoticz.
But when I use this command: (sunspec_ardexa discover 192.168.1.12 1) nothing happens.
When I use the seccond command: (sunspec_ardexa -vv discover 192.168.1.12 1)
The parameters in the terminal are comming.
I have updated Domoticz also in the morning, could this be the problem?
Patrick
Re: Python SolarEdge modbus script via lan
Posted: Tuesday 24 March 2020 8:08
by freijn
Hemmmm
can you check if you allow updates without a password on your local network ? in the Settings menu
- Capture.JPG (18.95 KiB) Viewed 1597 times
Re: Python SolarEdge modbus script via lan
Posted: Saturday 23 May 2020 17:40
by McMelloW
Hello to all SolarEdge users
Two little questions.
1) Does this works on python 3.7 If yes, how do I install.
2) Does this support Optimzer information as well?
Re: Python SolarEdge modbus script via lan
Posted: Saturday 23 May 2020 17:53
by jvdz
McMelloW wrote: ↑Saturday 23 May 2020 17:40
1) Does this works on python 3.7 If yes, how do I install.
I am running it with 2.7 so am not sure, but this post seems to suggest it:
https://www.domoticz.com/forum/viewtopi ... 55#p238222
McMelloW wrote: ↑Saturday 23 May 2020 17:40
2) Does this support Optimzer information as well?
Nope just the Standard stuff:
Code: Select all
Found a device at address: 1
Name: common Sunspec Id: 1 Label: Common
Manufacturer (Mn) SolarEdge
Model (Md) SE5000
Version (Vr) 0003.2434
Serial Number (SN) 7aaaaaaa
Device Address (DA) 1
Name: inverter Sunspec Id: 101 Label: Inverter (Single Phase)
Amps (A) 14.47 A
Amps PhaseA (AphA) 14.47 A
Phase Voltage AB (PPVphAB) 236.7 V
Watts (W) 3422 W
Hz (Hz) 49.985 Hz
VA (VA) 3428 VA
VAr (VAr) 196.03 var
PF (PF) 99.83 Pct
WattHours (WH) 7716992 Wh
DC Amps (DCA) 9.202 A
DC Voltage (DCV) 377.5 V
DC Watts (DCW) 3474 W
Heat Sink Temperature (TmpSnk) 50.97 C
Operating State (St) MPPT
Vendor Operating State (StVnd) 0
Vendor Event Bitfield 1 (EvtVnd1) 0
Vendor Event Bitfield 4 (EvtVnd4) 0
This request took: 1.61030101776 seconds.
Re: Python SolarEdge modbus script via lan
Posted: Monday 25 May 2020 11:42
by McMelloW
@jvdz
Thanks for the information.
This offers no extras. This perl script
https://github.com/tjko/sunspec-monitor
Called within a dzVents script does the same within less 0.5 sec.
Re: Python SolarEdge modbus script via lan
Posted: Monday 25 May 2020 12:23
by jvdz
Yea I know.., but not sure about the speed remark as I am still running on a "old" Raspberry Pi 2 Model B.
I have read claims about the perl script being slower.
Re: Python SolarEdge modbus script via lan
Posted: Monday 25 May 2020 16:10
by McMelloW
jvdz wrote: ↑Monday 25 May 2020 12:23
Yea I know.., but not sure about the speed remark as I am still running on a "old" Raspberry Pi 2 Model B.
I have read claims about the perl script being slower.
The timecalculation is from the log. Time ended minus time started.
Re: Python SolarEdge modbus script via lan
Posted: Monday 03 August 2020 22:33
by patricksluis62
Hi,
I have installed the script again on another raspberry with Domoticz and a different inverter. Unfortunately, I have again problems with getting the data in domoticz. When I execute the script in the terminal, I receive data from the SolarEdge inverter, but nothing appears in Domoticz. Last time (March) I didn`t allow the internal network to access domoticz, I have changed it and it get working. Anyone who has ideas what the problem can be this time……
Thank you for your time!!
Patrick
Re: Python SolarEdge modbus script via lan
Posted: Saturday 08 August 2020 21:56
by freijn
Did you replace the customized code ?
Re: Python SolarEdge modbus script via lan
Posted: Sunday 09 August 2020 9:17
by CronoS
Hi,
I am testing it on my RP 3+, but I stll got the error: "Cannot find the address 1". Is there are a prerequisite that I have missed? I have installed the plugin and tried some commands e.g.: "sunspec_ardexa --verbose discover a.b.c.d 1 --port 1502", with or without the ports and also tried 1-20. I haven't setup up the domoticz part yet, first I wanted to find out if the plugin actually is doing something first and that I get a verbose logging back that it is basically found or some sort.....
Thanks!
Re: Python SolarEdge modbus script via lan
Posted: Sunday 09 August 2020 9:36
by rogerthn
Maybe
freijn wrote: ↑Sunday 23 February 2020 19:53
...
2020-02-27 Thanks Telewy !
If the script does not connect to the inverter with the message : Cannot find the address: 1
Then please in the file /usr/local/lib/python2.7/dist-packages/sunspec/core/client.py
at line 333 insert the sleep command :
time.sleep(0.1)
I am using python 3 and have
Code: Select all
diff /usr/local/lib/python3.7/dist-packages/sunspec/core/client.py.ORG /usr/local/lib/python3.7/dist-packages/sunspec/core/client.py
332a333
> time.sleep(0.1)
Re: Python SolarEdge modbus script via lan
Posted: Sunday 09 August 2020 17:20
by Strebrah
Hi,
I had some difficulties getting the proposed script working.
So, over the weekend, I created my own Solaredge Modbus TCP to Domoticz python code.
I uploaded it to github;
https://github.com/strebrah/Solaredge_Domoticz_Modbus
Maybe someone will find this useful
bye!
Re: Python SolarEdge modbus script via lan
Posted: Monday 10 August 2020 9:45
by freijn
CronoS wrote: ↑Sunday 09 August 2020 9:17
Hi,
I am testing it on my RP 3+, but I stll got the error: "Cannot find the address 1". Is there are a prerequisite that I have missed? I have installed the plugin and tried some commands e.g.: "sunspec_ardexa --verbose discover a.b.c.d 1 --port 1502", with or without the ports and also tried 1-20. I haven't setup up the domoticz part yet, first I wanted to find out if the plugin actually is doing something first and that I get a verbose logging back that it is basically found or some sort.....
Thanks!
Goes back to basic first. Can you connect to your inverter? telent ipaddres : port number Does it open a connection ?
Re: Python SolarEdge modbus script via lan
Posted: Monday 10 August 2020 10:16
by Strebrah
Strebrah wrote: ↑Sunday 09 August 2020 17:20
Hi,
I had some difficulties getting the proposed script working.
So, over the weekend, I created my own Solaredge Modbus TCP to Domoticz python code.
I uploaded it to github;
https://github.com/strebrah/Solaredge_Domoticz_Modbus
Maybe someone will find this useful
bye!
@freijn, can you include this as an alternative in the first topic post? or should I create a new topic? Thanks!
Re: Python SolarEdge modbus script via lan
Posted: Tuesday 11 August 2020 12:57
by freijn
[/quote]
@freijn, can you include this as an alternative in the first topic post? or should I create a new topic? Thanks!
[/quote]
Done ! THanks