Sorry for my post one up. I realised the piston was rubbish. See this one:
I’ve managed to add the TV (switch 5 as below), but it’s not working right
Switch 5 is the TV
Nothing is happening either way when I turn the TV on or off. When I go into ‘Show Device’ in IDE, the switch is showing as changing (i.e. from on to off) when I use the TV remote.
Any ideas?
This is the log when I turn the TV on:
12/04/2018, 08:47:21 +80ms
+1ms ╔Received event [TV].switch = On with a delay of 94ms
+88ms ║RunTime Analysis CS > 14ms > PS > 32ms > PE > 43ms > CE
+90ms ║Runtime (38727 bytes) successfully initialized in 32ms (v0.3.104.20180323) (89ms)
+91ms ║╔Execution stage started
+98ms ║║Comparison (enum) On changes_to (string) off = false (1ms)
+99ms ║║Condition #8 evaluated false (4ms)
+100ms ║║Condition group #1 evaluated false (state did not change) (5ms)
+104ms ║║Comparison (enum) On changes_to (string) on = false (1ms)
+105ms ║║Condition #5 evaluated false (4ms)
+106ms ║║Condition group #2 evaluated false (state did not change) (4ms)
+108ms ║╚Execution stage complete. (18ms)
+109ms ╚Event processed successfully (110ms)
and this is the log when I turn the TV off:
12/04/2018, 08:48:06 +929ms
+2ms ╔Received event [TV].switch = Off with a delay of 69ms
+100ms ║RunTime Analysis CS > 15ms > PS > 38ms > PE > 46ms > CE
+102ms ║Runtime (38728 bytes) successfully initialized in 38ms (v0.3.104.20180323) (100ms)
+103ms ║╔Execution stage started
+111ms ║║Comparison (enum) Off changes_to (string) off = false (0ms)
+112ms ║║Condition #8 evaluated false (4ms)
+113ms ║║Condition group #1 evaluated false (state did not change) (5ms)
+117ms ║║Comparison (enum) Off changes_to (string) on = false (1ms)
+118ms ║║Condition #5 evaluated false (3ms)
+119ms ║║Condition group #2 evaluated false (state did not change) (5ms)
+121ms ║╚Execution stage complete. (18ms)
+122ms ╚Event processed successfully (122ms)