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.

?

?

?

?
?
UNKNOWN
UNKNOWN

GENERAL

General configuration values

Device
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.
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.
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
Advertise on the network as an Alexa compatible device
Instead of the global hostname setting, use this string to identify the device
Heartbeat
How often the heartbeat messages should be sent (number of seconds).
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
Defines how the multiple relays should be synchronized.
(ms) Wait for the specified time before applying the relay status, when multiple relays change simultaneously.
Individual relay settings

CURTAIN

Curtain configuration

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

LIGHTS

Lights configuration

Add a virtual relay switch that controls the ON / OFF state.
Save channel & brightness values in settings
(ms) When Save values is enabled, wait for the specified time before the values are actually saved.
Use the first three channels as RGB channels. This will also enable the color picker in the web UI. Will only work if the device has at least 3 dimmable channels.
Use RGB color picker if enabled (plus brightness), otherwise use HSV (hue-saturation-value) style
For 2 channels warm white and cold white lights or color lights to use forth dimmable channel as (cold) white light calculated out of the RGB values. This setting will only work when the device has at least 4 dimmable channels. Enabling this will render the Channel #4 slider on the status page unavailable.
Use a dimmable channel as warm white light and another dimmable channel as cold white light.
On devices with two dimmable channels the first use used for warm white light and the second for cold white light.
On color lights the fifth use used for warm white light and the fourth for cold white light.
Will only work if the device has exactly 2 dimmable channels or at least 5 dimmable channels and "white channel" above is also ON.
Enabling this will render useless the "Channel 5" slider in the status page.
Instead of RAW channel value, use a gamma-corrected one. Will only apply to RGB channels and the result may vary between devices.
If enabled, channel changes will be smoothed.
(ms) Time to transition from one color to another
(ms) Time to transition from one step to the next. Must be smaller than the transition time.
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
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
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/
HTTP API
Use /api/list to see all of available endpoints.
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
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
Turn ON to be able to telnet to your device while connected to your home router.
TELNET is always enabled in AP mode.
Ask for the device password when starting telnet session
OTA
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
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
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.
When scanning is enabled, also periodically check available networks when the currently connected network RSSI is below this value.
Available networks
Scanning
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
Leave blank when broker allows anonymous connections. You can also use the following placeholders: {hostname}, {mac}
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}
(seconds)
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
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.)
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.
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
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.
JSON message will be sent to <root>/<name> topic (data by default).

NoFUSS

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

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

NTP

Synchronize device time with a remote server

POSIX TZ variable, defaults to UTC0. For the list of possible values, see esp8266/Arduino's TZ.h (use the value inside of quotes). For the complete documentation, see libc tzset(3) manual page

GARLAND

Garland configuration

THERMOSTAT

Thermostat configuration

General
Temperature range
Remote sensor
(seconds)
Operation mode
(minutes)
(minutes)
Autonomous mode
(minutes)
(minutes)
Time worked

DOMOTICZ

Configure the connection to your Domoticz server.

General
Lights (IN messages only)
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
Home Assistant MQTT discovery. Enable / disable, then save to trigger an update.
The prefix for the discovery topic e.g. <prefix>/switch/espurna-123456/config
MQTT
Whether to set the Retain flag on outgoing MQTT messages.

THINGSPEAK

Send your sensors data to Thingspeak.

General
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.
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
IP or hostname of the influxdb server

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
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.
(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
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.
reading(s)
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.
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
Reset gas sensor calibration. Check the sensor datasheet for calibration conditions.
Ratios
Units
Energy monitor

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
Number of times to repeat the outgoing transmission
Pin configuration
Set to NONE to disable the receiver.
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