Is it possible to clear a device variable?
Or to set the device variable to initial on every piston start
Clear a device variable or set initial
Just set variable to āā at the start of the piston run⦠allongside your wait 2 minutes.
Your piston will never allow more than one device to be listed in your āproblemListā though, as each run of the āfor eachā statement that finds a problem, will overwrite the last.
Youād be better off using the āsave matching devices to variableā function, which can be found within the IF statement by clicking on the cog symbol.
thanks
do i need the āJust set variable to āā at the start of the piston runā for the updated piston?
I donāt think so⦠if there are no matching devices to save to the variable, I think it clears the variable automatically.
ok perfect.
is it possible to check the entries in the device list - problem list?
at the moment, i got the push notification with "empty list macht Probleme!"
so i going to create an if statement.
āif problem_list is emptyā - do nothing
You should already have that check on lines 52 and 55⦠if either of those statements are true then the list should be populated and the message sent.
If both are false, lists will be empty and the THEN will not fire, so no message.
If one statement is true and the other false, then one lost will be empty the other populated, and message will be sent (assume that is what you are seeing?)
i have some problems with the fibaro switches. so i need a double security check.
if i turn on the switch and then turn it off, again. then often it works.
so i have updated the code and also the point with the two lists an the output.
is it correct so?
What exactly is the problem with the Fibaro switches?
They are usually very very reliable⦠I have zero issues with mineā¦
What handler are you using?
Fibaro Wall Plug ZW5
(name: āFibaro Wall Plug ZW5 STā, namespace: āClassicGODā, author: āArtur Dragaā)
Fibaro Wall Plug
name: āFibaro Wall Plug STā, namespace: ācscheieneā, author: āSmartThings,gpsmith,cscheieneā)
Fibaro FGS-222 Double Relay Switch
(name: āFibaro FGS-222 Double Relay Switchā, namespace: āsmartthingsā, author: āRobinā) {
Fibaro Double Switch 2 FGS-223
(name: āFibaro Double Switch 2 FGS-223ā, namespace: āerocm123ā, author: āEric Maycockā) {
Looks ok⦠but youāll still need to test it.
There really is no right or wrong way with webCoRE⦠If it works itās good.
So are you having issues with all of those Fibaro devices?
What exact issues are you having?
Every 3 -4 days, a device didn“t siwtch off after the routine "good night"
i dont know why.
that is why i created the āsecurity check pistonā
do you have a idea to resolve the problem otherwise?
are my device handler ok?
Is it one of those devices in particular or have all of them had problems at some point?
Itās no uncommon for ST to miss commands if you are trying to turn off a lot of things at the same time (maybe 20+)
Try this:
Nice, Iām gonna use this one. Only thing that seems to be missing, is a counter reset.
I set up my lights and switches into global variables a while ago while testing another piston, and never got back to using the variables. This works nicely with that.
Thanks!
A post was split to a new topic: How to stop additional āIFā blocks running with the rest of the piston?