Plugin: Solar Meter, universal Solar Production meter

Usually a reload of the luup is all you need to to. Reboot works too, but reload is normally all that is needed.

My solar are SMA Sunny Islands using Midnite Solar charge controllers. Please let me know if you develop a plugin that is compatible.

Usually a reload of the luup is all you need to to. Reboot works too, but reload is normally all that is needed.[/quote]

OK, unfortunately my Vera is still not puling any consumption data from PVO. “Last Update” just stays blank too. :cry:

[quote=“dJOS, post:43, topic:198939”]OK, unfortunately my Vera is still not puling any consumption data from PVO. “Last Update” just stays blank too. :'([/quote]Do you see anything in the log file related to this plugin? http://vera_ip/cgi-bin/cmh/log.sh?Device=LuaUPnP - or you can use the Info Viewer plugin or you can use winscp or ssh.

I’d check now but I cant logon from work atm, looks like Vera has a remote access issue and you link doesnt work either.

EDIT: remote logon is working again but I cant find the “info viewer” plugin you mentioned.

The link I gave needs to have the ‘vera_ip’ replaced with your Vera’s IP (sorry, should have mentioned that) and works locally.

Ah, that explains it. ;D I’ll check it tonight.

Ok so I can see the following in the logs fairly repetitively:

10	05/21/18 19:23:04.018	XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / Solar Meter[39] <0x763f6520>

00 05/21/18 19:23:04.561 luup_log:22: EchoEnergyManager::ERROR: ergy_pollDevices: FAILED to retrieve 'Watts' for Solar Meter device # 39 <0x74bf6520> 00 05/21/18 19:23:04.561 luup_log:22: EchoEnergyManager::ERROR: stack traceback:

That’s the ergy plugin complaining - not much to do with your solar plugin. I’d suggest you set the following to true in your L_SolarMeter1.lua:

local def_debug = false Then reload your luup and you should definitely see something more in your log file. You should search for the device number as well as ‘Solar’ in your log file. (Looks like your device number might be 39 based on the snippet you posted.)

Hopefully Rene will be back soon with better debug suggestions.

Can you add SunPower Solar systems? :frowning:

[quote=“jswim788, post:49, topic:198939”]That’s the ergy plugin complaining - not much to do with your solar plugin. I’d suggest you set the following to true in your L_SolarMeter1.lua:

local def_debug = false Then reload your luup and you should definitely see something more in your log file. You should search for the device number as well as ‘Solar’ in your log file. (Looks like your device number might be 39 based on the snippet you posted.)

Hopefully Rene will be back soon with better debug suggestions.[/quote]
Hi,
In the Plug in settings change the Log level to debug and hit Save Changes. Then look at the log file again. Search for lines with ‘Solar Meter’ or ‘SolarMeter’ in them right after the luup engine has reloaded.

Cheers Rene

It is on the to do, but riding my Harley has priority this time of year ;), so no ETA.

Cheers rene

[quote=“reneboer, post:51, topic:198939”]Hi,
In the Plug in settings change the Log level to debug and hit Save Changes. Then look at the log file again. Search for lines with ‘Solar Meter’ or ‘SolarMeter’ in them right after the luup engine has reloaded.

Cheers Rene[/quote]

ok, here’s what I think you are after - I’ve hashed out my API key and System ID:

05/23/18 9:21:13.112 luup_log:39: Solar Meter_debug: Is Day use Day delay Interval SolarMeter_Retrieve --> 300 <0x74d24520> 10 05/23/18 9:21:13.112 AlarmManager::AddRelativeAlarm current time 1527031273 delay 300 type 7 <0x74d24520> 10 05/23/18 9:21:13.112 AlarmManager::AddAbsoluteAlarm alarm 0xcf9380 entry 0xfafa88 id 18 type 7 param=0xe35ab0 entry->when: 1527031573 time: 1527031273 bCancelFirst 0=0 <0x74d24520> 50 05/23/18 9:21:13.113 luup_log:39: Solar Meter_debug: PV Output URL http://pvoutput.org/service/r2/getstatus.jsp?key=####&sid=#### <0x74d24520> 10 05/23/18 9:21:13.113 FileUtils::ReadURL starting user: pass: http://pvoutput.org/service/r2/getstatus.jsp?key=####&sid=#### <0x74d24520> 31 05/23/18 9:21:13.100 AlarmManager::Run 0xd76ad8 notified of a change entry 0x126b290 id 512 deleted 0 <0x74b24520> 31 05/23/18 9:21:13.121 AlarmManager::Run callback for alarm 0xd76ad8 entry 0x126b290 type 7 id 512 param=0x11d6dd8 entry->when: 1527031273 time: 1527031273 tnum: 0 slow 1 tardy 0 <0x74b24520> 35 05/23/18 9:21:13.121 LuaInterface::CallFunction_Timer func:checkMode device:42 <0x74b24520> 10 05/23/18 9:21:13.121 AlarmManager::AddRelativeAlarm current time 1527031273 delay 10 type 7 <0x74b24520> 10 05/23/18 9:21:13.122 AlarmManager::AddAbsoluteAlarm alarm 0xd76ad8 entry 0x1232348 id 513 type 7 param=0x100af08 entry->when: 1527031283 time: 1527031273 bCancelFirst 0=0 <0x74b24520> 31 05/23/18 9:21:13.122 AlarmManager::Run finish callback for alarm 0xd76ad8 entry 0x126b290 type 7 id 512 param=0x11d6dd8 entry->when: 1527031273 time: 1527031273 tnum: 0 slow 1 duration 0 <0x74b24520> 10 05/23/18 9:21:13.196 AlarmManager::AddRelativeAlarm current time 1527031273 delay 10 type 7 <0x74f24520> 10 05/23/18 9:21:13.197 AlarmManager::AddAbsoluteAlarm alarm 0xf3ecc8 entry 0xcd1990 id 524 type 7 param=0x1148be8 entry->when: 1527031283 time: 1527031273 bCancelFirst 0=0 <0x74f24520> 31 05/23/18 9:21:13.197 AlarmManager::Run finish callback for alarm 0xf3ecc8 entry 0xfc2728 type 7 id 523 param=0x11c4e38 entry->when: 1527031273 time: 1527031273 tnum: 0 slow 1 duration 0 <0x74f24520> 10 05/23/18 9:21:13.611 FileUtils::ReadURL resp:200 size 45 http://pvoutput.org/service/r2/getstatus.jsp?key=####&sid=#### <0x74d24520> 50 05/23/18 9:21:13.612 luup_log:39: Solar Meter_debug: Retrieve HTTP Get Complete... <0x74d24520> 50 05/23/18 9:21:13.612 luup_log:39: Solar Meter_debug: 20180523,09:20,NaN,NaN,11484,945,NaN,20.1,NaN <0x74d24520> 02 05/23/18 9:21:13.613 luup_log:39: Solar Meter: Refresh failed unknown <0x74d24520> 01 05/23/18 9:21:13.613 luup_variable_set interface 0xd08e30 no HttpCode/(null) <0x74d24520> 50 05/23/18 9:21:13.613 luup_log:39: Solar Meter_debug: no text <0x74d24520>

Bet this is the problem:

Solar Meter_debug: 20180523,09:20,NaN,NaN,11484,945,NaN,20.1,NaN

The 3rd and 4th fields are “NaN”, but the plugin wants to use these as Watts and DayKWH. Maybe the plugin can convert these to 0’s instead of trying to process them? I’m curious as to exactly why it chokes. Maybe the pcall isn’t happy for some reason. The AltUI test window is okay with this under openLuup, but NaN behavior does seem to vary among systems.

Hi,

Yes the plugin assumes you have Solar production and thus expects those values to have numbers. dJOS please make sure you have PVOut configured correctly so it shows your Solar panels production. After that the plugin will work. Until then this plugin has no real purpose for you.

Cheers Rene

[quote=“reneboer, post:55, topic:198939”]Hi,

Yes the plugin assumes you have Solar production and thus expects those values to have numbers. dJOS please make sure you have PVOut configured correctly so it shows your Solar panels production. After that the plugin will work. Until then this plugin has no real purpose for you.

Cheers Rene[/quote]

As mentioned in my earlier posts, I don’t have a solar system in my current house, it’s on the list for early next FY.

[quote=“reneboer, post:55, topic:198939”]Hi,

Yes the plugin assumes you have Solar production and thus expects those values to have numbers. dJOS please make sure you have PVOut configured correctly so it shows your Solar panels production. After that the plugin will work. Until then this plugin has no real purpose for you.

Cheers Rene[/quote]

Just to clarify further, i was hoping Solar meter could be used as the source for the “energy\energy profile\configuration settings” Whole house / total consumption meter source.

Hi Rene,

Great app. I installed it yesterday (Vera Edge - Solaredge) and got it working. Only “problem”: the “this week” value stays at 0. And this morning it shows: Last update 21:48 18 Jun and current production 0 W.

How do I activate it again and keep it running?

It’s no HD-weather today, so… :wink:

EDIT: I think 21:48 is the time the converter switched off into “Night Mode”

[quote=“vera4reak, post:58, topic:198939”]Hi Rene,

Great app. I installed it yesterday (Vera Edge - Solaredge) and got it working. Only “problem”: the “this week” value stays at 0. And this morning it shows: Last update 21:48 18 Jun and current production 0 W.

How do I activate it again and keep it running?

It’s no HD-weather today, so… :wink:

EDIT: I think 21:48 is the time the converter switched off into “Night Mode”[/quote]
Hi,

The SolarEdge API does not return a value for the week so that indeed remains zero. The LastRefresh value comes from the SolarEdge API, so maybe no production? You can also look at the variable LastUpdate, that is the last time the plugin polled your converter. The latter should always be updated, even if there is zero production.

Cheers Rene

I erased the device and plugin and reinstalled (and waited ;)) - now it’s up and running again.

In the SolarEdge API manual is says:
Daily Limitation
Use of the monitoring server API is subject to a query limit of 300 requests for a specific account token and a parallel query limit
of 300 requests for each specific site ID from the same source IP.
APIs that do not have a specific ID (e.g. Site List, Account List) will be counted as part of the account query limit.
Any additional site or account level request will result in HTTP 429 error ? too many requests.

So maybe to often polling for data blocks the plugin after 300 requests? I changed the interval to 10 minutes (daytime) and it is still running OK.

The “this week” is shows in the SE Portal. It probably is calculated there.

Thanks for the good work and reply!