Browse Source

Add Domoticz 'current' sensor capability to Sonoff POW

fastled
Toni Arte 7 years ago
parent
commit
d448fb6707
7 changed files with 9 additions and 0 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. BIN
      code/espurna/data/password.html.gz
  3. BIN
      code/espurna/data/script.js.gz
  4. BIN
      code/espurna/data/style.css.gz
  5. +2
    -0
      code/espurna/pow.ino
  6. +1
    -0
      code/espurna/web.ino
  7. +6
    -0
      code/html/index.html

BIN
code/espurna/data/index.html.gz View File


BIN
code/espurna/data/password.html.gz View File


BIN
code/espurna/data/script.js.gz View File


BIN
code/espurna/data/style.css.gz View File


+ 2
- 0
code/espurna/pow.ino View File

@ -239,6 +239,8 @@ void powLoop() {
domoticzSend("dczPowIdx", 0, buffer);
snprintf(buffer, 20, "%d", voltage);
domoticzSend("dczVoltIdx", 0, buffer);
snprintf(buffer, 20, "%s", String(current).c_str());
domoticzSend("dczCurrentIdx", 0, buffer);
}
#endif


+ 1
- 0
code/espurna/web.ino View File

@ -355,6 +355,7 @@ void _wsStart(uint32_t client_id) {
#if ENABLE_POW
root["dczPowIdx"] = getSetting("dczPowIdx").toInt();
root["dczVoltIdx"] = getSetting("dczVoltIdx").toInt();
root["dczCurrentIdx"] = getSetting("dczCurrentIdx").toInt();
#endif
#endif


+ 6
- 0
code/html/index.html View File

@ -415,6 +415,12 @@
<div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
</div>
<div class="pure-g module module-pow">
<label class="pure-u-1 pure-u-sm-1-4" for="dczCurrentIdx">Current IDX</label>
<div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczCurrentIdx" type="number" min="0" tabindex="36" data="0" /></div>
<div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
</div>
<div id="idxs">
</div>


Loading…
Cancel
Save