Device Setup: Commands
The following gives an overview of possible commands that can be sent to a device. Some commands are only applicable to specific box types.
logicvalue
Used for changing values used in a logic.
Structure:
logicvalue;logic1;logic2;logic3;[...]logic90
Example:
logicvalue;1.2;15;23.1;;;8;7;4
Response:
Logic changed: <message>
Applicable:
- Pro Box
- Advanced Box
RS232
Sends a serial message over the RS232 network and returns possible replies.
Structure:
RS232;<HEX Codes separated by a comma>
(max. 50 codes)
Example:
RS232;0D,49,48
Response:
RS232 message status: <code>
Codes:1
- Success
Applicable:
- Pro Box
- Advanced Box
RS485
Sends a serial message over the RS485 network and forwards back possible responses.
Structure:
RS485;<HEX Codes separated by a comma>
(max. 50 codes)
Example:
RS485;0D,49,48
Response:
RS485 message status: <code>
Codes:1
- Success
Applicable:
- Pro Box
- Advanced Box
- Audit Box
changeFTP
Changes the credentials of the FTP server.
Structure:
changeFTP;host;user;password;port;security
Example:
changeFTP;ftp.server.de;my-user;password;22;1
(changes the FTP credentials using Port 22 and a secure connection)
Response:
FTP data got changed.
Applicable:
- Pro Box
takephoto
Takes a photo with the camera (if available) and sends it to the FTP server.
Structure:
takephoto
Example:
takephoto
Response:
Taking picture <size><code> and send it via FTP
size: Size of the picture
codes:-1
- Failed (e.g. camera removed, communication problem)-3
- Invalid parameter-6
- Failed to write image to file
Applicable:
- Pro Box
sendpictures
Sends all photos from one day (stored on the SD card) to the FTP server.
Structure:
sendpictures;0_<date>
Date format: YYMMDD
Example:
sendpictures;0_221204
(4th December 2022)
Response:
Sending pictures: 0_221204
Applicable:
- Pro Box
getcamset
Gets the current camera settings for the requested type.
Structure:
getcamset;type
types:
1
- Brightness2
- Contrast3
- Saturation4
- Hue5
- Auto gain6
- Auto white balance7
- Adjust white balance.8
- Red Balance9
- Blue balance10
- Gamma11
- Power line frequency filter: 0 = Disabled, 1 = 50Hz, 2 = 60Hz, 3 = Auto(if supported)12
- Auto exposure: 0 = Auto, 1 = Manual, 2 = Shutter priority, 3 = Aperture priority.13
- Absolute exposure. Exposure time in 100μs units.14
- Allow dynamic frame rate when Auto exposure is Auto or Aperture priority
Example:
getcamset;3
(get saturation setting)
Response:
Get camParameter Type: <type>, Value: <setting>
Applicable:
- Pro Box
setcam
Changes camera settings for the specified type.
Structure:
setcam;type;value
types:
1
- Brightness2
- Contrast3
- Saturation4
- Hue5
- Auto gain6
- Auto white balance7
- Adjust white balance.8
- Red Balance9
- Blue balance10
- Gamma11
- Power line frequency filter: 0 = Disabled, 1 = 50Hz, 2 = 60Hz, 3 = Auto(if supported).12
- Auto exposure: 0 = Auto, 1 = Manual, 2 = Shutter priority, 3 = Aperture priority.13
- Absolute exposure. Exposure time in 100μs units.14
- Allow dynamic frame rate when Auto exposure is Auto or Aperture priority
Example:
setcam;1;4
(set brightness to 4)
Response:
Set camParameter Type: <type>, Value: <setting>
Applicable:
- Pro Box
search_modbus
Trying to get responses in a Modbus RTU network, by testing different IDs. Function Code and RegisterAddress are fixed in such a case.
Structure:
search_modbus;ID;FunkCode;Length;RegisterAdr
Example:
search_modbus;11;3;25;19
(Searches all Modbus IDs from 11 to 36 (25 in total) by testing RegAdress 19 with FunctionCode 3)
Response:
Modbusdevices found at: <list of all IDs>
Applicable:
- Pro Box
- Advanced Box
search_regs
Trying to get responses in a Modbus RTU network, by testing different RegisterAddresses. Function Code and ID are fixed in such a case.
Structure:
search_regs;ID;FunkCode;Start;length;steps;time
Example:
search_regs;12;3;3001;250;1;60
(searching RegAdresses from 3001 to 3251 in steps of 1 on Mod-ID 12 with FunctionCode 3)
Response:
Modbusrespondes found at Reg: <list of all RegAddresses>
Applicable:
- Pro Box
- Advanced Box
test_protocol
One time test of single EcoPhi protocols.
Structure:
test_protocol;ID;protocol;IP
Example:
test_protocol;12;3001;
(testing EcoPhi Protocol 3001 on Mod-ID 12 without using an IP (IP is only required if it’s a TCP protocol))
Response:
Protocol: 3001 at ID: 12 and IP: " " SUCEEDED!
Applicable:
- Basic Box
- Pro Box
- Advanced Box
restart
Command to restart device.
Structure:
restart
Example:
restart
Response:
Doing a restart.
Applicable:
- Basic Box
- Pro Box
- Advanced Box
- Audit Box
clamp
Changes the size of the current clamps for an SPM93 energymeter with Mod-ID=1 (Audit Box). Possible sizes: 300,500,1500,2500,5000 (others possible upon request)
Structure:
clamp;size
Example:
clamp;1500
(changes clamp size to 1500A)
Response:
Changing clamp sizes to: <size>
Applicable:
- Audit Box
newether
Used to change the Ethernet (LAN) settings of the device. Is mainly needed if Modbus TCP is used.
Structure:
newether;ethernet_ip;ethernet_gateway;ethernet_Subnet;ethernet_DHCP;ethernet_AutoDNS;ethernet_DNS1;ethernet_DNS2;iFace
ethernet_ip
: e.g. 192.168.0.1
ethernet_gateway
: e.g. 0.0.0.0
ethernet_Subnet
: e.g. 255.255.0.0
ethernet_DHCP
: 1=yes, 0=no
ethernet_AutoDNS
: 1=yes, 0=no
ethernet_DNS1
: 1=yes, 0=no
ethernet_DNS2
: 1=yes, 0=no
iFace
: 2 or 3 (usually 2, in rare cases 3)
Example:
newether;192.168.0.1;0.0.0.0;255.255.0.0;0;0;0;0;2
Response:
No confirmation if it worked
Applicable:
- Pro Box
- Advanced Box
- Audit Box
ping
Command to control whether an IP address in an Ethernet responds
Structure:
ping;iFace;IP
iFace
: usually 2, in rare cases 3
IP
: IP address to be checked
Example:
ping;2;192.168.1.8
Response:
Ping request executed. IP: 192.168.1.8 response time: 35 ms
Applicable:
- Pro Box
- Advanced Box
- Audit Box
TCP
Sends a Modbus TCP command via the Ethernet.
Structure:
TCP;Mod-ID;FunctionCode;Reg-Address;Amount;IP
(FunctionCode: 3
,4
und 6
supported)
Example:
CP;4;3;40071;2;192.168.1.8
Response:
Id: <Mod-ID> Reg: <Reg-Adr> : <result>
Applicable:
- Pro Box
- Advanced Box
MOD
Sends a Modbus RTU command via RS485.
Structure:
RTU;Mod-ID;FunctionCode;Reg-Address;Amount
Example:
MOD;4;3;40071;2
Response:
Id: <Mod-ID> Reg: <Reg-Adr> : <result>
Applicable:
- Pro Box
- Advanced Box
- Audit Box
sendSMS
Sends an SMS using the local SIM card
Structure:
sendSMS;recieversnumber;Text
Example:
sendSMS;+9123456789;This is a test message
Response:
Sending SMS: “<text>”, to “<number>” status : <code>
codes:
0
If successful.1
If general error.2
If CMS/CME error (error on GSM net).3
If not connected to a base station.4
If GSM module is not powered on5
If GSM module is busy with a data call.
Applicable:
- Pro Box
- Advanced Box
- Audit Box
callnumber
Calls a number
Structure:
callnumber;number;time;hidenumber
Example:
callnumber;+49123456789;30;1
(calls +49123456789 and waits 30 sec for a response, without showing the number (private caller))
Response:
0
Call was successful. Connection between GSM module and the call recipient established.1
No dial tone (network occupied).2
Busy (call recipient is busy).3
No answer (call recipient is not answering).4
No carrier (network problem or voice call already active).5
Not connected to GSM network.6
Call aborted by caller7
GSM Module occupied by data call.8
GSM Module not present on the device.9
Unspecified error.
Applicable:
- Pro Box
- Advanced Box
- Audit Box
conset
Order to change the SIM card settings. Some SIM cards in some countries require the Input of APN details in order to go online. This command can change these values from default. It can also be used to change WiFi-Settings. If values are empty they will stay like before. Works also with the same pattern via SMS.
Structure:
inpset;APN_NAME;APN_USER;APN_PASSWORD;WiFi-NAME;WiFi-Password
Example:
inpset;etc.com;internet;internet;;
(will set the APN to: etc.com, with the user: ”internet” and the password: “internet. WiFi name and password will stay like before)
Response:
Connection settings have been updated
Applicable:
- Basic Box
- Pro Box
- Advanced Box
- Audit Box