Serial Interface - IndaloTech/ramses_esp GitHub Wiki
When initially programmed the only configuration possible is via the USB Serial connection (Interface 0)
Note that all commands are case sensitive.
Once WiFi and MQTT have been configured all commands can be issued via topic 'RAMSES/GATEWAY/gateway id/cmd/cmd' NOTE: all output generated by execution of the command is only visible in the serial console
The connection to a local 2.4GHz WiFi network is performed via 2 commands
- wifi password PASSWORD
- wifi ssid SSID
Note: An attempt to connect to the network will occur when the SSID is set. If the SSID is not an Open Network the password should be specified first.
If either value is mis-typed then after the failure to connect is apparent it is necessary to re-enter one or both of the commands. Once new values have been specified it is necessary to trigger a new connection attempt with
- wifi restart
If switching to an open network it is necessary to erase the network configuration, reboot and then specify the open SSID
nvs erase nvs.net80211
reset
wifi ssid <openSSID>
- mqtt broker BROKER-URL
- mqtt user USERNAME
- mqtt password PASSWORD
e.g.
mqtt user mqtt_user
mqtt password secret
mqtt broker mqtt://192.168.253.251:1883
Note: an attempt to connect to the broker will be made as soon as mqtt broker is issued. If required, specify the username and password first.
Note: You should configure SNTP and TIMEZONE to match your host system if you are going to use MQTT.
The default OTA configuration will attempt to download the LATEST release from the ramses_esp code repository To trigger an OTA update use the following command
ota start
This will only perform an update if the device firmware version is different to the latest
version in the github repository
To force an update when the github version matches the existing device version use
ota force
To download a specific version rather than latest use
ota version <tag>
ota start
If you have cloned the RAMSES_ESP repository use the following to use your own copy.
ota url <https://github.com/your repository>
NOTE: the logic for latest and specific version paths assume github behaviour
- sntp server SERVER-NAME
e.g.
sntp server pool.ntp.org
Note: SNTP requires a device reset (software or hardware) after configuration.
- timezone TIMEZONE-STRING
The format of TIMEZONE-STRING is as specified in gnu libc documentation. These strings are easily mis-typed so the firmware includes abbreviations for the main European zones.
These abbreviations can be seen by entering the timezone command without parameters
e.g.
timezone
Supported timezones (For other zones specify full string)
GMT GMT0BST-1,M3.5.0/01,M10.5.0/02
CET CET-1CEST-2,M3.5.0/02,M10.5.0/03
EET EET-2EEST-3,M3.5.0/03,M10.5.0/04
WET WET0WEST-1,M3.5.0/01,M10.5.0/02
IST IST-1GMT0,M10.5.0/02,M3.5.0/01
To use the abbreviation just specify the abbreviation as the parameter - note: this is case sensitive
e.g.
timezone GMT
Other timezones can be specified with the full definition.
Most of the command parameters are stored in flash as NVS data.
The following commands can be used to manipulate and examine (most of) the stored parameters
- nvs dump
- nvs erase <namespace>
nvs dump
will report the stored values in each nvs namespace - except <blob> data
nvs erase <namespace>
will erase all the parameters in the specified namespace.
nvs erase *
will completely clear the NVS data.
Control the quantity of ESP LOG output (Volatile)
By default all ESP Log output is suppressed.
There is a master level of output that limits the level of output from all modules.
This can be changed using
debug master <none|error|warn|info|debug|verbose>
the log output for each module identified by the corresponding TAG
value can be controlled with
debug filter <tag> <none|error|warn|info|debug|verbose>
NOTE: <tag>
is case sensitive
- cmd
List utility commands
- reset
Trigger a software reset