# ESPurna 0.0.0

Wrong credentials

# 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.

Admin 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 should have at least eight characters (letters, numbers or the underscore) and at least one number, one lowercase and one uppercase letter.
Admin password (repeat)

# STATUS

## Current configuration

Analog
Counts / last minute
Temperature ()
Temperature ()
Humidity (%)
Current
Voltage
Active Power
Apparent Power
Reactive Power
Power Factor
Energy
Manufacturer
Device
Chip ID
MAC
Network
IP
ESPurna version
ESPurna build
Current time
Uptime
Free heap
Firmware size
Free space
MQTT Status
NTP Status

# GENERAL

## General configuration values

Hostname
This name will identify this device in your network (http://<hostname>.local). For this setting to take effect you should restart the wifi interface clicking the "Reconnect" button.
Switch boot mode
Here you can define what will be the status of the switch after a reboot.
Switch sync mode
Define how the different switches should be synchronized.
Switch pulse mode
When pulse mode is enabled the switch will automatically switch back to its normal state after the pulse time (below).
Switch pulse time
Pulse time in seconds (maximum value is 60s, accepts decimals).
Double click delay
Delay in milliseconds to detect a double 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 a double click. Increase this number if you are having trouble to double click the button. Set this value to 0 to disable double click. You won't be able to set the device in AP mode manually but your device will respond immediately to button clicks.
You will have to reset the device after updating for this setting to apply.
Use colorpicker
Use color picker for the first 3 channels as RGB.
Will only work if the device has at least 3 dimmable channels.
Reload the page to update the web interface.
Use white channel
Use forth dimmable channel as white when first 3 have the same RGB value.
Will only work if the device has at least 4 dimmable channels.
Reload the page to update the web interface.
Use gamma correction
Use gamma correction for RGB channels.
Will only work if "use colorpicker" above is also ON.
Use CSS style
Use CSS style to report colors to MQTT and REST API.
Red will be reported as "#FF0000" if ON, otherwise "255,0,0"
Alexa integration
Home Assistant Prefix
Home Assistant auto-discovery feature.
Add should immediately add the device to your HA console. Messages are retained so the device should be there even after a HA reboot
To remove the device click on the Del button (retained message will be deleted) and reboot HA.
You might want to disable CSS style (above) so Home Assistant can parse the color.
Temperature units
Celsius (°C)
Fahrenheit (°F)

# ADMINISTRATION

## Device administration and security settings

Admin 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 should have at least eight characters (letters, numbers or the underscore) and at least one number, one lowercase and one uppercase letter.
Repeat password
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/
Enable HTTP API
HTTP API Key
This is the key you will have to pass with every HTTP request to the API, either to get or write values.
All API calls must contain the apikey parameter with the value above.
To know what APIs are enabled do a call to /apis.
Enable TELNET
Turn ON to be able to telnet to your device while connected to your home router.
TELNET is always enabled in AP mode.
Automatic remote updates (NoFUSS)
NoFUSS server
This name address of the NoFUSS server for automatic remote updates (see https://bitbucket.org/xoseperez/nofuss).
Settings
Upgrade

# WIFI

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

# MQTT

## Configure an MQTT broker in your network and you will be able to change the switch status via an MQTT message. Leave the server field empty to disable MQTT.

Enable MQTT
MQTT Broker
MQTT Port
MQTT User
MQTT Password
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
or using openssl from a linux box by typing:

    $ openssl s_client -connect <host>:<port> < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin

MQTT Root Topic
This is the root topic for this device. A trailing slash will be added if not preset. The {identifier} placeholder will be replaced by the device hostname.
- <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>/color/set Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB".
- <root>/brightness/set Set the brighness using a value from 0 to 255.
- <root>/channel/#/set Set the value for a single color channel (from 0 to 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. Upon MQTT disconnecting this will be set to 0.
- Other values reported (depending on the build) are: firmware and version, hostname, IP, MAC, signal strenth (RSSI), uptime (in seconds), free heap and power supply.
Use JSON payload
All messages (except the device status) will be included in a JSON payload along with the timestamp and hostname and sent under the <root>/data topic.
Messages will be queued and sent after 100ms, so different messages could be merged into a single payload.
Subscribtions will still be done to single topics.

# NTP

## Configure your NTP (Network Time Protocol) servers and local configuration to keep your device time up to the second for your location.

NTP Server 1
NTP Server 2
NTP Server 3
Time offset
Set to 0 for UTC time
Enable Daylight Saving Time

# DOMOTICZ

## Configure the connection to your Domoticz server.

Enable Domoticz
Domoticz IN Topic
Domoticz OUT Topic
Temperature IDX
Set to 0 to disable notifications.
Humidity IDX
Set to 0 to disable notifications.
Power IDX
Set to 0 to disable notifications.
Energy increment IDX
Set to 0 to disable notifications.
Voltage IDX
Set to 0 to disable notifications.
Current IDX
Set to 0 to disable notifications.
Analog IDX
Set to 0 to disable notifications.

# INFLUXDB

## Configure the connection to your InfluxDB server. Leave the host field empty to disable InfluxDB connection.

Host
Port
Database
Username
Password

# POWER CALIBRATION

## Configure and calibrate your power monitor device. Use a pure resistive load and introduce the expected values for active power, current and voltage. Use the nominal values or a multimeter to get the proper numbers. Set any field to 0 to leave the calibration value untouched.

Read interval
Select the interval between readings. These will be filtered and averaged for the report.
The default and recommended value is 6 seconds.
Report interval
Select the interval between reports via MQTT.
This can't be less than the reading interval above.
The default and recommended value is 1 minute.
AC RMS Active Power
In Watts (W). If you are using a pure resistive load like a bulb this will be writen on it, otherwise use a socket multimeter to get this value.
AC Power Factor
In percentage (%). You will need to use a calibrated multimeter to get this value and a mixed resistive and reactive load.
AC RMS Voltage
In Volts (V). Enter your the nominal AC voltage for your household or facility, or use multimeter to get this value.
AC RMS Current
In Ampers (A). If you are using a pure resistive load like a bulb this will the ratio between the two previous values, i.e. power / voltage. You can also use a current clamp around one fo the power wires to get this value.
Reset calibration
Move this switch to ON and press "Update" to revert to factory calibration values.

# RFBRIDGE

## Sonoff 433 RF Bridge Configuration
To learn a new code click LEARN, the Sonoff RFBridge will beep, then press a button on the remote, the RFBridge will then double beep and the new code should show up. 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 (all codes must be 18 characters long) 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.

Switch
Switch ON
Switch OFF
Network SSID
Password
Static IP
Leave empty for DNS negotiation
Gateway IP
Set when using a static IP
Network Mask
Usually 255.255.255.0 for /24 networks
DNS IP
Set the Domain Name Server IP to use when using a static IP
Switch Status
Switch IDX
Set to 0 to disable notifications.
Color
Brightness
Color
Mode
Speed
Channel #