From 1e8991e13278509f8505f662eeac498db36fb18f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 5 Feb 2017 10:35:02 +0100 Subject: [PATCH] Sending voltage to domoticz for HLW8012 --- code/espurna/pow.ino | 2 ++ code/espurna/web.ino | 1 + code/html/index.html | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/code/espurna/pow.ino b/code/espurna/pow.ino index bb6b0fe7..41438d72 100644 --- a/code/espurna/pow.ino +++ b/code/espurna/pow.ino @@ -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 diff --git a/code/espurna/web.ino b/code/espurna/web.ino index 777b5d17..6dc65f2c 100644 --- a/code/espurna/web.ino +++ b/code/espurna/web.ino @@ -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 diff --git a/code/html/index.html b/code/html/index.html index 71c96e5f..116a6df7 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -409,6 +409,12 @@
Set to 0 to disable notifications.
+
+ +
+
Set to 0 to disable notifications.
+
+