1) Give a description of the problem
I am new to Webcore. Just a week searching and trying to develop pistons from examples and reading comments in the community.
I develop a Piston that I can copy and use it for my multiple motion detectors. By setting the different variables, I can create a new Piston for each of my device.
However, I wish to create a unique that will run all of my motion sensor.
In order to do it, I think that I might to use Arrays. One to store my Devices, a second one to store my Lights that my Devices turn On and finally a 3rd to store the duration that the light will stay on.
I need some guidance for the following
- how to subscribe to events for device within an array
- I foresee a problem if many Sensor get activated when the Piston is waiting
- Should I run asynchronous, if so how does it work
- I will definitely have a problem if one my Device turn on multiple lights. This is problem for later.
2) What is the expected behaviour?
A Unique Piston that will trigger to every registered Motion Sensor, that will turn on lights for a set duration. The Piston should be activated immediately anytime a event Motion Sensor is created, not depending on the termination of the previous events.
3) What is happening/not happening?
Nothing, I don’t know where and how to start.
4) Post a Green Snapshot of the piston
https://dashboard.webcore.co/piston/:9cffe3a3fe33e8b131fca871030d6a08:
5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)
N/A
REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.