Sonoff POW R2 Script Question #2049
ldellus
started this conversation in
MEPLHAA Scripts
Replies: 1 comment
-
Hi, you managed to solve the problem. I struggle with this too and have come to the same conclusion as you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Assuming the Sonoff POW R2 is supported, I can't find the correct script syntax and I'm hoping someone could help. Here is my script:
{
"c":{
"io":[ [ [ 14, 12 ], 2 ], [ [ 0 ], 6 ], [ [ 4, 5 ], 1 ] ],
"b": [ [ 0, 5 ] ]
},
"a":[
{
"t":1,
"0": { "r": [ [ 12, 0 ] ] },
"1": { "r": [ [ 12, 1 ] ] },
"b":[ [ 0, 1 ] ],
"es":[{
"t":75,
"n":0,
"dt": [ 4, 5, 14 ],
"vf":0.1,
"cf":0.1,
"pf":1
}]
}
]
}
The switch portion works fine. The trouble is with the power, voltage and current measurements. They don't work. I tried pretty much everything besides the correct setup. I think I'm close and my problem is with "dt": [ 4, 5, 14 ]. The doc says "dt": [ CF, CF1, Sel ] Remember to declare used CF and CF1 GPIOs as Input into "io":[...] array, and Sel GPIO as Output. I declared them according to the doc, and I know Sel works because by mistake I used the relay IO and it was toggling on and off, which is the expected behavior of Sel. I suspect CF and CF1 and not functioning. I wonder if I need to declare the UART in "c":. I tried, it didn't work.
Any help would be very much appreciated. Thanks,
Laurent
Beta Was this translation helpful? Give feedback.
All reactions