Python Plugin: SolarEdge Public

Python and python framework

Moderator: leecollings

Post Reply
Noudje
Posts: 16
Joined: Monday 25 January 2016 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta

Python Plugin: SolarEdge Public

Post by Noudje »

I wrote a plugin to get data from a SolarEdge Public Dashboard. Unfortunately I was not able to get the current power, but only the produced power during the last 15 minutes. In the plugin the device is created with:

Code: Select all

Domoticz.Device(Name="Power", Unit=1, TypeName="kWh").Create()
The device is updated with the standard procedure:

Code: Select all

Devices[Unit].Update(nValue=nValue, sValue=str(sValue))
In Domoticz I get the device as:
haarlemnoorderlicht.PNG
haarlemnoorderlicht.PNG (10.22 KiB) Viewed 965 times
I have 2 question:

1. I expected to get the nValue (=15) in to top right corner. Now nValue and sValue (='Produced...Watt') are both shown as text.
How do I get nValue in the top right corner?

2. If I click on the Edit button, change Type from Usage to Return and click on Update, the change is not updated, so also the icon will not change.
How can I enable the possibility to change the Usage or how can I change the icon as shown in:
winddelen.PNG
winddelen.PNG (11.63 KiB) Viewed 965 times
Raspberry Pi 2 with latest beta version
1x Aeon Labs USB Z-Stick S2
5x Fibaro Modules
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin: SolarEdge Public

Post by Dnpwwo »

@Noudje,

Domoticz devices can be hard to work out :cry:

For my power measuring plugin i used

Code: Select all

Domoticz.Device(Name="Usage", Unit=1, Type=243, Subtype=29, Switchtype=0, Image=0, Options="").Create()
Domoticz.Device("Total", 2, 113).Create()
and got
Untitled.png
Untitled.png (95.56 KiB) Viewed 907 times
not sure if that helps
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
AndreFR
Posts: 14
Joined: Thursday 30 November 2017 19:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: SolarEdge Public

Post by AndreFR »

@Noudje,
Do you need another ‘tester’ of de plug-in? ;) Do you use The API or do you use the info which is sent to The SolarEdge portal?
Noudje
Posts: 16
Joined: Monday 25 January 2016 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta

Re: Python Plugin: SolarEdge Public

Post by Noudje »

Thanks for the help. It is very complex to get data from a public SolarEdge device. I stopped this project and I am thinking of a crontab job to retrieve the daily report by executing:

url = "https://monitoringpublic.solaredge.com/ ... /p/charts/" + fieldID + "/chartExport?st=" + str(st) + "&et=" + str(et) + "&fid=" + fieldID + "&timeUnit=2&pn0=Power&id0=0&t0=0&hasMeters=false"

where:

fieldID = unique id of the SolarEdge device
st = (datetime.date(date.year, date.month, date.day) - since1970).days * 86400000

This will give a CSV file with the produced power every 15 minutes.

I got too many problems to write a plugin by specifying devices, https calls, etc.
Raspberry Pi 2 with latest beta version
1x Aeon Labs USB Z-Stick S2
5x Fibaro Modules
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest