This website works better with JavaScript.
Home
Explore
Help
Sign In
mh
/
mhsw-espurna
Watch
1
Star
0
Fork
0
Code
Releases
0
Activity
Browse Source
Sending voltage to domoticz for HLW8012
fastled
Xose Pérez
7 years ago
parent
5982955226
commit
1e8991e132
3 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
code/espurna/pow.ino
+1
-0
code/espurna/web.ino
+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
>
Write
Preview
Loading…
Cancel
Save