Jump to content

SolarEdge APIs


Ross

Recommended Posts

@bpwwer and Anyone Interested

Bob,

I believe you wrote the SolarEdge node server.  If incorrect, please let me know and, if possible, point me in the right direction.  In reading the SolarEdge API manual, PDF here, there appear to be many APIs.  The one on PG3 appears to be the "Inverter Technical Data" API on p. 38.  Unfortunately, it doesn't provide the data I assume most would want: how much energy is the system producing?

I believe the API that divulges energy production is one of the Site Energy APIs on pages 13-23.  It would be nice to know how many KWHs the system has produced YTD, MTD and Today.

I would appreciate you (or anyone else??) looking into it.  I'm happy to test and pay a reasonable fee as the current NS is free.

Thank you,

Ross

 

Link to comment

More info:

From the reading of the SolarEdge Monitoring Server API pdf (linked in my first post) I've determined that the API call that provides the lifetime, current year, current month and current day power generated is:

https://monitoringapi.solaredge.com/site/<X>/overview?api_key=<Z>

where:

<X> is the 6 digit site ID

<Z> is the api key.

I don't know how to create a node server, but I would appreciate it if someone would please take a crack at it.

Thank you,

Ross

 

 

Link to comment
  • 3 months later...

@photogeek54 I found it in the non-production store and installed it.  I copied my key (api_key) and 32-digit value from the other SolarEdge NS.

I started, stopped and restarted several times; however, it says "Disconnected".  When I click Restart, it updates the Time Started but then instantly goes to Not Running.

When I tried to download the log and log package, it says it was doing it, but there is no file in Downloads.

I'm happy to troubleshoot this and I'm sorry I don't have more info.  Please feel free to ask anything.

@Geddy This NS is in non-production.  This topic took a turn (for the better), I'm happy for this and future comments to remain here at least until it's up and running on my end; but, I'll leave that to you.

Thank you,

Ross

Link to comment

@ross

You should stop your existing solaredge running in slot 9 when testing this one but I don't think that's the problem here.

I'm running on an Eisy with polyglot 3x, what are you running on? I cannot test this on other hardware

I don't understand some of the error messages, here's a snippet from the log. @bpwwer might have some insight.

 

4/27/2023, 22:21:18 [pg3] error: No code in error response
4/27/2023, 22:21:18 [pg3] warn: ISY Response: [Try: 3] [00:0d:b9:53:36:80] :: [401 - OK] :: 11.074801ms - http://192.168.1.6:8080/rest/profiles/ns/0/connection
4/27/2023, 22:21:18 [pg3] error: No code in error response
4/27/2023, 22:21:18 [pg3] error: ISY Response: [MAX TRIES EXCEEDED] [00:0d:b9:53:36:80] :: [401 - OK] :: 5.655184ms - http://192.168.1.6:8080/rest/profiles/ns/0/connection
4/27/2023, 22:21:19 [pg3] info: ISY node server user configuration update required 00:21:b9:02:43:ab vs 00:0d:b9:53:36:80
4/27/2023, 22:21:19 [pg3] error: Error: GET http://192.168.1.6:8080/rest/profiles/ns/0/connection Failed :: 401 - OK
4/27/2023, 22:21:19 [pg3] error: getExistingNodeServers :: Error: Received no response from the ISY. Check your ISY IP Address
    at Object.getExistingNodeServers (/var/polyglot/node_modules/@universaldevices/pg3/lib/modules/isy/system.js:91:13)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:533:9)
    at process.processTimers (node:internal/timers:507:7)
    at async /var/polyglot/node_modules/@universaldevices/pg3/lib/services/isy.js:80:21
    at async Promise.allSettled (index 0)
4/27/2023, 22:21:19 [pg3] warn: verifyNodeServers (00:0d:b9:53:36:80) :: ISY has no node servers installed, skipping

Link to comment

@photogeek54 and @bpwwer

Per your request, I deleted the other SolarEdge NS.  And, as you surmised, it didn't fix the Disconnected Status for the solaredge_poly NS.

I have an ISY994 and a Polisy.  From what I've gleaned in these forums, NS's should work the same on Polisy and Eisy.

I'm attaching another Log (from the PG3 menu) after deleting the other SE NS and restarting/stop/starting your NS.

pg3_4-28-2023_70104-AM.zip

Link to comment

@Ross Do you have two ISY/IoX devices configured?  From the log it kind of looks like it and that one of them is failing

warn: ISY Response: [Try: 3] [00:0d:b9:53:36:80] :: [401 - OK] :: 6.87654ms - http://192.168.1.6:8080/rest/profiles/ns/0/connection

That error means it is unable to connect to the ISY/Iox at 192.168.1.6.  Likely because the either IP address or username or password is wrong.

When it tries to start the solaredge node server it errors with 

error: [solaredge_poly(12)] :: STDERR: python3: can't open file '/var/polyglot/pg3/ns/0021b90243ab_12/./solaredge-poly.py': [Errno 2] No such file or directory

Try re-installing the node server again.  Something may have gone wrong with the initial installation.

Link to comment

@bpwwer 192.168.1.6 is my Polisy.  I see ISY/IoX on there (when I launch), but I don't use it.  I use my ISY at 192.168.1.3.

I'll reload the NS this evening (Pacific time).  I have 10 other NS's and I haven't had an issue like this with them.  Maybe I selected the wrong IoX.  But, the NS showed up next to all of the others - just disconnected.

Thanks for your assistance,

Ross

Link to comment

@photogeek54

@bpwwer

I deleted the NS and reinstalled it in slot 9 (for the ISY on my ISY994 which resides in my "cave" - not on the ISY on my Polisy).

Please see attached which shows that I downloaded it to my ISY994.  All my other NS's are connected.

I also attached another PG3 log.  I did all of this soon after 19:55 on 4/28.

Perhaps this is an Eisy v. Polisy thing?  The Eisy has the same IP address as PG3 (I assume) whereas I have 2 different IP addresses:  ISY994 is on 192.168.1.3 and the Polisy/PG3 is on 192.168.1.6.

Perhaps the old version I have is affecting it?  My Polisy is on 3.1.13.  I'm not sure if that makes a difference or not.  I ran into trouble updating it a while back and haven't had the time to focus on it.  My ISY is 5.3.4.

I'm happy to keep plugging away at this if you are.

Thank you,

Ross

SENS2023-04-28.thumb.jpg.71fed98ae9b301f6f72b9dfc21d2614d.jpg

pg3_4-28-2023_75940-PM.zip

Link to comment

So the error here looks quite different than what you saw on your Polisy.

python3: can't open file '/var/polyglot/pg3/ns/0021b90243ab_9/./solaredge-poly.py': [Errno 2] No such file or directory

it’s not even finding the main python program.

Were you able to resolve the problems @bpwwer found on your polisy? I would try to get it working on the Polisy first.

 

Link to comment

@photogeek54

Just to clarify and sorry if I use the wrong lingo:  My PG3 resides on my Polisy and my ISY resides on my ISY994.  I've never used the ISY on my Polisy (IoP).

When I deleted the NS and reinstalled it, I did it on the PG3 on my Polisy just as I did before.  

I believe (but I certainly could be wrong) what @bpwwer was saying is that the NS was trying to contact the ISY on my Polisy (since it was having an issue with 192.168.1.6 which is IoP).  I don't think it should care what is going on with that ISY since I loaded it for the ISY on the ISY994 (192.168.1.3).

As far as I know, I don't have any problems with my Polisy as all of my other NS's are working.  And I don't believe I have the necessary skills to fix a Polisy programming problem in any case.

Let's see what Bob says after he reads the posts after his.

I appreciate your help,

Ross

 

Link to comment

Leaving the IoP unconfigured won't hurt anything, you'll just keep getting a bunch of warnings/errors in the log.

From the log

4/28/2023, 19:58:05 [pg3] info: [00:21:b9:02:43:ab_9] :: Cloning repository... /home/admin/dev/udi-solaredge-poly into /var/polyglot/pg3/ns/0021b90243ab_9
4/28/2023, 19:58:05 [pg3] error: gitClone: failed to clone solaredge_poly from /home/admin/dev/udi-solaredge-poly :: Error: fatal: '/home/admin/dev/udi-solaredge-poly' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Looks like @photogeek54didn't change the installation URL when moving the node server store entry to non-production. So it's trying to install from a local (to the Polisy) git repository that only exists on @photogeek54's machine.  The installation URL needs to be a publicly accessible git repository. 

Link to comment

@photogeek54

The node server runs well and is exactly what I was looking for.  Thank you!

I aspire to be able to do what you did; however, I'm afraid I don't even know where to start.  I need a Node Servers for Dummies book.  Everything I've seen online quickly goes into Beautiful Mind territory for me.

I notice there's a few things in the NS that are blank for me because I don't have the inputs.  Just curious what SolarEdge product would allow me to see, for example, Consumption?

I assume this NS is ready for the production store.

Thanks again and thank you to @bpwwer for assisting us here.

Ross

Edited by Ross
Link to comment

Great! Glad it’s working for you. This was my first python program, I wouldn’t have known where to start without leveraging @xKing’s code. There are some good reference documents highlighted by @bpwwer in the developer tab of the pg3 web page but I don’t think you will see those unless you’ve signed up to be a developer.

if you don’t see anything in the consumption field, it must mean your inverter doesn’t have consumption monitoring installed. Some installers seem to make this an optional service. Consumption shows how much power your home is using.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...