Plugin: Solar Meter, universal Solar Production meter

Hi Rene, I have a solar system running a 10kwh Fronius SYMO inverter, but I am also using a 13kwh LG battery and 5kwh Goodwe charger/switch. Any plan to support this type of set-up with your plugin?

Marek,
I have just looked at the documentation in the link.
There is no builtin capability that can be hooked in to get the data. Do you have the Solax interface dongle.

Octoplayer

Hi @Grant_Chapman,

For Fronius this should be supported. Are the values not populating? Are you seeing the values if you put the below in your browser?

http://[fr ip]/solar_api/v1/GetPowerFlowRealtimeData.fcgi

Cheers Rene

1 Like

SolaX Cloud API
for End-user
Version: V 1.0
Version Information
Version Editor Time Remark
V1.0 Jingke Li 2020-06-30 Creating

1 Introduction
Solax API interface document is a guide for clients to obtaining data from
Solax cloud through Http protocol. Clients can use the Solax API service to obtain
real-time info of your inverters.
2 Interface format and protocol
Solax API interface accesses Solax cloud platform data through the Http
protocol, and the data is returned in JSON format.
Interface address:https://www.solaxcloud.com:4443/proxy/api/
Return object:
Parameter name Type Description
exception String Response from server
result Object Data return
success Boolean Whether the data request is successful
Table 1
3 Interface permission
User can get a specific range of information through the granted tokenID. Please
obtain your tokenID on the API page of Solaxcloud.
4 Interface content
4.1 Request address
https://www.solaxcloud.com:4443/proxy/api/getRealtimeInfo.do?tokenId={toke
nId}&sn={sn}
4.2 Request parameter
Parameter name Importance Type Length Description Remark
sn Required STRING 10 Registration No.
(module SN)
tokenID Required STRING 23
tokenID from
Solax
Table 2
4.3 Output parameters
The Result section of the output parameters is described below.
API items Description Accuracy Unit
inverterSN Unique identifier of inverter (Serial No.) - -
sn Unique identifier of communication module (Registration No.) - -
acpower i[:].inverter.AC.power.total 1 W
yieldtoday i[:].inverter.AC.energy.out.daily 0.1 KWh
yieldtotal i[:].inverter.AC.energy.out.total 0.1 KWh
feedinpower GCP.power.total 1 W
feedinenergy GCP.energy.toGrid.total 0.01 KWh
consumeenergy GCP.energy.fromGrid.total 0.01 KWh
feedinpowerM2 i[:].address2meter.AC.power.total 1 W
soc i[:].inverter.DC.battery.energy.SOC 1 %
peps1 i[:].inverter.AC.EPS.power.R 1 W
peps2 i[:].inverter.AC.EPS.power.S 1 W
peps3 i[:].inverter.AC.EPS.power.T 1 W
inverterType Inverter type, details refer to Table 4 in appendix - -
inverterStatus Inverter status, details refer to Table 5 in appendix - -
uploadTime Update time
(format
2016-10-26
17:33:01)

Table 3
4.4 Example
https ://www.solaxcloud.com:4443/proxy/api/getRealtimeInfo.do?tokenId=2020
0722185111234567890&sn=ABCDEFGHIJ
Output:
Appendix
Inverter type Inverter status
Type code Inverter type Status code Inverter status
1 X1-LX 100 Wait Mode
2 X-Hybrid 101 Check Mode
3 X1-Hybiyd/Fit 102 Normal Mode
4 X1-Boost/Air/Mini 103 Fault Mode
5 X3-Hybiyd/Fit 104 Permanent Fault Mode
6 X3-20K/30K 105 Update Mode
7 X3-MIC/PRO 106 EPS Check Mode
8 X1-Smart 107 EPS Mode
9 X1-AC 108 Self-Test Mode
10 A1-Hybrid 109 Idle Mode
11 A1-Fit 110 Standby Mode
12 A1-Grid 111 Pv Wake Up Bat Mode
13 J1-ESS 112 Gen Check Mode
113 Gen Run Mode
Table 4 Table 5

Witam,
Czy to jest pomocne???

Solarman monitoring has stopped overnight. It looks like the web is now https instead of http, and the calling structure has changed.
I am looking into it, will post when I get it working again.

Octop

2 Likes

Hi,

The changes for Solarman are in version 1.17. Available on the ALTUI App store now, and in Vera App market soon.

Thanks to Octop.

Cheers Rene

Hi,
Thanks for the update but have tried the ALTUI app store and the version downloaded seems to be 1.16.

Bugger, forgot to update the version number in the code again. It has the solarman changes in though.

Cheers Rene

Rene,
I have downloaded the lua via github, but the changes don’t work for SolarMan :frowning:
I get the same error message as I put in the PM, the httpCode shows error 301 and the log says

50 08/31/20 16:51:57.101 luup_log:315: Solar Meter_debug: Solarman URL https://home.solarman.cn/cpro/device/inverter/goDetailAjax.json <0x74903520>
01 08/31/20 16:51:57.756 luup_log:315: Solar Meter_error: Refresh failed HTTP Get to https://home.solarman.cn/cpro/device/inverter/goDetailAjax.json failed. <0x74903520>
50 08/31/20 16:51:57.756 luup_log:315: Solar Meter_debug: HTTP Get to https://home.solarman.cn/cpro/device/inverter/goDetailAjax.json failed. <0x74903520>

That is why I reverted to the Curl format, although the headers etc are the same, that works, and I have no idea why the request format does not…
Does it need your https request wrapper to support it?

Cheers
Octo

Its updated the installed version but still does not seem to be working.

Hi Octo,

The HttpsWGet wrapper is currently just for a GET request, not for POST that solarman needs. Maybe adding these three lines from the wrapper to the solarman in the request may help:

protocol = "any",
options =  {"all", "no_sslv2", "no_sslv3"},
verify = "none",

However, a 301 redirect is handled badly in the Luasockets in the version that is on the Vera. Curl may be needed indeed. Sorry I miss understood and thought you had it working.

Let me know if the three lines above make a difference, else curl it needs to be.

Cheers Rene

Rene
Non, I added those to the call, but still got the error message.
I have added the Curl command version into V17, and uploaded in github.
I’ll PM it to you if it is not visible on the branch, as I’m not sure if the branch still exists or has been merged/closed.

Thanks
Octo

Hi Octo,

I am not seeing a pull on github, but will lookup your branch and include it later today.

Cheers Rene

Hi @Octoplayer, @somersetdude,

I forgot one critical s charachter in the changes. Of the httpS.request. The version on github now should work. The Vera App market is down (cannot login) so for now you have to grab the L_SolarMeter1.lua from the zip down two articles and upload your self.

Cheers Rene

Hi Rene,
Thanks but I download the zip and uploaded just the L_SolarMeter1.lua into vera using -develop apps-Luup files and now i have cannot detect device.

Cheers

Rene,
Ummm… the zip file is entirely missing the Solarman code section. It is from 2018.
The Github version IS working for me, so I have zipped that here for SomersetDude:

L_SolarMeter1.zip (11.4 KB)
Many thanks

Octo

Sorry, wrong file indeed. Trying too many things at the same time. Never smart. :grimacing:

Easy to do; still kicking myself for not thinking of changing the function name :slight_smile:
Octo

Perfect ! :ok_hand:
Thanks Rene and Octo :smiley:

1 Like