Introduction

This document briefly explains all relevant configuration commands supported by HA-EA devices, including syntax, parameters and command examples.

Created: 30/08/2021
Last modified: 26/05/2022
Version: 6
Created by: Lukas D'Angelo

Note: This reference is valid for FW-builds as of 05/2022.

Basic Commands

help

The help or ? command shows a list of all commands supported by the current HA-EA platform.

Syntax

help

Parameters

None

Example

$ help
clear     Clears the Terminal Screen
defaults  Load default Configuration
diagmode  Diagnostic Mode Configuration Commands
fwupdate  Update the System Firmware
hostname  Set Hostname of the System
hw        Hardware Platform Configuration Commands
ip        Internet Protocol Configuration Commands
mqtt      MQTT Protocol Configuration Commands
password  Set Management Password of the System
restart   Restart the System now
save      Save running Configuration to Flash
show      Show System Parameters
telnet    Telnet Management Configuration Commands
username  Set Management User of the System
wifi      WiFi Interface Configuration Commands

Note: ? is also used to give hints about the syntax or options of a command.

$ ip ?
  address       Set the IP-Address of the System
  netmask       Set the Netmask
  gateway       Set the Default Gateway
  nameserver    Set the Nameserver for DNS Resolution

clear

The clear command clears the terminal screen if supported by the terminal.

Syntax

clear

Parameters

None

Example

$ clear

defaults

The defaults command loads the default system configuration.

Syntax

defaults

Parameters

None

Example

$ defaults
Info: Loading default configuration.

Note: defaults does not load the default system configuration to the persistent memory.

restart

The restart command will restart the device.

Syntax

restart

Parameters

None

Example

$ restart
Info: System is restarting now.

Note: When executing restart, all device hardware states and any unsaved configuration will be lost.

save

The save command will write the running configuration to persistent memory.

Syntax

save

Parameters

None

Example

$ save
Info: Saving running configuration to flash.

show

The show command displays system configuration parameters and system status elements.

Syntax

show option

Parameters

Option Value Description
config - shows running system configuration
diagmode - shows diagnostic mode settings
ethernet - shows ethernet interface parameters and information
hostname - shows system hostname
hw - shows hardware platform parameters
info - shows system hardware and software information
ip - shows system IP information
mqtt - shows MQTT protocol settings
password - shows system management password
username - shows system management user
telnet - shows telnet management settings
time - shows system time
wifi - shows WiFi interface parameters and information
wifi-networks - scans and shows local WiFi networks

Example

$ show ip
DHCP: DISABLED
IP-Adress of WiFi Interface: 10.0.10.31
Subnet Mask: 255.255.255.0
Default Gateway: 10.0.10.1
IP-Address of Nameserver: 10.0.10.1

Management & Maintenance Commands

diagmode

The diagmode is used to configure diagnostic message output and transmission behaviour.

Syntax

diagmode option value

Parameters

Option Value Description
terminal enable enables printing diagnostic messages to the terminal
terminal disable disables printing diagnostic messages to the terminal
mqtt enable enables the generation of a json string containing diagnostic information which can be published over MQTT
mqtt disable disables the generation of a json string containing diagnostic information which can be published over MQTT

Example

$ diagmode terminal enable

fwupdate

The fwupdate is used to upgrade the system firmware over the network. HTTP is used for transferring the firmware.

Syntax

fwupdate option value

Parameters

Option Value Description
url url the URL of the firmware binary file with format http://HOSTNAME:PORT/PATH

Example

$ fwupdate url http://10.0.10.73:80/firmware/firmware.bin

Note: After loading the file, the command outputs the md5sum of the received file so a successful transmission can be veryfied manually. restart is required to apply the new firmware.

hostname

The hostname command configures the system hostname.

Syntax

hostname value

Parameters

Option Value Description
- hostname the hostname of the system

Example

$ hostname HA-EA

password

The password command configures the password of the system management user.

Syntax

password option value

Parameters

Option Value Description
plain-text password sets the user password and stores it in plain text
crypt password sets the user password and stores a SHA-256 hash of it

Example

$ password crypt ultrasecurepassword
Info: System password set successfully.

ntp

The ntp command configures the parameters for the NTP clock synchronisatrion protocol.

Syntax

ntp option value

Parameters

Option Value Description
server hostname sets the ntp server hostname or IP-address
crypt timezone sets the system timezone in POSIX format

Example

$ ntp server it.pool.ntp.org
$ ntp timezone CET-1CEST,M3.5.0,M10.5.0/3

Note: use POSIX timezones strings as cheat-sheet.

username

The username command configures the username of the system management user.

Syntax

username value

Parameters

Option Value Description
- username the username of the system management user

Example

$ username root

telnet

The telnet command configures the telnet management parameters.

Syntax

telnet option value

Parameters

Option Value Description
mgmt enable enables telnet management
mgmt disable disables telnet management
port port sets the TCP-port for telnet management

Example

$ telnet mgmt enable
$ telnet port 23

MQTT Commands

mqtt

The mqtt command configures the MQTT protocol parameters and MQTT publishing behaviour.

Syntax

mqtt option value

Parameters

Option Value Description
server hostname configures the IP-address or hostname of MQTT server
port port configures the TCP port for MQTT of the server
username username configures the MQTT username
password password configures the MQTT password
topic-relays topic configures the customizable part of the subscribe and publish topic for the relays
topic-sensor topic configures the customizable part of the publish topic for the sensor data
topic-input-state topic configures the customizable part of the subscribe and publish topic for the input states
topic-diagdata topic configures the publish topic for the diagnostic data json string
send-interval-relays-state interval configures the send interval for relay state in seconds
send-interval-sensor interval configures the send interval for sensor data in seconds
send-interval-diagdata interval configures the send interval for diagnostic data json string data in seconds

Example

$ mqtt topic-relays /heating/outputs

This command will make the device subscribe to the following topics:

/heating/outputs/K0
/heating/outputs/K1
/heating/outputs/K2
....
/heating/outputs/KN

where N+1 is the number of relays to control on the current platform or stack. The payload received with the topics listed above will determine the platform relay state. If "0" is received in the payload of topic /heating/outputs/KX, the corresponding relay KX is deactivated, if "1" is received, the corresponding relay KX is activated. Other payload is ignored.

If the state of a relay is changed, the device will publish the new relay state with the corresponding topic contained in the list:

/heating/outputs/K0_state
/heating/outputs/K1_state
/heating/outputs/K2_state
....
/heating/outputs/KN_state

The payload for deactivated is "0" and "1" for activated.

$ mqtt topic-sensor /sensors

This command sets the first part of the topic of the sensor data to /sensors. The second part is automatically appended by the device and is based on the sensor address. For example, the device publishes the sensor values according to the following topics if 2 sensors are connected:

/sensors/28bb2651080000f7
/sensors/282cdd500800009a

The payload contains the sensor value, e.g. 21.13.

If inputs are supported by the device, the command

$ mqtt topic-input-state /inputs

will make the device publish the states of the inputs on change with the corresponding topic contained in the list:

/inputs/I0
/inputs/I1
/inputs/I2
....
/inputs/IN

N+1 is the number of inputs supported by the current platform. The payload for voltage presence on the input is "1" and "0" for absence.

$ mqtt topic-diagdata /diagnostics

This command defines the topic of the publish topic for the diagnostic data json string to /diagnostics. The payload string for a device with WiFi enabled looks like

{"MAC":"A4:CF:12:BC:2B:6C",
  "hostname":"HA-EA",
  "free_heap":40872,
  "free_flash":2756608,
  "rssi":-72,
  "ssid":"WAP_INT",
  "bssid":"60:31:97:F8:C6:83"}

The command

$ mqtt send-interval-sensor 300

will make the device send the sensor payload string every 5 minutes.

Note: A interval of 0 will disable periodic sending.

Interface Commands

ethernet

The ethernet command is used to enable or disable the ethernet interface.

Syntax

ethernet option

Parameters

Option Value Description
enable - enables the ETHERNET interface and disables the WiFi interface
disable - disables the ETHERNET interface and enables the WiFi interface

Example

Enabling the ETHERNET interface:

$ ethernet enable
Info: WiFi interface disabled

ip

The ip command configures the IP-address of the system, the default gateway and the DNS server. If ETHERNET is supported by the platform, the configurations applies to both the WiFi and ETHERNET interface. The interfaces cannot be used simultaneously.

Syntax

ip option value

Parameters

Option Value Description
address ip-address configures the IP-address of the system, DHCP for IP auto-configuration
netmask netmask configures the network mask
gateway ip-address configures the IP-address of the default gateway
nameserver ip-address configures the IP-address of the DNS server

Example

IP autoconfiguration:

$ ip address DHCP

Note: This command will also attempt autoconfiguration of netmask, gateway and nameserver. Any static configuration of these values is ignored if IP autoconfiguration is enabled.

Static IP configuration:

$ ip address 192.168.1.201
$ ip netmask 255.255.255.0
$ ip gateway 192.168.1.1
$ ip nameserver 1.1.1.1

wifi

The wifi command is used to configure the WiFi interface.

Syntax

wifi option value

Parameters

Option Value Description
enable - enables the WiFi interface and disables the ETERNET interface if present
disable - disables the WiFi interface and anables the ETERNET interface if present
station-ssid SSID configures SSID of the WiFi network to be connected
station-psk PSK configures PSK of the WiFi network to be connected
soft-ap-mode active activates the soft AP feature of the system for management
soft-ap-mode inactive deactivates the soft AP feature of the system for management
soft-ap-ssid SSID configures SSID of the soft AP feature
soft-ap-psk PSK configures the PSK of the soft AP feature

Example

Enabling the WiFi interface:

$ wifi enable
Info: Ethernet interface disabled

Setting up the WiFi network:

$ wifi station-ssid WAP_INT
$ wifi station-psk ultrasecurepsk

HW Platform Commands

hw

The hw command is used to configure the hardware platform.

Syntax

hw option value

Parameters

Option Value Description
relay-count INT number of relays to control on the device or stack
one-wire-mode dallas enables the Dallas Semiconductor 1-Wire protocol
one-wire-mode dht reserved for future use (enables the DHT protocol)
one-wire-scan - scans the 1-Wire BUS for sensors
io-passthrough-mode disable disables the I/O passthrough (for selected models only)
io-passthrough-mode direct sets direct I/O passthrough (for selected models only)
io-passthrough-mode toggle sets I/O passthrough mode to toggle (for selected models only)

Example

Required command to make outputs of a HA-EA-S platform work:

$ hw relay-count 8

Note: For a stack configuration, the total number of relays has to be set.

Required command to enable support for DS18B20 sensors:

$ hw one-wire-mode dallas

If we want to directly passthrough the state of an input to the corresponding output, we set:

$ hw io-passthrough-mode direct

If we want to toggle the output if the state of an input changes, we set:

$ hw io-passthrough-mode toggle

Note: I/O passthrough is only available on models with inputs and outputs.