Convert old Shelly 2.5 script to ShellyPlus 2PM #2199
dejan-kosak
started this conversation in
MEPLHAA Scripts
Replies: 1 comment
-
This is what I figured out and it seems to work. |
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
-
Hi.
on my old 2.5 I had a following script, which I could describe as stateless button, where single press on SW2 directly trigger OUT2. OUT1 is not triggered by switch.
{"a":[{"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]}},{"0":{"r":[{"g":15}]},"1":{"r":[{"g":15,"v":1}]},"b":[{"g":5,"p":0,"i":1}]},{"t":3,"f1":[{"g":5,"t":2}],"f2":[{"g":5,"t":3}]}]}
I converted that to new format (not validated):
{ "c": { "io": [ [[4],2], [[15],2], [[5],6,0,1] ] }, "a": [ { "0": { "r": [[4]] }, "1": { "r": [[4,1]] } }, { "0": { "r": [[15]] }, "1": { "r": [[15,1]] }, "b": [[5]] }, { "t": 3, "f1": [[5,2]], "f2": [[5,3]] } ] }
The challenge now is, how to do the same for ShellyPlus 2PM? Help would be appreciated!
p.s. I have new version with PCB v0.1.9
Beta Was this translation helpful? Give feedback.
All reactions