After the command help takes a lot of FLASH memory, it has been moved to this document here. Most commands without DEBUG MODE are listed.
Print OK
Ignore comment
Enter deep sleep
Reset device. If s
is provided, it will reboot in SAFE MODE.
Discard changes and load settings from EEPROM/NVS
Store current settings in EEPROM/NVS
Dump config information and data
dirty
show modified entries onlyjson
use JSON as output format
Restore factory settings (but do not store in EEPROM/NVS)
Restore factory settings, store in EEPROM/NVS and reboot device
dump
dumps the NVS partition debug info. Only available if compiled instats
display NVS statisticsformat
formats the NVS partition, restores factory settings and stores it. Reboot the device to apply all new settings. Formatting a NVS partition that has been used for quite some time can free up some heap. The status page shows the amount of heap being used for it and should not exceed 1.5-2KB for a 32KB partition
NVS flash storage max. size 32KB, 86.6% in use
NVS init partition memory usage 1312 byte
Stored items 34, size 0.60KB
For the ESP8266 and its custom NVS implementation, esptool.py can be used to clear a full or corrupted NVS partition that prevents the device to boot. Usually this is detected automatically, and the entire nvs
partition is formatted. The current custom implementation of NVS for NONOS_SDK has not been tested very well
Note: The region in the example can be different depending on the flash layout being used (eagle...ld
, name nvs
)
TODO: Implement a command for PIO for format NVS
python .platformio/packages/tool-esptoolpy/esptool.py erase_region 4009984 32768
For the ESP32, check the documentation for NVS
Enable/disable AT Mode if compiled in
Display heap usage every interval (can be 1s or 1000ms, 0 shows it once). If umm
is added, the umm heap statistics are displayed (ESP8266 only)
Display GPIO pin states every interval (can be 1s or 1000ms, 0 shows it once)
+PWM=<pin>,<input|input_pullup|high|low|waveform|level=0-1023[,<frequency=100-40000Hz>[,<duration/ms>]]
Control PIN input, output and PWM state. Setting a PIN high or low implicitly sets it to output.
Call delay(milliseconds)
Display file contents
Create directory
Remove file or directory
Open file in append write mode. This will change the last modification time if the file system supports mtime or create the file if it does not exist. All directories will be created if they do not exist
Rename file or directory
+LS=[<directory>[,<hidden=true|false>,<subdirs=true|false>]]
List files and directories
List files and directories using FS.openDir(). This will not display read only virtual files.
Start/stop Arduino OTA (requires about 1K RAM to run)
Plugin management. If a plugin malfunctions, it can be blacklisted in SAFE MODE.
Display RTC status or set RTC time from current time. Only available with a real time clock (i.e. DS3231)
RTC memory access
Run WiFi command
- reset Reset WiFi connection
- on Enable WiFi station mode
- off Disable WiFi station mode
- list[,] List WiFi networks.
- cfg,[<...>] Configure WiFi network
- ap_on Enable WiFi AP mode
- ap_off Disable WiFi AP mode
- ap_standby Set AP to stand-by mode (turns AP mode on if station mode cannot connect)
- diag Print diagnostic information
- stl List available WiFi stations
- next Switch to next WiFi station
- stop_ping Stop pinging the gateway (Only if compiled in)
Set internal LED mode or an LED on a certain PIN.
Set NeoPixel colors for a given PIN if available
Displays versions of the SDK, framework, libraries, memory addresses and a lot more. Available in DEBUG mode only
Ping host or IP address if compiled in
PWM output on PIN, min./max. level set it to LOW/HIGH" using digitalWrite
Show reset detector status
Clear reset detector status
Run command
info
show statisticslist
list crash logsprint
show stack trace for a crash logclear
clear all data (marks used sectors as invalid, they will be re-used and formated once no free sectors are available)format
format all savecrash data sectors
+savecrash=info
+SAVECRASH: entries=1 size=1068 capacity=124620
+SAVECRASH: free space=123492 largest block=4020
+savecrash=list
<001> 2023-07-25T04:51:45 PDT reason=LoadStoreErrorCause epc1=0x00000003 epc2=0x40101675 epc3=0x00000000 excvaddr=0x402b9437 depc=0x400287c1 version=0.0.8.b13160
md5=eddacbc1184a156d22844c6a9e387742 stack-size=1008
+savecrash=print,1
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Firmware 0.0.8.b13160
MD5 eddacbc1184a156d22844c6a9e387742
Timestamp 2023-07-25T04:51:45 PDT
Exception (3):
epc1=0x40101675 epc2=0x00000000 epc3=0x402b9437 excvaddr=0x400287c1 depc=0x00000000
>>>stack>>>
sp: 3ffff970 end: 3fffffd0 offset: 0270
3ffffbe0: 00000000 3ffffcb0 3fff1b0c 3fff0550
3ffffbf0: 3ffffc90 40264a60 00000020 401018fc
...
3fffffc0: feefeffe feefeffe 3fffdab0 4010078d
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
+savecrash=clear
+SAVECRASH: SaveCrash logs erased
+savecrash=info
+SAVECRASH: entries=0 size=0 capacity=124620
+SAVECRASH: free space=124560 largest block=4020
Configure I2C Bus
Transmit data to slave
Request data from slave
Scan I2C Bus for devices.
list
display all PIN pairs that will be scannedany
probes all available PINs for I2C devices. The UART used for debug output and the Flash SPI GPIOs are excludedno-init
skips re-initializing the I2C Bus
NOTE: Available only if compiled in
Test peak values. WARNING! This command will bypass all protections and limits
Run command
- vis[ualizer],
- br[ightness],
- co[lor],<#RGB|r,b,g>
- pr[int],<display=00:00:00>
- tem[perature],
- lo[op],<enable|disable>
- met[hod]<fast|neo|neoex> (FastLED|Adafruit NeoPixel|NeoPixelEx)
- ani[mation][,<solid|gradient|rainbow|rainbow-fastled|flash|color-fade|fire|interleaved>][,blend_time=4000ms]
- out[put],<on|off>
- dit[her],<on|off>
- co[lor],<#color>
- map,,,<reverse_rows>,<reverse_columns>,,
- cl[ear]
- res[et][,<pixels=116>]
- test,<1=pixel order|2=clock|3=row/col>[,#color=#330033][,<brightness=128>][,<speed=100ms>]
- get[,]
- set,<range(=0-7)>,[#color]
Display LEDs over http2serial. Requires a proxy that listens to UDP and sends the data back over a web socket. An example can be found in scripts\udp2ws_proxy
Enable/disable function
Set backlight level
Update weather info/forecast
Show Moon Phase for given date. Only available in DEBUG MODE
Query MDNS
Configure MDNS
Open, close a channel, stop motor or run tone test, play imperial march, set initial state
Disable auto sleep or set timeout in seconds
Send battery status every n seconds to MQTT and to UDP server, 10 times in a row. If the time is 0, it is sent once.
Calculate battery capacity for given voltage
Create a table for the given voltage range
Manage MQTT
con[nect] Connect to server dis[connect][,<true|false>] Disconnect from server and enable/disable auto reconnect set,<enable,disable> Enable or disable MQTT top[ics] List subscribed topics auto[discovery][,restart][,force] Publish auto discovery list[,<full|crc|file>] List auto discovery (file = /.logs/mqtt_auto_discovery.json)
Set backlight level
Update weather info/forecast
Flash .HEX file to AVR MCU over Serial Port (requires bootloader)
NOTE: If the process fails, check if the voltage does not drop too much during the process
For example: +STK500V1F=/stk500v1/atomicsun-firmware-2.2.3-328pb.hex
+STK500V1F: Flashing /stk500v1/atomicsun-firmware-2.2.3-328pb.hex on Serial
Input file validated. 27750 bytes to write...
Connected to bootloader...
Device signature = 0x1e950f
Writing: | ################################################## | Complete
Reading: | ################################################## | Complete
27750 bytes verified
Programming successful (22 seconds)
Done
Set signature (available names in /stk500v1/atmega.csv
)
Display signature
Debug log file is stored in /stk500v1/debug.log
Get level(s)
Set level
Hard reset MCU
Write EEPROM
Display dimmer info and config over serial port
+REM=MOSFET Dimmer 2.2.3 Nov 22 2022 17:50:49 Author [email protected]
+REM=sig=1e-95-16,fuses=l:ff,h:da,e:f5,MCU=ATmega328PB@8Mhz,gcc=7.3.0
+REM=options=EEPROM=62,NTC=A0,int.temp,VCC,fading_events=1,proto=UART,addr=17,mode=T,timer1=8/1.00,lvls=8192,pins=6,8,9,10,cubic=0,range=0-8192
+REM=values=restore=1,f=60.342Hz,vref11=1.100,NTC=27.20/+0.00,int.temp=36/ofs=88/gain=156,max.temp=75,metrics=5,VCC=3.229,min.on-time=300,min.off=300,ZC=110,sw.on-time=0/0
Write EEPROM and configuration
Restore ATMega factory settings
Set zero crossing offset (16bit) in CPU cycles (16MHz = 62.5ns). The EEPROM must be written to store the value permanently
Increase or decrease zero crossing offset