ZeverCloud_ReadData

Easy to use, 100% Lua-based event scripting framework.
Post Reply
JanAtHome
Posts: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

ZeverCloud_ReadData

Post by JanAtHome » Wednesday 07 February 2018 11:43

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
Attachments
screenshot.1928.png
screenshot.1928.png (109.12 KiB) Viewed 644 times
screenshot.1929.jpg
screenshot.1929.jpg (50.56 KiB) Viewed 644 times
screenshot.1927.jpg
screenshot.1927.jpg (74.02 KiB) Viewed 648 times
Last edited by JanAtHome on Wednesday 07 February 2018 12:06, edited 2 times in total.

dannybloe
Posts: 1480
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: ZeverCloud_ReadData

Post by dannybloe » Thursday 08 February 2018 8:32

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: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome » Thursday 08 February 2018 16:58

Ok i will make the log,

JanAtHome
Posts: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome » Thursday 08 February 2018 17:40

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: 1480
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: ZeverCloud_ReadData

Post by dannybloe » Thursday 08 February 2018 18:24

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: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome » Thursday 08 February 2018 21:35

ok tks, i wil try that command, and see what happens.

JanAtHome
Posts: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome » Saturday 10 February 2018 12:13

Hello Danny
No result jet, can i PM you?

dannybloe
Posts: 1480
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: ZeverCloud_ReadData

Post by dannybloe » Saturday 10 February 2018 13:56

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: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome » Saturday 10 February 2018 17:02

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: 31
Joined: Wednesday 10 January 2018 17:49
Target OS: Raspberry Pi
Domoticz version: 38153
Location: Raalte Holland
Contact:

Re: ZeverCloud_ReadData

Post by JanAtHome » Saturday 10 February 2018 17:15

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
screenshot.1940.jpg (50.65 KiB) Viewed 564 times

Post Reply

Who is online

Users browsing this forum: robino and 3 guests