I have a garage where I put in a motion sensor, a door sensor and a light. I want the light to go on when the door is opened or when there is motion. I want it to turn off when the door is closed and there has not been motion for 2 minutes.
Rule 1 (On), Basic mode:
IF
motion changes to active
OR
contact changes to open
THEN
light turn on
This works
Rule 2 (Off) Basic mode:
IF
motion did not change in the last 2 minutes
AND
motion is inactive
AND
contact is closed
THEN
light turn off
The strange thing is that the rule evaluates to true but the action is not executed.
If I simulate the piston, it is executed
If I only open the door without trigger the motion sensor and close it again, the piston is executed and the light goes off
If there has been motion however, it is not executed, even not after the motion has stopped for more than 10 minutes. I checked several times, it does say 2 minutes.
I checked the motion sensor recent activities when I thought it should have turned off the light and the sensor is in motion has stopped and it has been there for more than 2 minutes (it does not even do anything after 10 minutues).
The piston is RUNNING, current state: true, CPU:0% MEM:10%
Any help much appreciated. After some basic playing around with CoRE, this is my first âreal lifeâ implementation.
Thanks for the reply. I will try to get the screenshots. Meanwhile I tried your suggestion but the result is not what I want. With your suggested piston, the light goes off 2 minutes after there is motion or the door is opened. I want the light to go off if the door is closed and there hasnât been any motion for 2 minutes. I just tried your suggestion and it left me in the dark after 2 minutes
This also covers if the door was opened but no one actually went into garage, if for some reason a trigger didnât work and, regular turn off after 3 minutes of no motion.
He canât change the format of the Piston. Thatâs how itâs formatted directly in webCoRE. If you install webCoRE instead of the old CoRE, you can restore his Piston to your WebCoRE with the 4 digit code listed and then modify it to your liking.
Just like @WB70 mentioned and is why one of the many reasons to switch over to webCoRE, well and many other wonderful reasons!
I also define my devices at the top of the pistons so only thing you would have to do is select the devices and they will populate wherever those devices were throughout the Piston. Then its just a matter of tweaking for your needs.
I still have PLENTY of regular CoRE Pistons that work just fine.
Also be careful to check that you have the red lightning bolt next to each âruleâ within your piston. It looks to me like if you have both of those statements in the same piston the first would work and the second wouldnât because there are only conditions and no triggers. If they were in separate pistons, webcore would recognize the conditions and use them as triggers. Basically, in WebCore, you have to have at least one trigger (red lightning bolt) per state ment or it wonât fire.
YeahâŚisnât that what I said? If both of those statements are in the same piston, the second would have no triggers. If they were in separate piston, it would because it translates the conditions into triggers.
See, no lightning bolt on the second statement.
You can have more than one statement per piston but your conditions to triggers functionality only works when there are no triggers in the piston. Which is exactly what i said. Isnât it easier to just use triggers only? I got very confused when trying to use the conditions becoming triggers idea and it ended up causing a whole bunch of issues.
Took me a while to get a grasp on triggers vs conditions and how to use them effectively. I have man Pistons that only use conditions and many that use a combination of triggers and conditions.
If I can write a Piston and avoid triggers I go that route first.
I couldnât agree more. I donât if âbeastâ does him justice though. Maybe the Q of WebCore (Iâm stuck on Star Trek references today).
I would say that avoiding triggers all together might work for you but not everyoneâs brain works that way. When I started writing pistons it just made a lot more sense to me to use triggers only. That way I never had to wonder where the little lightning bolt was gonna show up when I hit save. If you use it more, and can reliably figure that out in your head, then conditions only are probably really easy to use. But again, not all of us are THAT smart and Iâve seen people get caught up on this a LOT. So, it might work easier for some people to use Triggers only instead.
I dunnoâŚwhen I started using WebCore, the documentation made a big deal out of the difference between conditions and triggersâŚbut then conditions can be triggers? My head just started to hurt.
Thank you all for the replies. I have migrated to webCoRE and I now understand you canât paste code. I have managed to get whole thing working EXCEPT⌠delays⌠So, the whole idea is that you enter the room (contact sensor), the light goes on, it stays on if you are in there and the door is closed (motion sensor) but it does go off if you are no longer there and the door is shut. Turning off the light works like a charm because there is no problem with lag but I can open the door, go in, close it behind me and still stay in the dark. I wait and the light goes on. Sometimes I open the door and the light goes on before I even step in. That is of course what Iâm looking for. Any ideas what is causes this delay sometimes (probably 1 out of 3 is slow, seconds, not microseconds)?
(BTW the contact sensor is at most 1,5 meters away from hub and the light switch at most 3 meters away from the hub. I have a 50 MB up/100 MB down internet connection which I verified with a speedtest recently. No problems with for example Netflix)