Plugin: Solar Meter, universal Solar Production meter

Doh… sorry, I had missed out the js file, and looks like I had an old file .json as well.
I have also just fixed the Notifications, that now seems to work on my machine.

Hopefully all the needed files are included, just need uploading.
Good luck

EDIT:- File replaced in later post

Should have added that you will need to have the rest of the files first by installing solarmeter from the app store.
Octo

Hi Yes i have installed Solarmeter in vera which comes up ok, with the usual options of other inverters.
I install your two files and reload and solarmeter vanishes from vera, tried a number of reloads.

Thanks

sorry should have read your post previous ! - i have ago later :smile:
Cheers

Hi Octo,

Its nearly working, seems to be connecting but not populating all fields


My solarman homepage looks like this:

Ummm, looks like it is very close, the empty values are the original ones from Rene, which I left alone. It may have missed the initialisation stage.
Can you check that the logging is set to Debug on the Settings tab, then have a look in the log file to see if there are any issues showing? I will post mine later for comparison.
I have changed my update rate from 5 to 10min, as the portal is updating around 10-11 minutes at present.
image

Ok changed to debug,
sorry where do i view the log ?

Hi Octo,

I’ve tried the setup on a different vera i have, still the same result ufortunately.
It looks like its getting some values - SOC, To House and To Grid but nothing else.

@Somerset,
Looking at the log, I can see a couple of issues:
it looks like the second of the CURL command for the System data is wrong - its far too short.
Can you recapture that - from the portal, select the invertor data, F12, network tab, ctrl+R, and select the “copy as cURL (Bash)” option. (see screen shot).
Because that is failing, the other values are not being returned, I can try to fix that with a small change to the lua file, but if the cURL command is correct I think all will work.

Cheers

Here is updated lua file (with the other 2 modified files). Just a defensive change in case Solarman system data URL is wrong, so that main parameters still get returned.

Octo
Edit: File removed

Thanks Octo,
Still getting problems though:

02 08/08/19 15:56:21.492 e[33;1mluup_log:51: Solar Meter: Refresh pcall error [string “–[==[…”]:899: attempt to index field ‘?’ (a nil e[0m <0x75ad7520>
50 08/08/19 15:56:21.493 luup_log:51: Solar Meter_debug: Last Refresh was : Thu Jan 1 00:00:00 1970, time now =Thu Aug 8 15:56:21 2019 <0x75ad7520>
50 08/08/19 15:56:21.494 luup_log:51: Solar Meter_debug: Day delay Interval SolarMeter_Refresh --> 30 <0x75ad7520>
50 08/08/19 15:56:21.494 luup_log:51: Solar Meter_debug: It’s Daytime or Solarman: use modified Day delay Interval SolarMeter_Refresh --> -1565276141 <0x75ad7520>
50 08/08/19 15:56:21.495 luup_log:51: Solar Meter_debug: Update was late, try again in 60s <0x75ad7520>
50 08/08/19 15:56:21.495 luup_log:51: Solar Meter_debug: Interval to SolarMeter_Refresh --> 60 <0x75ad7520>
50 08/08/19 15:56:21.500 luup_log:51: Solar Meter_debug: Last Refresh was : Thu Jan 1 00:00:00 1970 <0x75ad7520>
50 08/08/19 15:56:21.501 luup_log:51: Solar Meter_debug: Next poll is at : Thu Aug 8 15:57:21 2019 <0x75ad7520>

Solarman Users… Right - I have simplified and sped up the process, it now only needs the Solarman details URL. I have also fixed a couple of bugs / scaling factors that did not show up when testing late at night :yawning_face:

Still no guarantees, especially as I am not testing on a clean install, but comments welcome.

Cheers
Octo
SolarMeter Solarman.zip (14.8 KB)

Hi Octo,
Thanks for your work on this, i’ll try it later today and let you know.

Just noticed that the scaling factor issue I had was due to the scaling changing in the web response; the PV generated is given sometimes in W and sometimes in kW. I will add a line to check the units later.
Octo

Hi Octo,
The new code does not appear to work and retrieves no data, i tried it on a clean install and did not get anything. I put the previous code back in and started getting BatterySOC and inhouse, togrid.
More than happy to keep testing if you have time.

Cheers

Hi Somerset,
My guess would be that it is a problem with the URL for the details page. Can you check the URL string is visible on the Settings tab, and/or look in the log file to see if the URL is there and getting any response.
I am just testing the kW/W fix, and trying to work out why the website return only seems to update every other fetch… feel free to post or pm me the log.
Cheers

Hi Octo,
I have two vera’s -
When i did a clean install the url was not visible in the settings tab, i would paste it in and reload but it would disappear.
However in the already installed version the URL was showing in settings but the figures then failed to update.
I’ll PM you the lua log shortly.
Cheers

Ho somerset,
I have now got the same issue with the URL vanishing, it gets replaced with “undefined” when saving on my system. Very strange, is it was working when I had 2 URLs, and I only deleted two lines. More strange,… it works fine loading and saving the URL when I use the Settings tab on the ALTUI version. !?
I lost most of the afternoon fastening down my solar panels ahead of the forecast winds and this evening trying to down the URL issue… without any luck. I’ve left that for now, and looked at why the parameters are not being found. It appears Solarman put the values in different locations, so what is [1] on mine was [7] on yours system. To make it more resilient, I have added a section to search through the data, find the values by name rather than index. There should be a better way to do that in json, but I don’t know what that would be.
Anyway, that SEEMS to work; need some sun to make sure, but will post what I have for now. I’ll also try again to see why the URL save does not work on cmh interface.
BTW - are there any other parameters that you would like to see extracted?

Cheers

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules