ZeverCloud_ReadData

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

ZeverCloud_ReadData

Post by JanAtHome »

Hello
i try to get data from my solarcloud to domoticz, i get data but the json format i dont understand.
Can some one help me?

Domoticz log

Standard WebPage Json view

Code
Last edited by JanAtHome on Wednesday 07 February 2018 11:06, edited 2 times in total.
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: ZeverCloud_ReadData

Post by dannybloe »

Can you print/log the response.statusCode and domoticz.log(response.headers). I suspect that the mime-type for the response is not application/json and then dzVents doesn't set the isJSON flag (and doesn't parse the json).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome »

Ok i will make the log,
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome »

Ok i have loged the DATA

2018-02-08 16:39:01.741 dzVents: Info: {["Content-Type"]="text/plain;charset=UTF-8", ["Connection"]="keep-alive", ["EagleId"]="c33b46ca15181043407851967e", ["Via"]="cache14.l2hk1[287,200-0,M], cache29.l2hk1[287,0], cache6.uk1[804,200-0,M], cache2.uk1[805,0]", ["X-Swift-SaveTime"]="Thu, 08 Feb 2018 15:39:01 GMT", ["Timing-Allow-Origin"]="*", ["X-Swift-CacheTime"]="0", ["X-Cache"]="MISS TCP_MISS dirn:-2:-2 mlen:-1", ["Server"]="Tengine", ["Content-Length"]="274", ["Date"]="Thu, 08 Feb 2018 15:39:01 GMT"}
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: ZeverCloud_ReadData

Post by dannybloe »

There you have it. The contrnt-type isn’t application/json. Crappy service! You can do: local json=domoticz.utils.fromJSON(item.response.data)
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome »

ok tks, i wil try that command, and see what happens.
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome »

Hello Danny
No result jet, can i PM you?
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: ZeverCloud_ReadData

Post by dannybloe »

Yes, perhaps you can attach the raw response data (get it from your browser).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome »

Hello Danny
This is the raw data from the webpage
{"sid":9187,"ludt":"2018-02-10 15:58:03","E-Today":{"unit":"kWh","value":5.3},"E-Month":{"unit":"kWh","value":146.4},"E-Total":{"unit":"MWh","value":7.25},"TotalYield":{"unit":"€","value":1449.48},"CO2Avoided":{"unit":"T","value":5.8},"Power":{"unit":"kW","value":1.63}}
Can you give me a example how to get this raw data into values.
Tks
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome »

A second way to read the data, is from the inverter, and not from the cloud, (better no internet problems)

When i get the data from the inverter direct , i get a string , maybe this is easyer.
The webpage result is then :

1 0 EAB971670029 YS9LQ8NBWRK6CQAS M11 17A31-727R+17829-719R 16:04 10/02/2018 0 1 SX00066011680017 1305 6.40 OK Error
screenshot.1940.jpg
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests