313
Appendix
25.6.1 Open JSON Interfaces
The JavaScript Object Notation (JSON) is a compact data format to transmit data between applications.
The objects documented here can be used in connection with other programs.
The open JSON interface can be activated and deactivated from the
Configuration | System | Access
control
menu. When activating the interface, a red warning triangle with security information and risks is
displayed.
Note
The open JSON interface is deactivated after updating to firmware 3.5.3 build 86 and a
factory reset. To activate the open JSON interface, the user password has to be defined
first.
The current data can be accessed via HTTP protocol. To do this an HTTP Post Inquiry needs to be sent to
the Solar-Log™. The object requested has to be in the body:
POST /getjp HTTP/1.1
Host: solar-log-xxxx
...
Content Length: 20
Connection: keep-alive
Pragma: no-cache
Cache Control: no-cache
{„801“:{„170“:null}}
The reply contains a JSON object as a character string in the body:
HTTP/1.1 200 OK
Date: Mon, 31 Mar 2014 10:42:32 GMT
Server: IPC@CHIP
Content-Type: text/plain
Transfer-Encoding: chunked
{„801“:{„170“:{„100“:“31.03.14 10:42:15“,“101“:0,“102“:0,“103“:0,“104“:0,“105“:0,“106“:0,“107“:3527647,
“108“:0,“109“:0,“110“:0,“111“:0,“112“:0,“113“:1132434,“114“:0,“115“:0,“116“:45000}}}
The JSON character sting needs to be converted to an object first before it can be data can be processed
in a Java script. For example, when the JSON character string contains the variable "tdata" the conversati-
on looks like this: