# SECURITY

## Before using this device you have to change the default password for the user admin. This password will be used for the AP mode hotspot, the web interface (where you are now) and the over-the-air updates. Password must be 8…63 characters (numbers and letters and any of these special characters: _,.;:~!?@#$%^&*<>\|(){}[]) and have at least one lowercase and one uppercase or one number.

New Password
Repeat password

# ?

Lights
Packet count Node count
Network BSSID Channel RSSI IP
TELNET
Firmware name Firmware version Firmware build date Firmware size Free space Uptime Last update ?
Manufacturer Device Chip ID SDK version Core version
Free heap Load average VCC ?
MQTT Status UNKNOWN
NTP Status UNKNOWN Current time

# GENERAL

## General configuration values

Device
Hostname This name will identify this device in your network (this name will be used as DHCP hostname, thus the device will be accessible as http://<hostname>). Notice that this value may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), digits '0' through '9', and the hyphen ('-'). The hostname can neither start or end with a hyphen.
For this setting to take effect only on initial connection to the network, make sure to `Reconnect` if the device is already connected.
Description Human-friendly name for this device. It will be displayed in the WebUI and reported with the heartbeat.
For example, it can be used to specify the device location or it's purpose.
Click repeat delay Delay in milliseconds to detect a double or triple click (from 0 to 1000ms).
The lower this number the faster the device will respond to button clicks but the harder it will be to get the expected event. Increase this number if you are having trouble triggering the event. Set this value to 0 to disable repeat detection, device will respond immediately to a single button click. When using default configuration, consider that this will disable the SoftAP button action.
You will have to reboot the device to apply this setting.
Alexa
Enabled
Advertise on the network as an Alexa compatible device
Name Instead of the global hostname setting, use this string to identify the device
Heartbeat
Mode
Message interval How often the heartbeat messages should be sent (number of seconds).
Message types
Select which message types will be sent out with the periodic report.

# LED

## Notification LED configuration

Available modes

1. WiFi status will blink at 1Hz when attempting to connect. If successfully connected it will briefly blink every 5 seconds if in STA mode, or every second if the device is still in AP mode.
2. Follow switch will force the LED to follow the status of a given switch (defaults to the 1st switch, use the selector to change it).
3. Inverse switch is same as the above, but using the inverse status as status of the LED.
4. Find me will turn the LED ON when all relays are OFF. This is meant to locate the device at night.
5. Find me & WiFi will also follow the WiFi status, and stay mostly ON when relays are OFF and mostly OFF when any of them are ON.
6. Relay status will turn the LED ON whenever any switch is ON, and OFF otherwise. This is global status notification.
7. Relay status & WiFi will follow the WiFi status but will stay mostly OFF when relays are OFF, and mostly ON when any of them are ON.
8. Manually managed will let you manage the LED status through the API. For example, MQTT will subscribe to the "<base_topic>/led/0/set", sending a payload of 0, 1 or 2 (to toggle it) will change the LED status accordingly.
9. Always ON and Always OFF modes are self-explanatory.

# RELAYS

## Relay configuration

Synchronization
Mode
Defines how the multiple relays should be synchronized.
Interlock delay (ms) Wait for the specified time before applying the relay status, when multiple relays change simultaneously.
Individual relay settings

# CURTAIN

## Curtain configuration

General
Curtain type
Define your curtain type. It adapts the graphical view in status menu.
Curtain bootup position
Define the initial position of the curtain after a reboot or power loss.

# LIGHTS

## Lights configuration

Save values
Save channel & brightness values in settings
Save delay (ms) When `Save values` is enabled, wait for the specified time before the values are actually saved.
Use color
Enable color picker.
This option hides R (red), G (green) and B (blue) channel sliders.
Use RGB picker
Use RGB color picker. When disabled (default), use HSV (hue-saturation-value).
Use white channel(s)
When device is configured as RGB + WW (warm white) or RGB + WW CC (cold white), use RGB to balance the "warm white" channel output, leaving "Cold channel" for manual adjustments.
This option hides RGB and WW sliders!
Use color temperature
Balance between "cold" and "warm" color temperature when channel configuration has WW (warm white) and CW (cold white) channels available. When RGB is available but `Use white channel(s)` is disabled, replace RGB values with an approximation based on the current "Mireds" value. Otherwise, RGB channels will be disabled.
This option hides either WW and CW channel sliders, or RGB color picker.
Use gamma correction
Instead of RAW channel value, use a gamma-corrected one. Will only apply to RGB channels and the result may vary between devices.
Channel transitions
If enabled, channel changes will be smoothed.
Transition time (ms) Time to transition from one color to another
Transition step (ms) Time to transition from one step to the next. Must be smaller than the transition time.
MQTT group topic Sync channel values between multiple devices. Notice that every device that is subscribed to the topic should be configured to use the same brightness.

# ADMINISTRATION

## Device administration and security settings

Settings
Access
Admin password
Repeat password
The administrator password is used to access this web interface (user 'admin'), but also to connect to the device when in AP mode or to flash a new firmware over-the-air (OTA).
It must be 8..63 characters (numbers and letters and any of these special characters: _,.;:~!?@#$%^&*<>\|(){}[]) and have at least one lowercase and one uppercase or one number.
Web server
HTTP port This is the port for the web interface and API requests. If different than 80 (standard HTTP port) you will have to add it explicitly to your requests: http://myip:myport/
WebSocket Authentication
HTTP API
Enabled
Use /api/list to see all of available endpoints.
Restful
If enabled, API requests that contain data (for example, to modify the relay status) must be done using PUT. If disabled you can issue them as GET requests and add request parameters as `http://$url/api/path?key=value`. Do not enable unless it is really necessary
Key
This is the authentication token you will have to pass with every HTTP request. All API calls must either contain the Api-Key header or the apikey request parameter with the value above.
TELNET
Enable in STA mode
Turn ON to be able to telnet to your device while connected to your home router.
TELNET is always enabled in AP mode.
Authentication
Ask for the device password when starting telnet session
OTA
Upgrade The device has bytes available for OTA updates. If your image is larger than this consider doing a two-step update.

# WIFI

## You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.

Fallback SoftAP
SSID
Passphrase When specified, ESPurna will use these values in place of the hostname (see GENERAL panel) as SSID and device password (see ADMIN panel) as passphrase.
Scanning
Enabled
ESPurna will scan for visible WiFi SSIDs and try to connect to networks defined below in order of signal strength, even if multiple AP share the same SSID. When disabled, ESPurna will try to connect to the networks in the same order they are listed below. Disable this option if you are connecting to a single access point (or router) or to a hidden SSID.
RSSI threshold
When scanning is enabled, also periodically check available networks when the currently connected network RSSI is below this value.
Available networks

BSSID | AUTH | RSSI | Channel | SSID
--- | --- | --- | --- | ---

Configured networks

# SCHEDULE

## Executes actions based on the current time.

Schedules
Add schedule

# MAPPING

## Configure the map between nodeID/key and MQTT topic. Messages from the given nodeID with the given key will be forwarded to the specified topic. You can also configure a default topic using {nodeid} and {key} as placeholders, if the default topic is empty messages without defined map will be discarded.

Default topic
Default MQTT Topic. Available placeholders: {nodeid} and {key}
Specific topics

# MESSAGES

## Messages being received. Previous messages are not displayed. You have to keep the page open in order to keep receiving them. You can filter/unfilter by clicking on the values. Left click on a value to show only rows that match that value, middle click to show all rows but those matching that value. Filtered colums have red headers.

Timestamp | PacketID | SenderID | TargetID | Key | Value | RSSI | Duplicates | Missing
--- | --- | --- | --- | --- | --- | --- | --- | ---

# MQTT

## Configure message broker that will be used to send and receive messages over the network.

Broker
Enabled
Address
Port
User
Leave blank when broker allows anonymous connections. You can also use the following placeholders: {hostname}, {mac}
Password
Client ID When left blank, the firmware will generate a Client ID based on the MAC address of the chip. The following placeholders are also supported: {hostname}, {mac}
Keep Alive (seconds)
Use secure connection (SSL)
SSL Fingerprint This is the fingerprint for the SSL certificate of the server.
You can get it using https://www.grc.com/fingerprints.htm (if it is publically available)
or, using openssl. For example, on a Linux / macOS machine:
`$ echo -n | openssl s_client -connect <host>:<port> 2>∧1 | openssl x509 -noout -fingerprint -sha1 | cut -d\= -f2`
Device settings
Root Topic This is the root topic for this device. The following placeholders can be used: {hostname} and {mac} to dynamically set the value to the device hostname and MAC address respectively.
- <root>/relay/#/set Send a 0 or a 1 as a payload to this topic to switch it on or off. You can also send a 2 to toggle its current state. Replace # with the switch ID (starting from 0). If the board has only one switch it will be 0.
- <root>/pulse/#/set Toggles the switch # and toggles it back after the specified time. Time is expected as `TIME[<UNIT>].` Without the unit, time is interpreted as a number of seconds (floating point). Unit can either be `h` for hours, `m` for seconds and `s` for seconds. Multiple time and unit pairs are allowed, for example `5h4m3s`.
- <root>/cmd/set Send a command-line string to be executed. Multiple commands can be separated with `\r\n` - <root>/curtain/set Set the curtain opening value (0-100), 0 means closed, 100 opened. "on", "off", "pause" pilots buttons.
- <root>/rgb/set Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB" (0-255 each).
- <root>/hsv/set Set the color using hue (0-360), saturation (0-100) and value (0-100) values, comma separated.
- <root>/brightness/set Set the brighness (0-255).
- <root>/channel/#/set Set the value for a single color channel (0-255). Replace # with the channel ID (starting from 0 and up to 4 for RGBWC lights).
- <root>/mired/set Set the temperature color in mired.
- <root>/status The device will report a 1 to this topic every few minutes. When MQTT broker detects that we disconnected, it will be set to 0.
- Other values reported depend on the build options or the heartbeat settings (for example, firmware, version, hostname, IP, MAC, signal strenth (RSSI), uptime (in seconds), free heap and etc.)
Default QoS
Level of assurance for delivery of the outgoing messages. Notice that messages are not (currently) cached on the device, QoS levels >0 only guarantee delivery after the broker receives the message.
Default retain flag
Store the last published message (including the device status) on the server, so it can be delivered to any future subscribers that match the message topic.
JSON
Enabled
Causes all single <topic> messages published by the device, except the device status, to be sent in a JSON payload. For example:
`{"relay/0": 1, "hostname": "ESPURNA-123456", "timestamp": "..."}`
All messages will be queued and sent with a delay (100ms by default). Notice that all nested <topic>: <message> are published as-is, only the heartbeat payload will include all of topics at once.
Topic name JSON message will be sent to <root>/<name> topic (data by default).

# NoFUSS

## Automatically upgrade the firmware (see xoseperez/nofuss for details)

Enable
Server IP or hostname of the NoFUSS server that will be used for the upgrades.

# NTP

## Synchronize device time with a remote server

Device Time
Device Local Time
NTP Server
Time Zone POSIX TZ variable, defaults to `UTC0` aka "Coordinated Universal Time". For example, basic offset is expressed as either `UTC2` (meaning "UTC minus 2 hours"), or `UTC-2` ("UTC plus 2 hours"). For the list of possible values, see our wiki entry. For the technical documentation, see libc tzset(3) manual page No offset

# GARLAND

## Garland configuration

Enable Garland
Brightness
Speed

# THERMOSTAT

## Thermostat configuration

General
Enable Thermostat
Thermostat Mode
Operation mode
Temperature range
Maximum
Minimum
Remote sensor
Remote sensor name
Remote temperature
Remote temperature waiting (seconds)
Operation mode
Max heating time (minutes)
Min rest time (minutes)
Autonomous mode
Heating time (minutes)
Rest time (minutes)
Time worked
Today
Yesterday
Current month
Previous month
Total

# DOMOTICZ

## Configure the connection to your Domoticz server.

General
Enable Domoticz
Domoticz IN Topic
Domoticz OUT Topic
Lights (IN messages only)
Light switch
Sensors & actuators Set IDX to 0 to disable notifications from that component.

# HOME ASSISTANT

## Automatically add this device to your Home Assistant though the MQTT discovery.
Refer to the official documentation on how to enable it for the HA instance.

Discovery
Enabled
Home Assistant MQTT discovery. Enable / disable, then save to trigger an update.
Prefix The prefix for the discovery topic e.g. `<prefix>/switch/espurna-123456/config`
MQTT
Retain
Whether to set the Retain flag on outgoing MQTT messages.

# THINGSPEAK

## Send your sensors data to Thingspeak.

General
Enable Thingspeak
Clear cache
With every POST to thinkspeak.com only enqueued fields are sent.
If you select to clear the cache after every sending this will result in only those fields that have changed will be posted. If you want all fields to be sent with every POST do not clear the cache.
Address
API Key
Sensors & actuators Enter the field number to send each data to, 0 disable notifications from that component.

# INFLUXDB

## Configure the connection to your InfluxDB server. Every time device status changes, values will be sent to the database server.

Configuration
Enable InfluxDB
Address IP or hostname of the influxdb server
Port
Database
Username
Password

# RULES

## Here you can configure advanced rules based on RPN expressions. Check out the wiki page about the RPN Rules module to know how to use them.

Configuration
Sticky variables
When set, variables will not be forcibly reset to `null` after the last rule finishes execution and garbage collected by the RPNlib. Once defined, they will be available each consecutive rules loop unless they are manually removed through `unref`. Mind that referencing a non-existing variable through `$` will immediately stop the rule execution, to either use the variable value or a `null` it should be prefixed with a `&` instead.
Execution delay (in milliseconds)
Rules
MQTT

# DEBUG LOG AND TERMINAL

## Interactive console of the device

Write a command and press `ENTER` (or click the button) to execute it on the device. The output will be shown in the debug text area below. Type `HELP` or `COMMANDS` to see available commands. Type `DEBUG` to display MCU serial exchanges. Any other command is sent to MCU serial as is.

# Expected values

## Calculate ratios from raw values that can be measured externally.
Enter the known values and press Calculate to see the resulting ratio values. Press Apply to update ratio values on the SENSORS panel. Press Save to commit the changes.

Settings
Magnitudes

# SENSOR CONFIGURATION

## Configure and calibrate your device sensors.

General
Read every second(s) Time between the attempts to read from the sensor. Please mind some sensors do not have refresh values very often, check the sensor datasheet to know the minimum read interval. The default and recommended value is 6 seconds.
Report aggregated value every reading(s)
Save aggregated value every report(s) At this moment, only applies to total energy readings. Set to 0 to disable.
Note that this feature uses the internal flash. Repeatedly writing to the flash storage will quickly wear it out.
Real time API
Most magnitudes are being preprocessed and filtered to avoid spurious values. Enable this to get unfiltered values in the API (HTTP, MQTT, Prometheus, etc.)
Analog sensor
Calibrate
Reset gas sensor calibration. Check the sensor datasheet for calibration conditions.
Ratios
Energy monitor
Units
Corrections
Zero threshold Report only when the value is above this threshold. Set to `NaN` (default) to disable.
Report - minimum delta Report only when the value changed at least this much (absolute difference)
Report - reading maximum delta Try to report on every reading, when the value changes at least this much (absolute difference)

# RF BRIDGE

Configuration
Configure RF code associations for a basic 433 RF recevier, or the device like Sonoff RFBridge 433.
To learn a new code click LEARN (the Sonoff RFBridge will beep) then press a button on the remote, the new code should show up (and the RFBridge will double beep). If the device double beeps but the code does not update it has not been properly learnt. Keep trying.
Modify or create new codes manually and then click SAVE to store them in the device memory. If your controlled device uses the same code to switch ON and OFF, learn the code with the ON button and copy paste it to the OFF input box, then click SAVE on the last one to store the value.
Delete any code clicking the FORGET button.
You can also specify any RAW code. For reference see possible commands for Sonoff RF Bridge EFM8BB1 (original firmware supports codes from 0xA0 to 0xA5).
RF Codes
Transmition
Repeats Number of times to repeat the outgoing transmission
Pin configuration
RX Pin
Set to NONE to disable the receiver.
TX Pin
Set to NONE to disable the transmitter.

# LIGHTFOX RF

## LightFox RF configuration
This page allows you to control LightFox RF receiver options.
To learn a new code click LEARN, wait for 3 seconds then press a button on the remote, one of the relays will toggle. If no device relay toggles the code has not been properly learnt, keep trying!
Delete all the codes by clicking the CLEAR button and wait for 10 seconds.

RF Actions
Download backup .json