Mirror of espurna firmware for wireless switches and more
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2435 lines
133 KiB

<!DOCTYPE html>
<html lang="">
<head>
<title>ESPurna 0.0.0</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="image" rel="icon" href="favicon.ico" inline>
<link rel="stylesheet" href="vendor/pure-2.0.3.min.css" inline>
<link rel="stylesheet" href="vendor/pure-grids-responsive-2.0.3.min.css" inline>
<link rel="stylesheet" href="vendor/side-menu.css" inline>
<link rel="stylesheet" href="custom.css" inline>
<script src="custom.js" inline></script>
<!-- removeIf(!light) -->
<script src="vendor/iro-5.3.1.min.js" inline></script>
<!-- endRemoveIf(!light) -->
</head>
<body>
<div id="error-notification" class="pure-g content">
</div>
<div id="password" class="webmode">
<div class="content">
<div class="panel block" id="panel-password">
<div class="header">
<h1>SECURITY</h1>
<h2>Before using this device you have to change the default password for the user <strong>admin</strong>. This password will be used for the <strong>AP mode hotspot</strong>, the <strong>web interface</strong> (where you are now) and the <strong>over-the-air updates</strong>.
Password must be <strong>8…63 characters</strong> (numbers and letters and any of these special characters: _,.;:~!?@#$%^&amp;*&lt;&gt;\|(){}[]) and have at least <strong>one lowercase</strong> and <strong>one uppercase</strong> or <strong>one number</strong>.</h2>
</div>
<div class="page">
<form id="form-setup-password" class="pure-form pure-form-aligned">
<fieldset>
<div class="pure-control-group">
<label>New Password</label>
<input class="pure-input-3-4" name="adminPass0" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" autocomplete="new-password" spellcheck="false" required>
<span class="no-select password-reveal"></span>
</div>
<div class="pure-control-group">
<label>Repeat password</label>
<input class="pure-input-3-4" name="adminPass1" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" autocomplete="new-password" spellcheck="false" required>
<span class="no-select password-reveal"></span>
</div>
<button class="pure-input-1 pure-button button-generate-password" type="button" title="Generate password based on password policy">Generate</button>
<button class="pure-input-1 pure-button button-setup-password" type="button" title="Save new password">Save</button>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<div id="layout" class="webmode">
<div class="menu-link">
<span></span>
</div>
<div id="menu">
<div class="pure-menu">
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="#" class="pure-menu-link pure-menu-selected" data-panel="status">STATUS</a>
</li>
<li class="pure-menu-item menu-item-divided">
<a href="#" class="pure-menu-link" data-panel="general">GENERAL</a>
</li>
<!-- removeIf(!curtain) -->
<li class="pure-menu-item module module-curtain">
<a href="#" class="pure-menu-link" data-panel="curtain">CURTAIN</a>
</li>
<!-- endRemoveIf(!curtain) -->
<!-- removeIf(!garland) -->
<li class="pure-menu-item module module-garland">
<a href="#" class="pure-menu-link" data-panel="garland">GARLAND</a>
</li>
<!-- endRemoveIf(!garland) -->
<!-- removeIf(!thermostat) -->
<li class="pure-menu-item module module-thermostat">
<a href="#" class="pure-menu-link" data-panel="thermostat">THERMOSTAT</a>
</li>
<!-- endRemoveIf(!thermostat) -->
<!-- removeIf(!lightfox) -->
<li class="pure-menu-item module module-lightfox">
<a href="#" class="pure-menu-link" data-panel="lightfox">LIGHTFOX RF</a>
</li>
<!-- endRemoveIf(!lightfox) -->
<li class="pure-menu-item module module-dcz">
<a href="#" class="pure-menu-link" data-panel="domoticz">DOMOTICZ</a>
</li>
<li class="pure-menu-item module module-ha">
<a href="#" class="pure-menu-link" data-panel="ha">HASS</a>
</li>
<li class="pure-menu-item module module-idb">
<a href="#" class="pure-menu-link" data-panel="idb">INFLUXDB</a>
</li>
<li class="pure-menu-item module module-led">
<a href="#" class="pure-menu-link" data-panel="led">LED</a>
</li>
<!-- removeIf(!light) -->
<li class="pure-menu-item module module-light">
<a href="#" class="pure-menu-link" data-panel="light">LIGHTS</a>
</li>
<!-- endRemoveIf(!light) -->
<!-- removeIf(!rfm69) -->
<li class="pure-menu-item module module-rfm69">
<a href="#" class="pure-menu-link" data-panel="rfm69-mapping">MAPPING</a>
</li>
<li class="pure-menu-item module module-rfm69">
<a href="#" class="pure-menu-link" data-panel="rfm69-messages">MESSAGES</a>
</li>
<!-- endRemoveIf(!rfm69) -->
<li class="pure-menu-item module module-mqtt">
<a href="#" class="pure-menu-link" data-panel="mqtt">MQTT</a>
</li>
<li class="pure-menu-item module module-nofuss">
<a href="#" class="pure-menu-link" data-panel="nofuss">NOFUSS</a>
</li>
<li class="pure-menu-item module module-ntp">
<a href="#" class="pure-menu-link" data-panel="ntp">NTP</a>
</li>
<!-- removeIf(!rfbridge) -->
<li class="pure-menu-item module module-rfb">
<a href="#" class="pure-menu-link" data-panel="rfb">RF BRIDGE</a>
</li>
<!-- endRemoveIf(!rfbridge) -->
<li class="pure-menu-item module module-rpn">
<a href="#" class="pure-menu-link" data-panel="rpn">RULES</a>
</li>
<li class="pure-menu-item module module-sch">
<a href="#" class="pure-menu-link" data-panel="schedule">SCHEDULE</a>
</li>
<!-- removeIf(!sensor) -->
<li class="pure-menu-item module module-sns">
<a href="#" class="pure-menu-link" data-panel="sns">SENSORS</a>
</li>
<!-- endRemoveIf(!sensor) -->
<li class="pure-menu-item module module-relay">
<a href="#" class="pure-menu-link" data-panel="relay">RELAYS</a>
</li>
<li class="pure-menu-item module module-tspk">
<a href="#" class="pure-menu-link" data-panel="thingspeak">THINGSPEAK</a>
</li>
<li class="pure-menu-item">
<a href="#" class="pure-menu-link" data-panel="wifi">WIFI</a>
</li>
<li class="pure-menu-item menu-item-divided">
<a href="#" class="pure-menu-link" data-panel="admin">ADMIN</a>
</li>
<li class="pure-menu-item module module-cmd">
<a href="#" class="pure-menu-link" data-panel="cmd">DEBUG</a>
</li>
</ul>
<div class="main-buttons">
<button type="button" class="pure-button button-update">Save</button>
<button type="button" class="pure-button button-reconnect">Reconnect</button>
<button type="button" class="pure-button button-reboot">Reboot</button>
</div>
<div class="footer">
&copy; 2016-2019<br>
Xose Pérez<br>
<a class="external" href="https://twitter.com/xoseperez">@xoseperez</a><br>
<a class="external" href="https://tinkerman.cat">https://tinkerman.cat</a><br>
<a class="external" href="https://github.com/xoseperez/espurna">ESPurna at GitHub</a><br>
<a class="external" href="https://gitter.im/tinkerman-cat/espurna">Gitter channel</a><br>
<a class="external" href="https://www.gnu.org/licenses/gpl-3.0.en.html">GPLv3 license</a><br>
</div>
</div>
</div>
<div class="content">
<div class="panel block" id="panel-status">
<div class="header">
<h1><span data-key="hostname">?</span></h1>
<h2><span data-key="version">?</span></h2>
<h2><span data-key="desc">?</span></h2>
</div>
<div class="page">
<form class="pure-form pure-form-aligned">
<fieldset>
<div id="relays"></div>
<!-- removeIf(!light) -->
<div id="color"></div>
<div id="cct"></div>
<!-- endRemoveIf(!light) -->
<!-- removeIf(!light) -->
<div id="channels"></div>
<div id="light"></div>
<!-- endRemoveIf(!light) -->
<!-- removeIf(!sensor) -->
<div id="magnitudes"></div>
<!-- endRemoveIf(!sensor) -->
<!-- removeIf(!curtain) -->
<div id="curtains"></div>
<!-- endRemoveIf(!curtain) -->
<!-- removeIf(!rfm69) -->
<div class="pure-g module module-rfm69">
<div class="pure-u-1-2 pure-u-lg-1-4">
<label>Packet count</label>
<input type="text" name="packetCount" readonly>
<label>Node count</label>
<input type="text" name="nodeCount" readonly>
</div>
</div>
<!-- endRemoveIf(!rfm69) -->
<div class="pure-g state">
<div class="pure-u-1-2 pure-u-lg-1-4">
<label>Network</label>
<span data-key="network"></span>
<label>BSSID</label>
<span data-key="bssid"></span>
<label>Channel</label>
<span data-key="channel"></span>
<label>RSSI</label>
<span data-key="rssi" post="dBm"></span>
<label>IP</label>
<a href="" aria-label="device ip address">
<span data-key="deviceip"></span>
</a>
<div class="pure-control-group module module-telnet">
<label>TELNET</label>
<a href="" aria-label="telnet address">
<span data-key="telnetip"></span>
</a>
</div>
</div>
<div class="pure-u-1-2 pure-u-lg-1-4">
<label>Firmware name</label>
<span data-key="app_name"></span>
<label>Firmware version</label>
<span data-key="app_version"></span>
<label>Firmware build date</label>
<span data-key="app_build"></span>
<label>Firmware size</label>
<span data-key="sketch_size" post=" bytes"></span>
<label>Free space</label>
<span data-key="free_size" post=" bytes"></span>
<label>Uptime</label>
<span data-key="uptime"></span>
<label>Last update</label>
<span data-key="ago" post=" seconds ago">?</span>
</div>
<div class="pure-u-1-2 pure-u-lg-1-4">
<label>Manufacturer</label>
<span data-key="manufacturer"></span>
<label>Device</label>
<span data-key="device"></span>
<label>Chip ID</label>
<span data-key="chipid"></span>
<label>SDK version</label>
<span data-key="sdk"></span>
<label>Core version</label>
<span data-key="core"></span>
</div>
<div class="pure-u-1-2 pure-u-lg-1-4">
<label>Free heap</label>
<span data-key="heap" post=" bytes"></span>
<label>Load average</label>
<span data-key="loadaverage" post="%"></span>
<label>VCC</label>
<span data-key="vcc" post="mV">? </span>
<div class="pure-control-group module module-mqtt">
<label>MQTT Status</label>
<span data-key="mqttStatus">UNKNOWN</span>
</div>
<div class="pure-control-group module module-ntp">
<label>NTP Status</label>
<span data-key="ntpStatus">UNKNOWN</span>
<label>Current time</label>
<span data-key="now"></span>
</div>
</div>
</div>
</fieldset>
</form>
</div>
</div>
<form id="form-general" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-general">
<div class="header">
<h1>GENERAL</h1>
<h2>General configuration values</h2>
</div>
<div class="page">
<fieldset>
<legend>Device</legend>
<div class="pure-control-group">
<label>Hostname</label>
<input name="hostname" class="pure-input-2-3" maxlength="32" type="text" data-action="reboot" pattern="^[A-za-z]([A-Za-z\d-]{1,30}[A-Za-z\d]|[A-Za-z\d]{0,31})$">
<span class="pure-form-message-inline">
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://&lt;hostname&gt;). Notice that this value may contain only the <strong>ASCII letters 'a' through 'z'</strong> (in a case-insensitive manner), <strong>digits '0' through '9'</strong>, and <strong>the hyphen ('-')</strong>. The hostname can neither start or end with a hyphen.<br>
For this setting to take effect only on initial connection to the network, make sure to <code>Reconnect</code> if the device is already connected.
</span>
</div>
<div class="pure-control-group">
<label>Description</label>
<input name="desc" class="pure-input-2-3" maxlength="64" type="text">
<span class="pure-form-message-inline">
Human-friendly name for this device. It will be displayed in the WebUI and reported with the heartbeat.<br>
For example, it can be used to specify the device location or it's purpose.
</span>
</div>
<div class="pure-control-group module module-btn">
<label>Click repeat delay</label>
<input name="btnRepDel" type="number" data-action="reboot" min="0" step="100" max="1000">
<span class="pure-form-message-inline">
Delay in milliseconds to detect a double or triple click (from 0 to 1000ms).<br>
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.<br>
You will have to <strong>reboot the device</strong> to apply this setting.
</span>
</div>
</fieldset>
<fieldset class="module module-alexa">
<legend>Alexa</legend>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="alexaEnabled"></div>
<span class="pure-form-message">
Advertise on the network as an Alexa compatible device
</span>
</div>
<div class="pure-control-group">
<label>Name</label>
<input name="alexaName" maxlength="31" type="text" data-action="reboot">
<span class="pure-form-message">
Instead of the global hostname setting, use this string to identify the device
</span>
</div>
</fieldset>
<fieldset>
<legend>Heartbeat</legend>
<div class="pure-control-group">
<label>Mode</label>
<select class="pure-input-2-3" name="hbMode" >
<option value="no">Disabled</option>
<option value="once">Once per connection</option>
<option value="repeat">Repeat after defined interval</option>
</select>
</div>
<div class="pure-control-group">
<label>Message interval</label>
<input name="hbInterval" type="number" min="1">
<span class="pure-form-message-inline">
How often the heartbeat messages should be sent (number of <strong>seconds</strong>).
</span>
</div>
<div class="pure-control-group">
<label>Message types</label>
<select multiple name="hbReport">
<option value="1">Device status</option>
<option value="2">SSID</option>
<option value="21">BSSID</option>
<option value="3">IP</option>
<option value="4">MAC</option>
<option value="5">RSSI</option>
<option value="6">Uptime</option>
<option value="7">Datetime</option>
<option value="8">Free heap</option>
<option value="9">VCC</option>
<option value="10">Relay(s) status</option>
<!-- removeIf(!light) -->
<option value="11">Light(s) status</option>
<!-- endRemoveIf(!light) -->
<option value="12">Hostname</option>
<option value="13">App name</option>
<option value="14">App version</option>
<option value="15">Board</option>
<option value="16">Loadavg</option>
<option value="17">Heartbeat interval</option>
<option value="18">Device description</option>
<!-- removeIf(!thermostat) -->
<option value="19">Temperature range</option>
<option value="20">Remote temperature</option>
<!-- endRemoveIf(!thermostat) -->
</select>
<span class="pure-form-message-inline">
Select which message types will be sent out with the periodic report.
</span>
</div>
</fieldset>
</div>
</div>
</form>
<form id="form-led" class="pure-form form-settings">
<div class="panel" id="panel-led">
<div class="header">
<h1>LED</h1>
<h2>Notification LED configuration</h2>
</div>
<div class="page">
<details>
<summary>Available modes</summary>
<ol class="pure-u-1 pure-u-lg-3-4">
<li><strong>WiFi status</strong> 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.</li>
<li><strong>Follow switch</strong> will force the LED to follow the status of a given switch (defaults to the 1st switch, use the selector to change it).</li>
<li><strong>Inverse switch</strong> is same as the above, but using the inverse status as status of the LED.</li>
<li><strong>Find me</strong> will turn the LED ON when all relays are OFF. This is meant to locate the device at night.</li>
<li><strong>Find me &amp; WiFi</strong> will also follow the WiFi status, and stay mostly ON when relays are OFF and mostly OFF when any of them are ON.</li>
<li><strong>Relay status</strong> will turn the LED ON whenever any switch is ON, and OFF otherwise. This is global status notification.</li>
<li><strong>Relay status &amp; WiFi</strong> will follow the WiFi status but will stay mostly OFF when relays are OFF, and mostly ON when any of them are ON.</li>
<li><strong>Manually managed</strong> will let you manage the LED status through the API. For example, MQTT will subscribe to the "&lt;base_topic&gt;/led/0/set", sending a payload of 0, 1 or 2 (to toggle it) will change the LED status accordingly.</li>
<li><strong>Always ON</strong> and <strong>Always OFF</strong> modes are self-explanatory.</li>
</ol>
</details>
<fieldset>
<div id="leds" class="settings-group" data-settings-target="ledGpio" data-settings-schema="ledGpio ledInv ledMode ledRelay" ></div>
<button type="button" class="pure-button button-add-settings-group" data-settings-group="leds">Add LED</button>
</fieldset>
</div>
</div>
</form>
<form id="form-relay" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-relay">
<div class="header">
<h1>RELAYS</h1>
<h2>Relay configuration</h2>
</div>
<div class="page">
<fieldset class="module module-multirelay">
<legend>Synchronization</legend>
<div class="pure-control-group">
<label>Mode</label>
<select name="relaySync" class="pure-input-2-3">
<option value="disabled">Disabled</option>
<option value="zero-or-one">Zero or just one relay should be ON</option>
<option value="just-one">Only one relay should be ON</option>
<option value="all">All relays are synchronised</option>
<option value="first">Switch #0 controls everything else</option>
</select>
<span class="pure-form-message">
Defines how the multiple relays should be synchronized.
</span>
</div>
<div class="pure-control-group">
<label>Interlock delay</label>
<input name="relayIlkDelay" type="number" min="0">
<span class="pure-form-message">
(ms) Wait for the specified time before applying the relay status, when multiple relays change simultaneously.
</span>
</div>
</fieldset>
<fieldset>
<legend>Individual relay settings</legend>
<div id="relayConfig" class="settings-group">
</div>
</fieldset>
</div>
</div>
</form>
<!-- removeIf(!curtain) -->
<form id="form-curtain" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-curtain">
<div class="header">
<h1>CURTAIN</h1>
<h2>Curtain configuration</h2>
</div>
<div class="page">
<fieldset>
<legend>General</legend>
<div class="pure-control-group">
<label>Curtain type</label>
<select class="pure-input-2-3" name="curtainType">
<option value="0">Roller</option>
<option value="1">Closing right</option>
<option value="2">Closing left</option>
<option value="3">Two sides</option>
</select>
<span class="pure-form-message">
Define your curtain type. It adapts the graphical view in status menu.
</span>
</div>
<div class="pure-control-group">
<label>Curtain bootup position</label>
<select class="pure-input-2-3" name="curtainBoot" >
<option value="0">Do nothing</option>
<option value="1">Closed</option>
<option value="2">Opened</option>
<option value="3">Last set position</option>
</select>
<span class="pure-form-message">
Define the initial position of the curtain after a reboot or power loss.
</span>
</div>
<div id="curtainConfig" class="settings-group"></div>
</fieldset>
</div>
</div>
</form>
<!-- endRemoveIf(!curtain) -->
<!-- removeIf(!light) -->
<form id="form-light" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-light">
<div class="header">
<h1>LIGHTS</h1>
<h2>Lights configuration</h2>
</div>
<div class="page">
<fieldset>
<div class="pure-control-group module module-relay">
<label>Light state switch</label>
<div><input type="checkbox" name="ltRelay"></div>
<span class="pure-form-message">
Add a virtual relay switch that controls the ON / OFF state.
</span>
</div>
<div class="pure-control-group">
<label>Save values</label>
<div><input type="checkbox" name="ltSave"></div>
<span class="pure-form-message">
Save channel &amp; brightness values in settings
</span>
</div>
<div class="pure-control-group">
<label>Save delay</label>
<input type="number" name="ltSaveDelay" min="5000" max="60000">
<span class="pure-form-message-inline">
(ms)
</span>
<span class="pure-form-message">
When <code>Save values</code> is enabled, wait for the specified time before the values are actually saved.
</span>
</div>
<div class="pure-control-group">
<label>Use color</label>
<div><input type="checkbox" name="useColor" data-action="reload"></div>
<span class="pure-form-message">
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.
</span>
</div>
<div class="pure-control-group">
<label>Use RGB picker</label>
<div><input type="checkbox" name="useRGB" data-action="reload"></div>
<span class="pure-form-message">
Use RGB color picker if enabled (plus brightness), otherwise use HSV (hue-saturation-value) style
</span>
</div>
<div class="pure-control-group">
<label>Use white channel</label>
<div><input type="checkbox" name="useWhite" data-action="reload"></div>
<span class="pure-form-message">
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.
</span>
</div>
<div class="pure-control-group">
<label>Use white color temperature</label>
<div><input type="checkbox" name="useCCT" data-action="reload"></div>
<span class="pure-form-message">
Use a dimmable channel as warm white light and another dimmable channel as cold white light.<br>On devices with two dimmable channels the first use used for warm white light and the second for cold white light.<br>On color lights the fifth use used for warm white light and the fourth for cold white light.<br>Will only work if the device has exactly 2 dimmable channels or at least 5 dimmable channels and "white channel" above is also ON.<br>Enabling this will render useless the "Channel 5" slider in the status page.
</span>
</div>
<div class="pure-control-group">
<label>Use gamma correction</label>
<div><input type="checkbox" name="useGamma"></div>
<span class="pure-form-message">
Instead of RAW channel value, use a gamma-corrected one. Will only apply to RGB channels and the result may vary between devices.
</span>
</div>
<div class="pure-control-group">
<label>Channel transitions</label>
<div><input type="checkbox" name="useTransitions"></div>
<span class="pure-form-message">
If enabled, channel changes will be smoothed.
</span>
</div>
<div class="pure-control-group">
<label>Transition time</label>
<input type="number" name="ltTime" min="10" max="5000" data-action="reload">
<span class="pure-form-message-inline">
(ms)
</span>
<span class="pure-form-message">
Time to transition from one color to another
</span>
</div>
<div class="pure-control-group">
<label>Transition step</label>
<input type="number" name="ltStep" min="10" max="5000" data-action="reload">
<span class="pure-form-message-inline">
(ms)
</span>
<span class="pure-form-message">
Time to transition from one step to the next. Must be smaller than the transition time.
</span>
</div>
<div class="pure-control-group">
<label>MQTT group topic</label>
<input type="text" name="mqttGroupColor" data-action="reconnect">
<span class="pure-form-message">
Sync channel values between multiple devices. Notice that every device that is subscribed to the topic <strong>should</strong> be configured to use the same brightness.
</span>
</div>
</fieldset>
</div>
</div>
</form>
<!-- endRemoveIf(!light) -->
<form id="form-admin" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-admin">
<div class="header">
<h1>ADMINISTRATION</h1>
<h2>Device administration and security settings</h2>
</div>
<div class="page">
<fieldset>
<legend>Settings</legend>
<div class="pure-control-group">
<button type="button" class="pure-button button-settings-backup pure-input-1">Backup user settings as .json</button>
<button type="button" class="pure-button button-settings-restore pure-input-1">Restore settings from .json backup</button>
<button type="button" class="pure-button button-settings-factory pure-input-1">Perform a factory reset</button>
</div>
</fieldset>
<fieldset>
<legend>Access</legend>
<div class="pure-control-group">
<label>Admin password</label>
<input name="adminPass0" placeholder="New password" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" data-action="reboot" autocomplete="new-password" spellcheck="false">
<span class="no-select password-reveal"></span>
</div>
<div class="pure-control-group">
<label>Repeat password</label>
<input name="adminPass1" placeholder="Repeat password" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" data-action="reboot" autocomplete="new-password" spellcheck="false">
<span class="no-select password-reveal"></span>
</div>
<div class="pure-control-group">
<span class="pure-form-message">
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).<br>
It must be <strong>8..63 characters</strong> (numbers and letters and any of these special characters: _,.;:~!?@#$%^&amp;*&lt;&gt;\|(){}[]) and have at least <strong>one lowercase</strong> and <strong>one uppercase</strong> or <strong>one number</strong>.</span>
</div>
</fieldset>
<fieldset>
<legend>Web server</legend>
<div class="pure-control-group">
<label>HTTP port</label>
<input name="webPort" type="text" data-action="reboot">
<span class="pure-form-message">
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/
</span>
</div>
<div class="pure-control-group">
<label>WebSocket Authentication</label>
<div><input type="checkbox" name="wsAuth"></div>
</div>
</fieldset>
<fieldset class="module module-api">
<legend>HTTP API</legend>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="apiEnabled"></div>
<span class="pure-form-message">
Use <strong>/api/list</strong> to see all of available endpoints.
</span>
</div>
<div class="pure-control-group">
<label>Restful</label>
<div><input type="checkbox" name="apiRestFul"></div>
<span class="pure-form-message">
If enabled, API requests that contain data (for example, to modify the relay status) <strong>must</strong> be done using PUT.
If disabled you can issue them as GET requests and add request parameters as <code>http://$url/api/path?key=value</code>. <strong>Do not enable unless it is really necessary</strong>
</span>
</div>
<div class="pure-control-group">
<label>Key</label>
<input name="apiKey" type="text">
<button type="button" class="pure-button button-apikey">Generate</button>
<span class="pure-form-message">
This is the authentication token you will have to pass with every HTTP request.
All API calls must either contain the <strong>Api-Key</strong> header or the <strong>apikey</strong> request parameter with the value above.
</span>
</div>
</fieldset>
<fieldset class="module module-telnet">
<legend>TELNET</legend>
<div class="pure-control-group">
<label>Enable in STA mode</label>
<div><input type="checkbox" name="telnetSTA"></div>
<span class="pure-form-message">
Turn ON to be able to telnet to your device while connected to your home router.<br>TELNET is always enabled in AP mode.
</span>
</div>
<div class="pure-control-group">
<label>Authentication</label>
<div><input type="checkbox" name="telnetAuth"></div>
<span class="pure-form-message">
Ask for the device password when starting telnet session
</span>
</div>
</fieldset>
<fieldset class="module module-ota">
<legend>OTA</legend>
<div class="pure-control-group">
<label>Upgrade</label>
<input name="filename" type="text" readonly>
<span class="pure-form-message">The device has <span data-key="free_size"></span> bytes available for OTA updates. If your image is larger than this consider doing a <a class="external" href="https://github.com/xoseperez/espurna/wiki/TwoStepUpdates"><strong>two-step update</strong></a>.</span>
</div>
<div class="pure-controls">
<div class="pure-u-1 pure-u-lg-1"><progress id="upgrade-progress" value="0" max="100"></progress></div>
<button type="button" class="pure-button button-upgrade-browse">Browse</button>
<button type="button" class="pure-button button-upgrade">Upgrade</button>
<input name="upgrade" type="file">
</div>
</fieldset>
</div>
</div>
</form>
<form id="form-wifi" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-wifi">
<div class="header">
<h1>WIFI</h1>
<h2>You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.</h2>
</div>
<div class="page">
<fieldset>
<legend>Fallback SoftAP</legend>
<div class="pure-control-group">
<label>SSID</label>
<input name="wifiApSsid" maxlength="32" type="text" data-action="reboot" >
</div>
<div class="pure-control-group">
<label>Passphrase</label>
<input name="wifiApPass" maxlength="32" type="password" spellcheck="false" data-action="reboot" >
<span class="no-select password-reveal"></span>
<span class="pure-form-message">
When specified, ESPurna will use these values in place of the hostname (see <strong>GENERAL</strong> panel) as SSID and device password (see <strong>ADMIN</strong> panel) as passphrase.
</span>
</div>
</fieldset>
<fieldset>
<legend>Scanning</legend>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="wifiScan"></div>
<span class="pure-form-message">
ESPurna will scan for visible WiFi SSIDs and try to connect to networks defined below in order of <strong>signal strength</strong>, 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 <strong>connecting to a single access point</strong> (or router) or to a <strong>hidden SSID</strong>.
</span>
</div>
<div class="pure-control-group">
<label>RSSI threshold</label>
<div><input type="number" name="wifiScanRssi" min="-128" max="0"></div>
<span class="pure-form-message">
When scanning is enabled, also periodically check available networks when the currently connected network RSSI is below this value.
</span>
</div>
</fieldset>
<fieldset>
<legend>Available networks</legend>
<div class="pure-control-group">
<button class="pure-button button-wifi-scan" type="button">
Perform a network scan
</button>
<div class="pure-u-0 pure-u-lg-1-4 scan loading">
<img src="images/loading.gif" alt="Scanning" inline>
</div>
</div>
<table class="pure-u-1 pure-u-lg-1 pure-table" id="scanResult">
<thead>
<tr>
<th scope="col">BSSID</th>
<th scope="col">AUTH</th>
<th scope="col">RSSI</th>
<th scope="col">Channel</th>
<th scope="col">SSID</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</fieldset>
<fieldset>
<legend>Configured networks</legend>
<div id="networks" class="settings-group" data-settings-target="ssid pass" data-settings-schema="ssid pass ip gw mask dns bssid chan" >
</div>
<button type="button" class="pure-button button-add-settings-group" data-settings-group="networks">Add network</button>
</fieldset>
</div>
</div>
</form>
<form id="form-schedule" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-schedule">
<div class="header">
<h1>SCHEDULE</h1>
<h2>Executes actions based on the current time.</h2>
</div>
<div class="page">
<fieldset>
<legend>Schedules</legend>
<div id="schedules" class="settings-group" data-settings-target="schTarget schType" data-settings-schema="schTarget schType schHour schMinute schUTC schWDs schAction schRestore schEnabled"></div>
</fieldset>
<fieldset>
<legend>Add schedule</legend>
<button type="button" class="pure-button button-add-settings-group module module-relay" data-settings-group="schedules" data-settings-group-detail-target="relay">Relay</button>
<!-- removeIf(!light) -->
<button type="button" class="pure-button button-add-settings-group module module-light" data-settings-group="schedules" data-settings-group-detail-target="light">Light</button>
<!-- endRemoveIf(!light) -->
<!-- removeIf(!curtain) -->
<button type="button" class="pure-button button-add-settings-group module module-curtain" data-settings-group="schedules" data-settings-group-detail-target="curtain">Curtain</button>
<!-- endRemoveIf(!curtain) -->
</fieldset>
</div>
</div>
</form>
<!-- removeIf(!rfm69) -->
<form id="form-rfm69-mapping" class="pure-form form-settings">
<div class="panel" id="panel-rfm69-mapping">
<div class="header">
<h1>MAPPING</h1>
<h2>
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.
</h2>
</div>
<div class="page">
<fieldset>
<legend>Default topic</legend>
<div class="pure-control-group">
<input name="rfm69Topic" type="text" value="" size="8">
<span class="pure-form-message">
Default MQTT Topic. Available placeholders: {nodeid} and {key}
</span>
</div>
</fieldset>
<fieldset>
<legend>Specific topics</legend>
<div id="rfm69-mapping" class="settings-group">
</div>
<button type="button" class="pure-button button-add-settings-group" data-settings-group="rfm69-mapping">Add</button>
</fieldset>
</div>
</div>
</form>
<form id="form-rfm69-messages" class="pure-form">
<div class="panel" id="panel-rfm69-messages">
<div class="header">
<h1>MESSAGES</h1>
<h2>
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.
</h2>
</div>
<div class="page">
<table id="rfm69-messages" class="pure-table">
<thead>
<tr>
<th scope="col">Timestamp</th>
<th scope="col">PacketID</th>
<th scope="col">SenderID</th>
<th scope="col">TargetID</th>
<th scope="col">Key</th>
<th scope="col">Value</th>
<th scope="col">RSSI</th>
<th scope="col">Duplicates</th>
<th scope="col">Missing</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="pure-g">
<button type="button" class="pure-button button-clear-filters">Clear filters</button>
<button type="button" class="pure-button button-clear-messages">Clear messages</button>
<button type="button" class="pure-button button-clear-counts">Clear counts</button>
</div>
</div>
</div>
</form>
<!-- endRemoveIf(!rfm69) -->
<form id="form-mqtt" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-mqtt">
<div class="header">
<h1>MQTT</h1>
<h2>Configure <strong>message broker</strong> that will be used to send and receive messages over the network.</h2>
</div>
<div class="page">
<fieldset>
<legend>Broker</legend>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="mqttEnabled"></div>
</div>
<div class="pure-control-group">
<label>Address</label>
<input name="mqttServer" type="text" placeholder="IP or hostname">
</div>
<div class="pure-control-group">
<label>Port</label>
<input name="mqttPort" type="text" value="1883">
</div>
<div class="pure-control-group">
<label>User</label>
<input name="mqttUser" type="text" autocomplete="off">
<div class="pure-form-message-inline">
Leave blank when broker allows anonymous connections. You can also use the following placeholders: {hostname}, {mac}
</div>
</div>
<div class="pure-control-group">
<label>Password</label>
<input name="mqttPassword" type="password" autocomplete="new-password" spellcheck="false">
<span class="no-select password-reveal"></span>
</div>
<div class="pure-control-group">
<label>Client ID</label>
<input name="mqttClientID" type="text">
<span class="pure-form-message-inline">
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}
</span>
</div>
<div class="pure-control-group">
<label>Keep Alive</label>
<input type="number" name="mqttKeep" min="10" max="3600">
<span class="pure-form-message-inline">
(seconds)
</span>
</div>
<div class="pure-control-group module module-mqttssl">
<label>Use secure connection (SSL)</label>
<div><input type="checkbox" name="mqttUseSSL"></div>
<label>SSL Fingerprint</label>
<input name="mqttFP" type="text" maxlength="59">
<span class="pure-form-message-inline">
This is the fingerprint for the SSL certificate of the server.<br>
You can get it using <a class="external" href="https://www.grc.com/fingerprints.htm">https://www.grc.com/fingerprints.htm</a> (if it is publically available)<br>
or, using <a class="external" href="https://www.openssl.org/">openssl</a>. For example, on a Linux / macOS machine:<br>
<code>$ echo -n | openssl s_client -connect &lt;host&gt;:&lt;port&gt; 2&gt;&and;1 | openssl x509 -noout -fingerprint -sha1 | cut -d\= -f2</code>
</span>
</div>
</fieldset>
<fieldset>
<legend>Device settings</legend>
<div class="pure-control-group">
<label>Root Topic</label>
<input name="mqttTopic" type="text">
<span class="pure-form-message-inline">
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.<br>
<span class="module module-relay">- <strong>&lt;root&gt;/relay/#/set</strong> 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.<br></span>
<span class="module module-relay">- <strong>&lt;root&gt;/pulse/#/set</strong> Toggles the switch # and toggles it back after the specified time. Time is expected as <code>TIME[&lt;UNIT&gt;].</code> Without the unit, time is interpreted as a number of seconds (floating point). Unit can either be <code>h</code> for hours, <code>m</code> for seconds and <code>s</code> for seconds. Multiple time and unit pairs are allowed, for example <code>5h4m3s</code>.<br></span>
<span class="module module-cmd">- <strong>&lt;root&gt;/cmd/set</strong> Send a command-line string to be executed. Multiple commands can be separated with <code>\r\n</code></span>
<!-- removeIf(!curtain) -->
<span class="module module-curtain">- <strong>&lt;root&gt;/curtain/set</strong> Set the curtain opening value (0-100), 0 means closed, 100 opened. "on", "off", "pause" pilots buttons.<br></span>
<!-- endRemoveIf(!curtain) -->
<!-- removeIf(!light) -->
<span class="module module-light">- <strong>&lt;root&gt;/rgb/set</strong> Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB" (0-255 each).<br></span>
<span class="module module-light">- <strong>&lt;root&gt;/hsv/set</strong> Set the color using hue (0-360), saturation (0-100) and value (0-100) values, comma separated.<br></span>
<span class="module module-light">- <strong>&lt;root&gt;/brightness/set</strong> Set the brighness (0-255).<br></span>
<span class="module module-light">- <strong>&lt;root&gt;/channel/#/set</strong> 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).<br></span>
<span class="module module-light">- <strong>&lt;root&gt;/mired/set</strong> Set the temperature color in mired.<br></span>
<!-- endRemoveIf(!light) -->
- <strong>&lt;root&gt;/status</strong> 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.<br>
- Other values reported depend on the build options or the heartbeat settings (for example, <strong>firmware</strong>, <strong>version</strong>, <strong>hostname</strong>, <strong>IP</strong>, <strong>MAC</strong>, signal strenth (<strong>RSSI</strong>), <strong>uptime</strong> (in seconds), <strong>free heap</strong> and etc.)
</span>
</div>
<div class="pure-control-group">
<label>Default QoS</label>
<select class="pure-input-2-3" name="mqttQoS">
<option value="0">0: At most once</option>
<option value="1">1: At least once</option>
<option value="2">2: Exactly once</option>
</select>
<span class="pure-form-message">
Level of assurance for delivery of the outgoing messages. Notice that messages are not (currently) cached on the device, QoS levels &gt;0 only guarantee delivery <strong>after</strong> the broker receives the message.
</span>
</div>
<div class="pure-control-group">
<label>Default retain flag</label>
<div><input type="checkbox" name="mqttRetain"></div>
<span class="pure-form-message">
Store the last published message (including the device <strong>status</strong>) on the server, so it can be delivered to any future subscribers that match the message topic.
</span>
</div>
</fieldset>
<fieldset>
<legend>JSON</legend>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="mqttUseJson"></div>
<span class="pure-form-message">
Causes all single <strong>&lt;topic&gt;</strong> messages published by the device, except the device status, to be sent in a JSON payload. For example:<br>
<code>{"relay/0": 1, "hostname": "ESPURNA-123456", "timestamp": "..."}</code><br>
All messages will be queued and sent with a delay (100ms by default). Notice that all nested <strong>&lt;topic&gt;: &lt;message&gt;</strong> are published as-is, only the heartbeat payload will include all of topics at once.
</span>
</div>
<div class="pure-control-group">
<label>Topic name</label>
<input type="text" name="mqttJson">
<span class="pure-form-message">
JSON message will be sent to <strong>&lt;root&gt;/&lt;name&gt;</strong> topic (<strong>data</strong> by default).
</span>
</div>
</fieldset>
</div>
</div>
</form>
<form id="form-nofuss" class="pure-form form-settings">
<div class="panel" id="panel-nofuss">
<div class="header">
<h1>NoFUSS</h1>
<h2>Automatically upgrade the firmware (see <a class="external" href="https://bitbucket.org/xoseperez/nofuss">xoseperez/nofuss</a> for details)</h2>
</div>
<div class="page">
<fieldset>
<div class="pure-control-group">
<label>Enable</label>
<div><input type="checkbox" name="nofussEnabled"></div>
</div>
<div class="pure-control-group">
<label>Server</label>
<input name="nofussServer" type="text">
<span class="pure-form-message">
IP or hostname of the NoFUSS server that will be used for the upgrades.
</span>
</div>
</fieldset>
</div>
</div>
</form>
<form id="form-ntp" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-ntp">
<div class="header">
<h1>NTP</h1>
<h2>Synchronize device time with a remote server</h2>
</div>
<div class="page">
<fieldset>
<div class="pure-control-group">
<label>Device Time</label>
<input name="nowString" type="text" readonly>
</div>
<div class="pure-control-group">
<label>Device Local Time</label>
<input name="nowLocalString" type="text" readonly>
</div>
<div class="pure-control-group">
<label>NTP Server</label>
<input name="ntpServer" type="text">
</div>
<div class="pure-control-group">
<label>Time Zone</label>
<input name="ntpTZ" type="text">
<span class="pure-form-message-inline">POSIX TZ variable, defaults to <code>UTC0</code>. For the list of possible values, <a class="external" href="https://github.com/esp8266/Arduino/blob/master/cores/esp8266/TZ.h">see esp8266/Arduino's TZ.h (use the value inside of quotes)</a>.</span>
<span class="pure-form-message-inline">For the complete documentation, <a class="external" href="https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html">see libc tzset(3) manual page</a></span>
</div>
</fieldset>
</div>
</div>
</form>
<!-- removeIf(!garland) -->
<form id="form-garland" class="pure-form form-settings">
<div class="panel" id="panel-garland">
<div class="header">
<h1>GARLAND</h1>
<h2>Garland configuration</h2>
</div>
<div class="page">
<div class="pure-control-group">
<label>Enable Garland</label>
<div><input class="checkbox-garland-enable" type="checkbox" name="garlandEnabled"></div>
</div>
<div class="pure-control-group">
<label>Brightness</label>
<input class="slider slider-garland-brightness pure-input-1" type="range" min="12" max="254" step="22" name="garlandBrightness">
</div>
<div class="pure-control-group">
<label>Speed</label>
<input class="slider slider-garland-speed" type="range" min="10" max="70" name="garlandSpeed">
</div>
<button type="button" class="pure-button button-garland-set-default">Set default</button>
</div>
</div>
</form>
<!-- endRemoveIf(!garland) -->
<!-- removeIf(!thermostat) -->
<form id="form-thermostat" class="pure-form form-settings">
<div class="panel" id="panel-thermostat">
<div class="header">
<h1>THERMOSTAT</h1>
<h2>Thermostat configuration</h2>
</div>
<div class="page">
<fieldset>
<legend>General</legend>
<div class="pure-control-group">
<label>Enable Thermostat</label>
<div><input type="checkbox" name="thermostatEnabled"></div>
</div>
<div class="pure-control-group">
<label>Thermostat Mode</label>
<div><input type="checkbox" name="thermostatMode"></div>
</div>
<div class="pure-control-group">
<label for="thermostatOperationMode">Operation mode</label>
<input name="thermostatOperationMode" type="text" readonly>
</div>
</fieldset>
<fieldset>
<legend>Temperature range</legend>
<div class="pure-control-group">
<label>Maximum</label>
<input id="tempRangeMaxInput" name="tempRangeMax" type="number" min="1" max="100" data="20">
<span class="pure-form-message-inline" data-key="thermostatTmpUnit">
</span>
</div>
<div class="pure-control-group">
<label>Minimum</label>
<input id="tempRangeMinInput" name="tempRangeMin" type="number" min="0" max="99" data="10">
<span class="pure-form-message-inline" data-key="thermostatTmpUnit">
</span>
</div>
</fieldset>
<fieldset>
<legend>Remote sensor</legend>
<div class="pure-control-group">
<label for="remoteSensorName">Remote sensor name</label>
<input name="remoteSensorName" type="text">
</div>
<div class="pure-control-group">
<label for="remoteTmp">Remote temperature</label>
<input name="remoteTmp" type="text" readonly>
<span class="pure-form-message-inline" data-key="thermostatTmpUnit">
</span>
</div>
<div class="pure-control-group">
<label for="remoteTempMaxWait">Remote temperature waiting</label>
<input name="remoteTempMaxWait" type="number" min="0" max="1800" data="120">
<span class="pure-form-message-inline">
(seconds)
</span>
</div>
</fieldset>
<fieldset>
<legend>Operation mode</legend>
<div class="pure-control-group">
<label for="maxOnTime">Max heating time</label>
<input name="maxOnTime" type="number" min="0" max="180" data="30">
<span class="pure-form-message-inline">
(minutes)
</span>
</div>
<div class="pure-control-group">
<label for="minOffTime">Min rest time</label>
<input name="minOffTime" type="number" min="0" max="60" data="10">
<span class="pure-form-message-inline">
(minutes)
</span>
</div>
</fieldset>
<fieldset>
<legend>Autonomous mode</legend>
<div class="pure-control-group">
<label for="aloneOnTime">Heating time</label>
<input name="aloneOnTime" type="number" min="0" max="180" data="5">
<span class="pure-form-message-inline">
(minutes)
</span>
</div>
<div class="pure-control-group">
<label for="aloneOffTime">Rest time</label>
<input name="aloneOffTime" type="number" min="0" max="180" data="55">
<span class="pure-form-message-inline">
(minutes)
</span>
</div>
</fieldset>
<fieldset>
<legend>Time worked</legend>
<div class="pure-control-group">
<label for="burnToday">Today</label>
<input type="text" name="burnToday" readonly>
</div>
<div class="pure-control-group">
<label for="burnYesterday">Yesterday</label>
<input type="text" name="burnYesterday" readonly>
</div>
<div class="pure-control-group">
<label for="burnThisMonth">Current month</label>
<input type="text" name="burnThisMonth" readonly>
</div>
<div class="pure-control-group">
<label for="burnPrevMonth">Previous month</label>
<input type="text" name="burnPrevMonth" readonly>
</div>
<div class="pure-control-group">
<label for="burnTotal">Total</label>
<input type="text" name="burnTotal" readonly>
</div>
<div class="pure-controls">
<button type="button" class="pure-button button-thermostat-reset-counters">Reset counters</button>
</div>
</fieldset>
</div>
</div>
</form>
<!-- endRemoveIf(!thermostat) -->
<form id="form-domoticz" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-domoticz">
<div class="header">
<h1>DOMOTICZ</h1>
<h2>
Configure the connection to your Domoticz server.
</h2>
</div>
<div class="page">
<fieldset>
<legend>General</legend>
<div class="pure-control-group">
<label>Enable Domoticz</label>
<div><input type="checkbox" name="dczEnabled"></div>
</div>
<div class="pure-control-group">
<label>Domoticz IN Topic</label>
<input class="pure-input-2-3" name="dczTopicIn" type="text">
</div>
<div class="pure-control-group">
<label>Domoticz OUT Topic</label>
<input class="pure-input-2-3" name="dczTopicOut" type="text" data-action="reconnect">
</div>
</fieldset>
<!-- removeIf(!light) -->
<fieldset class="module module-light">
<legend>Lights (IN messages only)</legend>
<div class="pure-control-group">
<label>Light switch</label>
<input name="dczLightIdx" type="number" min="0">
</div>
</fieldset>
<!-- endRemoveIf(!light) -->
<fieldset>
<legend>Sensors &amp; actuators</legend>
<span class="pure-form-message">
Set IDX to 0 to disable notifications from that component.
</span>
<div id="dczRelays" class="settings-group" data-settings-target="dczRelay" ></div>
<!-- removeIf(!sensor) -->
<div id="dczMagnitudes" class="settings-group" data-settings-target="dczMagnitude" ></div>
<!-- endRemoveIf(!sensor) -->
</fieldset>
</div>
</div>
</form>
<form id="form-ha" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-ha">
<div class="header">
<h1>HOME ASSISTANT</h1>
<h2>
Automatically add this device to your Home Assistant though the MQTT discovery. <br><a class="external" href="https://www.home-assistant.io/docs/mqtt/discovery/">
Refer to the official documentation on how to enable it for the HA instance.
</a>
</h2>
</div>
<div class="page">
<fieldset>
<legend>Discovery</legend>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="haEnabled"></div>
<span class="pure-form-message">
Home Assistant MQTT discovery. Enable / disable, then save to trigger an update.
</span>
</div>
<div class="pure-control-group">
<label>Prefix</label>
<input name="haPrefix" type="text">
<span class="pure-form-message">
The prefix for the discovery topic e.g. <code><strong>&lt;prefix&gt;</strong>/switch/espurna-123456/config</code>
</span>
</div>
</fieldset>
<fieldset>
<legend>MQTT</legend>
<div class="pure-control-group">
<label>Retain</label>
<div><input type="checkbox" name="haRetain"></div>
<span class="pure-form-message">
Whether to set the <strong>Retain</strong> flag on outgoing MQTT messages.
</span>
</div>
</fieldset>
</div>
</div>
</form>
<form id="form-thingspeak" class="pure-form pure-form-stacked form-settings">
<div class="panel" id="panel-thingspeak">
<div class="header">
<h1>THINGSPEAK</h1>
<h2>
Send your sensors data to Thingspeak.
</h2>
</div>
<div class="page">
<fieldset>
<legend>General</legend>
<div class="pure-control-group">
<label>Enable Thingspeak</label>
<div><input type="checkbox" name="tspkEnabled"></div>
</div>
<div class="pure-control-group">
<label>Clear cache</label>
<div><input type="checkbox" name="tspkClear"></div>
<span class="pure-form-message">
With every POST to thinkspeak.com only enqueued fields are sent.<br>
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.
</span>
</div>
<div class="pure-control-group">
<label>Address</label>
<input class="pure-input-2-3" name="tspkAddress" type="text">
</div>
<div class="pure-control-group">
<label>API Key</label>
<input class="pure-input-2-3" name="tspkKey" type="text">
</div>
</fieldset>
<fieldset>
<legend>Sensors &amp; actuators</legend>
<span class="pure-form-message">
Enter the field number to send each data to, 0 disable notifications from that component.
</span>
<div id="tspkRelays" class="settings-group" data-settings-target="tspkRelay" ></div>
<!-- removeIf(!sensor) -->
<div id="tspkMagnitudes" class="settings-group" data-settings-target="tspkMagnitude" ></div>
<!-- endRemoveIf(!sensor) -->
</fieldset>
</div>
</div>
</form>
<form id="form-idb" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-idb">
<div class="header">
<h1>INFLUXDB</h1>
<h2>
Configure the connection to your InfluxDB server. Every time device status changes, values will be sent to the database server.
</h2>
</div>
<div class="page">
<fieldset>
<legend>Configuration</legend>
<div class="pure-control-group">
<label>Enable InfluxDB</label>
<div><input type="checkbox" name="idbEnabled"></div>
</div>
<div class="pure-control-group">
<label>Address</label>
<input name="idbHost" type="text">
<span class="pure-form-message">
IP or hostname of the influxdb server
</span>
</div>
<div class="pure-control-group">
<label>Port</label>
<input name="idbPort" type="text">
</div>
<div class="pure-control-group">
<label>Database</label>
<input name="idbDatabase" type="text">
</div>
<div class="pure-control-group">
<label>Username</label>
<input name="idbUsername" type="text" autocomplete="off">
</div>
<div class="pure-control-group">
<label>Password</label>
<input name="idbPassword" type="password" autocomplete="new-password" spellcheck="false">
<span class="no-select password-reveal"></span>
</div>
</fieldset>
</div>
</div>
</form>
<form id="form-rpn" class="pure-form form-settings">
<div class="panel" id="panel-rpn">
<div class="header">
<h1>RULES</h1>
<h2>
Here you can configure advanced rules based on RPN expressions. Check out the <a class="external" href="https://github.com/xoseperez/espurna/wiki/RPN-Rules">wiki page about the RPN Rules module</a> to know how to use them.
</h2>
</div>
<div class="page">
<fieldset>
<legend>Configuration</legend>
<div class="pure-control-group">
<label>Sticky variables</label>
<div><input type="checkbox" name="rpnSticky"></div>
<span class="pure-form-message">
When set, variables will not be forcibly reset to <code>null</code> 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 <code>unref</code>.
Mind that referencing a non-existing variable through <code>&dollar;</code> will immediately stop the rule execution, to either use the variable value or a <code>null</code> it should be prefixed with a <code>&amp;</code> instead.
</span>
</div>
<div class="pure-control-group">
<label for="rpnDelay">Execution delay</label>
<input name="rpnDelay" type="number" min="100">
<span class="pure-form-message-inline">
(in milliseconds)
</span>
</div>
</fieldset>
<fieldset>
<legend>Rules</legend>
<div id="rpn-rules" class="settings-group" data-settings-target="rpnRule" ></div>
<button type="button" class="pure-button button-add-settings-group" data-settings-group="rpn-rules">Add</button>
</fieldset>
<fieldset>
<legend>MQTT</legend>
<div id="rpn-topics" class="settings-group" data-settings-target="rpnTopic" ></div>
<button type="button" class="pure-button button-add-settings-group" data-settings-group="rpn-topics">Add</button>
</fieldset>
</div>
</div>
</form>
<form id="form-cmd" class="pure-form">
<div class="panel" id="panel-cmd">
<div class="header">
<h1>DEBUG LOG AND TERMINAL</h1>
<h2>
Interactive console of the device
</h2>
</div>
<div class="page">
<fieldset>
<div class="pure-control-group module module-dbg module-cmd">
<span class="pure-form-message">
Write a command and press <kbd>ENTER</kbd> (or click the button) to execute it on the device. The output will be shown in the debug text area below. Type <code>HELP</code> or <code>COMMANDS</code> to see available commands.
</span>
<!-- removeIf(!curtain) -->
<span class="pure-form-message-inline module module-curtain">
Type <code>DEBUG</code> to display MCU serial exchanges. Any other command is sent to MCU serial as is.
</span>
<!-- endRemoveIf(!curtain) -->
</div>
<div class="pure-controls">
<button type="button" class="pure-button button-dbg-clear pure-input-1">Clear</button>
</div>
<div class="pure-control-group terminal">
<textarea class="pure-input-1" id="cmd-output" name="log" wrap="soft" readonly></textarea>
<input id="cmd-input" class="pure-input-1 module module-cmd" name="cmd" type="text" autocomplete="none" data-action="none">
</div>
<div class="pure-controls module module-cmd">
<button type="submit" class="pure-button button-cmd pure-input-1">Enter</button>
</div>
</fieldset>
</div>
</div>
</form>
<!-- removeIf(!sensor) -->
<form id="form-sns" class="pure-form form-settings">
<div class="panel" id="panel-emon-expected">
<div class="header">
<h1>Expected values</h1>
<h2>Calculate ratios from raw values that can be measured externally. <br>Enter the known values and press <strong>Calculate</strong> to see the resulting ratio values. Press <strong>Apply</strong> to update ratio values on the SENSORS panel. Press <strong>Save</strong> to commit the changes.</h2>
</div>
<fieldset>
<legend>Settings</legend>
<div class="pure-button-group" role="group">
<button type="button" class="pure-button button-emon-expected-calculate">Calculate</button>
<button type="button" class="pure-button button-emon-expected-apply">Apply</button>
</div>
</fieldset>
<fieldset>
<legend>Magnitudes</legend>
<div id="emon-expected" class="pure-form pure-form-aligned settings-group">
</div>
</fieldset>
</div>
<div class="panel" id="panel-sns">
<div class="header">
<h1>SENSOR CONFIGURATION</h1>
<h2>
Configure and calibrate your device sensors.
</h2>
</div>
<div class="page pure-form">
<fieldset>
<legend>General</legend>
<div class="pure-form-aligned">
<div class="pure-control-group">
<label>Read every</label>
<input name="snsRead" type="number" min="1" list="list:snsRead" class="pure-input-1-4">
<span>second(s)</span>
<datalist id="list:snsRead">
<option value="1"></option>
<option value="6"></option>
<option value="10"></option>
<option value="15"></option>
<option value="30"></option>
<option value="60"></option>
<option value="300"></option>
<option value="600"></option>
<option value="900"></option>
<option value="1800"></option>
<option value="3600"></option>
</datalist>
<span class="pure-form-message">
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.
</span>
</div>
<div class="pure-control-group">
<label>Report aggregated value every</label>
<input name="snsReport" type="number" min="1" step="1" max="60">
<span>reading(s)</span>
</div>
<div class="pure-control-group module module-emon">
<label>Save aggregated value every</label>
<input name="snsSave" type="number" min="0" step="1" max="200">
<span> report(s)</span>
<span class="pure-form-message-inline">
At this moment, only applies to total energy readings.
Set to 0 to disable.
<br><strong>Note that this feature uses the internal flash. Repeatedly writing to the flash storage will quickly wear it out.</strong>
</span>
</div>
<div class="pure-control-group">
<label>Real time API</label>
<div><input type="checkbox" name="snsRealTime"></div>
<span class="pure-form-message-inline">
Most magnitudes are being preprocessed and filtered to avoid spurious values.
Enable this to get unfiltered values in the API (HTTP, MQTT, Prometheus, etc.)
</span>
</div>
</div>
</fieldset>
<fieldset class="module module-analog">
<legend>Analog sensor</legend>
<div class="pure-control-group module module-mics">
<label>Calibrate</label>
<button type="button" name="analog-calibrate" class="pure-button button-reboot button-simple-action">Reboot</button>
<span class="pure-form-message">
Reset gas sensor calibration. Check the sensor datasheet for calibration conditions.
</span>
</div>
</fieldset>
<fieldset class="module module-emon">
<legend>Ratios</legend>
<div id="emon-ratios" class="pure-form-aligned settings-group">
</div>
<div class="pure-controls">
<button type="button" data-panel="emon-expected" class="pure-button pure-input-1-2 button-emon-expected">Calculate ratios from expected values</button>
</div>
</fieldset>
<fieldset>
<legend>Units</legend>
<div id="magnitude-units" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset class="module module-emon">
<legend>Energy monitor</legend>
<div class="pure-control-group">
<button type="button" name="emon-reset-calibration" class="pure-button pure-input-1-2 button-simple-action">Reset <strong>all</strong> internal calibration values</button>
</div>
<div class="pure-control-group">
<button type="button" name="emon-reset-energy" class="pure-button pure-input-1-2 button-simple-action">Set the energy count of all sensors to zero</button>
</div>
</fieldset>
</div>
</div>
</form>
<!-- endRemoveIf(!sensor) -->
<!-- removeIf(!rfbridge) -->
<form id="form-rfb" class="pure-form form-settings">
<div class="panel" id="panel-rfb">
<div class="header">
<h1>RF BRIDGE</h1>
</div>
<div class="page">
<details>
<summary>
Configuration
</summary>
Configure RF code associations for a basic 433 RF recevier, or the device like Sonoff RFBridge 433.<br><br>
To learn a new code click <strong>LEARN</strong> (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.<br><br>
Modify or create new codes manually and then click <strong>SAVE</strong> 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.<br><br>
Delete any code clicking the <strong>FORGET</strong> button.
<br><br>You can also specify any RAW code. For reference see <a class="external" href="https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki/Commands">possible commands for Sonoff RF Bridge EFM8BB1</a> (original firmware supports codes from <strong>0xA0</strong> to <strong>0xA5</strong>).
</details>
<fieldset>
<legend>RF Codes</legend>
<div id="rfbNodes"></div>
</fieldset>
<fieldset>
<legend>Transmition</legend>
<div class="pure-control-group">
<label>Repeats</label>
<input name="rfbRepeat" type="number" min="1">
<span class="pure-form-message">
Number of times to repeat the outgoing transmission
</span>
</div>
</fieldset>
<fieldset class="module module-rfbdirect">
<legend>Pin configuration</legend>
<div class="pure-control-group">
<label>RX Pin</label>
<select class="pure-input-1-4 enumerable enumerable-gpio-hardware" name="rfbRX"></select>
<span class="pure-form-message-inline">
Set to <strong>NONE</strong> to disable the receiver.
</span>
</div>
<div class="pure-control-group">
<label>TX Pin</label>
<select class="pure-input-1-4 enumerable enumerable-gpio-hardware" name="rfbTX"></select>
<span class="pure-form-message-inline">
Set to <strong>NONE</strong> to disable the transmitter.
</span>
</div>
</fieldset>
</div>
</div>
</form>
<!-- endRemoveIf(!rfbridge) -->
<!-- removeIf(!lightfox) -->
<form id="form-lightfox" class="pure-form pure-form-aligned form-settings">
<div class="panel" id="panel-lightfox">
<div class="header">
<h1>LIGHTFOX RF</h1>
<h2>
LightFox RF configuration<br><br>
This page allows you to control LightFox RF receiver options.<br><br>
To learn a new code click <strong>LEARN</strong>, 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!<br><br>
Delete all the codes by clicking the <strong>CLEAR</strong> button and wait for 10 seconds.<br><br>
</h2>
</div>
<div class="page">
<fieldset>
<legend>RF Actions</legend>
<div class="pure-button-group">
<button type="button" class="pure-button pure-input-1 button-lightfox-learn">Learn</button>
<button type="button" class="pure-button pure-input-1 button-lightfox-clear">Clear</button>
</div>
</fieldset>
</div>
</div>
</form>
<!-- endRemoveIf(!lightfox) -->
</div> <!-- content -->
</div> <!-- layout -->
<!-- Templates -->
<template id="template-led-config" >
<div class="pure-form pure-form-aligned">
<fieldset>
<legend>LED #<span></span></legend>
<div class="pure-control-group">
<label>GPIO</label>
<select class="pure-input-2-3 enumerable enumerable-gpio-hardware" name="ledGpio" data-action="reboot"></select>
</div>
<div class="pure-control-group">
<label>Inverse logic</label>
<div class="pure-input-2-3">
<input type="checkbox" name="ledInv">
</div>
</div>
<div class="pure-control-group">
<label>Mode</label>
<select class="pure-input-2-3" name="ledMode">
<option value="wifi">WiFi status</option>
<option value="relay">Follow switch</option>
<option value="relay-inverse">Inverse switch</option>
<option value="findme">Find me</option>
<option value="findme-wifi">Find me &amp; WiFi</option>
<option value="relays">Switch(es) status</option>
<option value="relays-wifi">Switch(es) &amp; WiFi</option>
<option value="manual">Manual</option>
<option value="on">Always ON</option>
<option value="off">Always OFF</option>
</select>
</div>
<div class="module-relay pure-control-group">
<label>Relay ID</label>
<select class="pure-input-2-3 enumerable enumerable-relay" name="ledRelay" ></select>
</div>
</fieldset>
<button class="pure-button button-del-parent more" type="button">Delete LED</button>
</div>
</template>
<!-- removeIf(!rfbridge) -->
<template id="template-rfb-node" >
<div class="pure-control-group">
<fieldset>
<legend>Switch #<span></span></legend>
<div class="pure-control-group">
<label>Switch <strong>ON</strong></label>
<input class="pure-input-1" type="text" maxlength="116" name="rfbcode" data-status="1" data-settings-ignore="true">
<button type="button" class="pure-input-1-4 pure-button button-rfb-learn">LEARN</button>
<button type="button" class="pure-input-1-4 pure-button button-rfb-send">SAVE</button>
<button type="button" class="pure-input-1-4 pure-button button-rfb-forget">FORGET</button>
</div>
<div class="pure-control-group">
<div><label>Switch <strong>OFF</strong></label></div>
<input class="pure-input-1" type="text" maxlength="116" name="rfbcode" data-status="0" data-settings-ignore="true">
</div>
<div class="pure-button-group">
<button type="button" class="pure-input-1-4 pure-button button-rfb-learn">LEARN</button>
<button type="button" class="pure-input-1-4 pure-button button-rfb-send">SAVE</button>
<button type="button" class="pure-input-1-4 pure-button button-rfb-forget">FORGET</button>
</div>
</fieldset>
</div>
</template>
<!-- endRemoveIf(!rfbridge) -->
<template id="template-network-config">
<div>
<div class="pure-control-group">
<label>SSID</label>
<input name="ssid" type="text" value="" data-action="reconnect" required autocomplete="false">
<button type="button" class="pure-button button-more-parent">...</button>
</div>
<div class="pure-control-group more">
<label>Password</label>
<input name="pass" type="password" data-action="reconnect" autocomplete="new-password" spellcheck="false">
<span class="no-select password-reveal"></span>
</div>
<div class="pure-control-group more">
<label>Static IP</label>
<input name="ip" type="text" data-action="reconnect" maxlength="15" autocomplete="false">
<span class="pure-form-message-inline">Leave empty to enable DHCP</span>
</div>
<div class="pure-control-group more">
<label>Gateway IP</label>
<input name="gw" type="text" data-action="reconnect" maxlength="15" autocomplete="false">
<span class="pure-form-message-inline">Set when using a static IP</span>
</div>
<div class="pure-control-group more">
<label>Network Mask</label>
<input name="mask" type="text" data-action="reconnect" maxlength="15" autocomplete="false">
<span class="pure-form-message-inline">Usually 255.255.255.0 for /24 networks</span>
</div>
<div class="pure-control-group more">
<label>DNS IP</label>
<input name="dns" type="text" value="" data-action="reconnect" maxlength="15" autocomplete="false">
<span class="pure-form-message-inline">Set the Domain Name Server IP to use when using a static IP</span>
</div>
<button class="pure-button button-del-parent more" type="button">Delete network</button>
</div>
</template>
<template id="template-schedule-config" >
<div>
<div class="pure-control-group">
<label>Time</label>
<input name="schHour" type="number" min="0" step="1" max="23" placeholder="Hour" value="0">
<span class="pure-form-message-inline">(hour)</span>
<input name="schMinute" type="number" min="0" step="1" max="59" placeholder="Minute" value="0">
<span class="pure-form-message-inline">(minute)</span>
</div>
<div class="pure-control-group">
<label>Weekday(s)</label>
<input name="schWDs" type="text" maxlength="15" value="1,2,3,4,5,6,7">
<span class="pure-form-message-inline">
(comma-separated numbers) 1 for Monday, 2 for Tuesday etc.
</span>
</div>
<div class="pure-control-group">
<label>Use UTC time</label>
<div><input type="checkbox" name="schUTC"></div>
<span class="pure-form-message-inline">
This schedule will trigger based on the UTC time instead of the local one.
</span>
</div>
<div class="schedule-action">
</div>
<div class="pure-control-group">
<label>Restore on boot</label>
<div><input type="checkbox" name="schRestore"></div>
</div>
<div class="pure-control-group">
<label>Enabled</label>
<div><input type="checkbox" name="schEnabled"></div>
</div>
<button class="pure-button button-del-parent pure-input-1-4" type="button">
Delete schedule
</button>
</div>
</template>
<template id="template-schedule-action-relay">
<div class="pure-control-group">
<label>Action</label>
<select class="pure-input-2-3" name="schAction" data-changed="true">
<option value="0">Turn OFF</option>
<option value="1">Turn ON</option>
<option value="2">Toggle</option>
</select>
<label>Relay</label>
<select class="pure-input-2-3 enumerable enumerable-relay" name="schTarget" ></select>
<input type="hidden" name="schType" value="relay">
</div>
</template>
<!-- removeIf(!light) -->
<template id="template-schedule-action-light">
<div class="pure-control-group">
<label>Value</label>
<input name="schAction" class="pure-input-2-3" type="number" min="0" step="1" max="255" value="0">
<label>Channel</label>
<select class="pure-input-2-3 enumerable enumerable-channel" name="schTarget" ></select>
<input type="hidden" name="schType" value="light">
</div>
</template>
<!-- endRemoveIf(!light) -->
<!-- removeIf(!curtain) -->
<template id="template-schedule-action-curtain" class="template">
<div class="pure-control-group">
<label>Curtain position</label>
<input class="pure-input-2-3" name="schAction" type="number" min="0" step="1" max="100" value="0">
<span class="pure-form-message-inline">
(%) 0 for open and 100 for closed
</span>
<label>Curtain</label>
<select class="pure-input-2-3 enumerable enumerable-curtain" name="schTarget" ></select>
<input type="hidden" name="schType" value="curtain">
</div>
</template>
<!-- endRemoveIf(!curtain) -->
<template id="template-relay-control">
<div class="pure-control-group">
<label><span data-key="relayName"></span></label>
<div><input name="relay" type="checkbox"></div>
</div>
</template>
<template id="template-relay-config">
<div class="pure-form pure-form-aligned">
<fieldset>
<legend><span data-key="relayName"></span> (<span data-key="relayProv"></span>)</legend>
<div class="pure-control-group">
<label>Boot mode</label>
<select class="pure-input-2-3" name="relayBoot">
<option value="off">Always OFF</option>
<option value="on">Always ON</option>
<option value="same">Same as before</option>
<option value="toggle">Toggle before</option>
<option value="locked-off">Locked OFF</option>
<option value="locked-on">Locked ON</option>
</select>
</div>
<div class="pure-control-group">
<label>Pulse mode</label>
<select class="pure-input-2-3" name="relayPulse">
<option value="none">Don't pulse</option>
<option value="off">Normally OFF</option>
<option value="on">Normally ON</option>
</select>
</div>
<div class="pure-control-group">
<label>Pulse time (s)</label>
<input class="pure-input-2-3" name="relayTime" type="text">
</div>
<div class="pure-control-group module module-mqtt">
<label>MQTT topic subscription</label>
<input class="pure-input-2-3" name="relayTopicSub" type="text" data-action="reconnect">
</div>
<div class="pure-control-group module module-mqtt">
<label>MQTT topic publish</label>
<input class="pure-input-2-3" name="relayTopicPub" type="text" data-action="reconnect">
</div>
<div class="pure-control-group module module-mqtt">
<label>MQTT topic mode</label>
<select class="pure-input-2-3" name="relayTopicMode">
<option value="normal">Normal</option>
<option value="inverse">Inverse</option>
</select>
</div>
<div class="pure-control-group module module-mqtt">
<label>On MQTT disconnect</label>
<select class="pure-input-2-3" name="relayMqttDisc">
<option value="unknown">Do nothing</option>
<option value="off">Turn OFF</option>
<option value="on">Turn ON</option>
<option value="toggle">Toggle</option>
</select>
</div>
</fieldset>
</div>
</template>
<!-- removeIf(!sensor) -->
<template id="template-magnitude-info">
<div class="pure-control-group">
<label></label>
<input readonly class="pure-input-1-3" type="text" name="magnitude">
<span class="pure-form-message-inline magnitude-info"></span>
<span class="pure-form-message-inline magnitude-description"></span>
</div>
</template>
<template id="template-magnitude-units">
<div class="pure-control-group">
<label></label>
<select class="pure-input-2-3"></select>
</div>
</template>
<template id="template-module-magnitude">
<div class="pure-control-group">
<label>Magnitude</label>
<input class="pure-input-2-3" type="number" min="0">
<span class="pure-form-message-inline">
</span>
</div>
</template>
<template id="template-emon-expected">
<div class="pure-control-group">
<label></label>
<div class="pure-u-1 pure-u-lg-1-4">
<input name="expected:" type="text" class="emon-expected-input">
<input readonly name="result:" type="text" class="emon-expected-result">
</div>
<span class="pure-form-message-inline emon-expected-pwrP">In Watts (W). Calibrate your sensor connecting a pure resistive load (like a bulb) and enter here its nominal power or use a multimeter.</span>
<span class="pure-form-message-inline emon-expected-volt">In Volts (V). Enter your the nominal AC voltage for your household or facility, or use multimeter to get this value.</span>
<span class="pure-form-message-inline emon-expected-curr">In Amperes (A). If you are using a pure resistive load like a bulb, this will be the ratio between the two previous values, i.e. power / voltage. You can also use a current clamp around one of the power wires to get this value.</span>
<span class="pure-form-message-inline emon-expected-ene"></span>
</div>
</template>
<template id="template-emon-ratios">
<div class="pure-control-group">
<label></label>
<input type="text">
</div>
</template>
<!-- endRemoveIf(!sensor) -->
<template id="template-dcz-relay">
<div class="pure-control-group">
<label></label>
<input name="dczRelayIdx" type="number" min="0">
</div>
</template>
<template id="template-tspk-relay" class="template">
<div class="pure-control-group">
<label></label>
<input name="tspkRelay" type="number" min="0">
</div>
</template>
<!-- removeIf(!light) -->
<template id="template-channel-control">
<div class="pure-control-group">
<label>Channel #</label>
<input type="range" min="0" max="255" class="slider channels pure-input-2-3">
<span class="slider"></span>
</div>
</template>
<template id="template-brightness-control">
<div class="pure-control-group">
<label>Brightness</label>
<input type="range" min="0" max="255" class="slider pure-input-2-3" id="brightness">
<span class="slider brightness"></span>
</div>
</template>
<template id="template-mireds-control">
<div class="pure-control-group">
<label>Mireds (Cold &harr; Warm)</label>
<input type="range" min="153" max="500" class="slider pure-input-2-3" id="mireds">
<span class="slider mireds"></span>
</div>
</template>
<!-- endRemoveIf(!light) -->
<!-- removeIf(!curtain) -->
<template id="template-curtain-control">
<div class="curtain-roller" id="curtainGetPicture"></div>
<div class="pure-button-group">
<button type="button" class="pure-button pure-input-1-3 curtain-button button-curtain-close">CLOSE</button>
<button type="button" class="pure-button pure-input-1-3 curtain-button button-curtain-pause">PAUSE</button>
<button type="button" class="pure-button pure-input-1-3 curtain-button button-curtain-open">OPEN</button>
</div>
<div class="pure-control-group">
<input type="range" list="tickmarks" min="0" max="100" class="slider pure-input-1 reverse-range" id="curtainSet">
<datalist id="tickmarks">
<option value="0"></option>
<option value="50"></option>
<option value="100"></option>
</datalist>
</div>
</template>
<!-- endRemoveIf(!curtain) -->
<!-- removeIf(!rfm69) -->
<template id="template-rfm69-node">
<div class="pure-control-group">
<input name="rfm69Node" type="text" placeholder="Node ID" size="8" autocomplete="false">
<input name="rfm69Key" type="text" placeholder="Key" size="8">
<input name="rfm69Topic" type="text" placeholder="MQTT Topic" size="8">
<button type="button" class="pure-button button-del-parent pure-input-1-4">Del</button>
</div>
</template>
<!-- endRemoveIf(!rfm69) -->
<template id="template-rpn-rule">
<div class="pure-control-group">
<input class="pure-input-3-4" name="rpnRule" type="text" placeholder="RPN expression" autocomplete="false">
<button type="button" class="pure-button button-del-parent">Del</button>
</div>
</template>
<template id="template-rpn-topic">
<div class="pure-control-group">
<input name="rpnTopic" class="pure-input-1-2" type="text" placeholder="Topic" autocomplete="false">
<input name="rpnName" class="pure-input-1-2" type="text" placeholder="Variable name" autocomplete="false">
<button type="button" class="pure-button button-del-parent">Del</button>
</div>
</template>
<a href="" target="_blank" rel="noopener" id="downloader">
Download backup .json
</a>
<input id="uploader" type="file">
</body>
</html>