Hmm, you mean like
deviceStates = 123456:0,234567:1 etc?
Yip, like that. My understanding is that I have to put the cleaned up data into a variable so that I can extract the status of each device from there. Once Iāve done that, I will write the status of a device, to another variable. Iāll have a variable for each physical device containing the status of the device.
Hmm, Iām getting a stray comma in the output⦠need to fix that.
Edit: I uploaded a modified one⦠hopefully the output looks easier to read. 8 secs to process all that⦠hmm, how to speed it up.
|+7695ms|āā0ce830:0, 224860:0, 0c8c30:0, 0ceb70:0, 207100:0, 16a400:0, 2070c0:1, 2070a0:1, 0ce880:0, 0cecb0:0, 2248b0:0, 0ce7f0:0, 0c8b20:0, 0acf30:0, 09e490:0, 0acfd0:0, 0c8dd0:0, 169b80:0, 0d0ce0:0, 0d53d0:0, 0ce7e0:0, 0c8b70:0, 0cefb0:0, 148320:0, 2070b0:0, 0ce890:0, 0ce790:0, 1002d0:0, 1fb970:0, 0c8bd0:0, 0ceba0:0, 0cefd0:0, 0ce770:0, 206b50:1, 0c8b90:0
Aha, I thought it had to be something like that, but I lack the programming skills.
Thanks a million! Really appreciate your assistance.
This was fun, learning experience for me also. Iām curious how to use this to update ST virtual devices also. Hmm
Iām not sure what Iāll use to trigger the piston, but Iāll at least set it up to run every 5 minutes to check for changes.
The idea is basically to set up the piston like this: IF variable A (i.e. the variable containing the states of a QwikSwitch device) change from 0 to 1, then turn Virtual Switch A ON (and the other way around.) Iāve set up one example and it seems to be working fine.
I still have to work out the logic of how many pistons Iāll use to keep the actual QwikSwitch and ST Virtual Switches in sync in both directions. (If a device is turned on from the QwikSwitch side, the update in the ST direction will probably be slow, i.e. when the piston runs every 5 minutes e.g⦠I donāt think there is a way to get the Qwikswitch hub to trigger the piston if the status of a QS device change e.g⦠The most obvious solution is to schedule the piston to run every x minutes, or if a QwikSwitch device is turned on via an ST Virtual Switch)