Browse Source

Sending voltage to domoticz for HLW8012

fastled
Xose Pérez 7 years ago
parent
commit
1e8991e132
3 changed files with 9 additions and 0 deletions
  1. +2
    -0
      code/espurna/pow.ino
  2. +1
    -0
      code/espurna/web.ino
  3. +6
    -0
      code/html/index.html

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

@ -259,6 +259,8 @@ void powLoop() {
char buffer[20];
snprintf(buffer, 20, "%d;%ld", power, (unsigned long) _energy);
domoticzSend("dczPowIdx", 0, buffer);
snprintf(buffer, 20, "%d", voltage);
domoticzSend("dczVoltIdx", 0, buffer);
}
#endif


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

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


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

@ -409,6 +409,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="dczVoltIdx">Voltage IDX</label>
<div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczVoltIdx" 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