beautypg.com

4 procedure conventions, 1 procedure call (request) – SMA SUNNY WEBBOX RPC User Manual

Page 9

background image

SMA Solar Technology AG

4  Procedure Conventions

User Manual

SWebBoxRPC-BA-en-14

9

4 Procedure Conventions

All identifiers used are case-sensitive. This means that "Power" and "power", for instance, designate
two different objects. All characters are transmitted using Unicode in UTF-8 format.

4.1 Procedure Call (Request)

Each request consists of one serialized JSON object which possesses the following obligatory
members:

version — a character sequence which defines the underlying RPC version.
proc — a character sequence which contains the procedure to be called.
id — a random character sequence (max. 16 characters) which serves to assign a response to

the request.

format — a character sequence defining the data exchange format of the procedure's result

(see Section 4.2 "Return Value (Response)", page 10).

passwd — a character sequence comprising the hash value of the password for the desired

access level (user, installer). The hash value is calculated using the MD5 algorithm (see [4]).
Password allocation is performed via the security settings in the Sunny WebBox. If the object is
not transmitted, the user level is automatically assumed.

params — an object whose elements are transferred to the procedure as arguments. Each

parameter must be available in the form of a named JSON object. Hence, the sequence is
arbitrary. The number of parameters depends on the given service procedure (see Section 7).
If the requested procedure does not expect any arguments, the entry is omitted.