Local device commands without an Internet connection
Local commands via the device's Wi-Fi network setup
Lefteris Chatzipetrou
Last Update 2 jaar geleden
For security reasons, the devices do not respond to commands over the local network by factory default settings. However, it is allowed to send commands while connected to the Wi-Fi network that the device creates a few minutes after entering Setup mode. The first steps of the process are listed here. Note that in the context of this article we are only interested in connecting to the device's AP and not in setting up the network. It is recommended that the connection to the device's Wi-Fi network be made from a laptop or computer with Wi-Fi support for convenience, but a mobile device (tablet/smartphone) can also be used.
Commands are sent locally with GET via url in the form
The list of commands is described in the command guide
For example, RSET command to read settings:
The address 192.168.4.1 is the address of the device at its Wi-Fi Access Point.
Spaces must be encoded with '+'. E.g.
Commands from LAN without connecting to the device's AP
To enable the ability to send commands from the local network, we are interested in the "iALC" setting. To enable it we can send the command SET "iALC",1

This can also be done from within the application with the setting "Allow LAN commands"

With "iALC" set to 1, we can send commands to the LAN if we know the IP of the device:

Note that with this setting, anyone who has access to the same network as the device has full control not only of reading the measurements, but also of changing settings and controlling the outputs.
HAM devices only work with DHCP, however there are methods to lock IP addresses with MAC Binding, which we describe in the article here.
The MAC Address of the device can be obtained with the command STAT

Setting up a Wi-Fi network via commands
With the methods we have seen so far, it is possible to set the device's Wi-Fi network via the command
Server change
To change the address and port of the server we are interested in the "sS_AD" and "iS_PO" settings.


In place of "server-address" we use the server address which can be a domain e.g. "hamsystems.eu" or IPv4 e.g. "192.168.1.35". In place of 9999 we use the server port. If the domain or address does not exist, then the device will not be able to connect and will operate in "offline" mode
Some features such as time keeping, battery metrics (such as energy) rely on communication with the server. The overrides of these features are given below:
Time setting
SET "TIME",unix-timestamp-integer-utc
Readings of measurements
The accumulators rely on the server to "remember" their last value. If the server has not sent last values and the device has not sent the measurements offline, the READ command does not return measurement data. In this case we can use the command
and look in the "RR" field. The value 2147483648 means that the measurement is undefined
We can define accumulators in three ways.
One adds the so far local measurement with the value we send only if it has not already received a value from the server
e.g. increase the energy by 1000 (Joule)
We can override the test for whether it is already set, using the
e.g. increased the energy by 1000 (Joule) even if it is already set by the server
Finally, we can set exactly the value we want with
e.g. setting energy to 1000 (Joule)
Interpreting measurements
The list of device model specifications is available here
The list of readings specifications can be found here