I am trying to get my motion switches working in the following way in webcore.
Motion activated - turn on
Switch receives physical on - set "powder" variable to "true"
Motion stays away from active for 3 mins, only when switch is on, and "powder" variable "false" - turn off
Switches changes to off physically - set "powder" variable to false"
The problem I am having is that when the motion turns the light on, the variable gets set to "true" after about 20 seconds , even though the events show it as digital. I am guessing its because I am using the "received" option.
If I use "changes to physical on" it doesn't work because the motion has already turned the light on, so its not actually changing.
I have tried the built in driver, the " GE/Jasco Z-Wave Plus Motion Switch Combo Driver" from JasonJoel, and a couple of others.
I had a driver in ST that showed the on/off switches as buttons, so if the On switch was pushed, it showed up as a "Button 1 pushed" and if I had it set to physical, it worked fine. I cant find this driver now, and I don't think it was ever ported to HE.
Is there a way I can have the variable change using the "$status" option? If so, what would I set, value, expression or argument" and what would I put in?
This webcore thing is over my head, for the moment, maybe always, but...
I have three of these things.
Unless the combo is brand new and great, I think you want to use @JasonJoel 's component driver, which splits up the motion sensor from the switch. I use that one on mine.
If you'd like me to test anything non-webcore on mine, let me know.
Here's what I get when I walk into my powder room, lol:
Do you use webcore at all? If so can you set something up so that if the switch receives a physical on, it turns something else on, and then activate the motion sensor.
Now that webcore is built in, I am trying to move everything to it I can, just for simplicity, I can have multiple things in 1 piston and cut my number of pistons down, vs having 1 things in a rule machine rule, and having a bunch of rules in rule machine.
I got the component drive to give me child devices, but it does the samething.
If I set the trigger to set the variable to “true” using “switch physical changes to on”, it doesn’t do anything because the motion has already turned on the light, so pushing the button doesn’t actually “change” anything.
If I set the trigger to set the variable to “true” using “switch physical receives on” then when the motion sensor turns on the light, after about 20 seconds, the variable gets set to “true”. I am guessing that the “receives” is looking at the physical state of the switch, which at that point, is on.
Under “what kind of comparison” I don’t have anything that just looks for the switch to be pushed. With the driver I had in ST, it saw the on switch as a button, and could be looked at for just a push.
Most of this is over my head, but could you be complicating things too much?
It sounds like from the first post that you want the light to come on automatically when someone walks in and also when the 'on' paddle is pushed. The light will remain on until 3 minutes after no motion is detected and then will be shut off by the hub. Now, if someone leaving the room hits the 'off' paddle, the light will turn off. My motions are set with a 10 second time out, which leaves plenty of time to get out of range of the sensor. I do this in several places with Simple Automation.
In my bathrooms, I have contact sensors on the doors. Again, with SA, the contact sensors act as a restriction switch so that with the door closed motion doesn't turn off the lights. Upon leaving the lights are turned off and the fan goes to a timer-unless you turn it off with the switch.
@jasonjoel has 6 buttons available on his switches, which I use a lot, but I think there's something about this motion switch that prevented him from doing it.
I still don't know or understand what you're trying to do, but how about maybe getting a virtual switch involved? Maybe have it turned on by the motion sensor...that 20 seconds I bet is related to the default 20 second timeout...but have it turn itself off in 3 minutes. Maybe get the properties for your variable from that?
Main reason is if the shower in my second bathroom is being used, with just motion, it times out on you.
My goal was that if you push the button, it sets a variable or turns on a virtual switch, and when that variable is set of that virtual switch is on, it prevents it from turning off, but I can’t find a way to turn the virtual switch on from the switch on button.
Perhaps you have a nearby toggle switch that you could use as a button? I do that to turn motion on and off around the house. I do three taps up to turn off and three taps down to turn on. I've observed here that double taps can be inadvertent.
I have another idea. You could mount a ZEN34 battery powered button controller. It looks like a decora switch mounted in its holder.
The contact sensor on the door has been great for us though.
That’s always an option, but I’m looking for as simple as it can be, without costing any more money.
It worked in ST, so there’s gotta be a way to make it work in HE, I’m going to do some research to figure out printing that other driver.
I just want it as simple as can be, I don’t want to try and explain to a guest, “if you are going to take a shower, you have to push this other button 3 times”
I found another driver that shows it as a button push, but the way it’s coded, they can’t trigger anything.
I don't have any 26931 in hubitat right now to check. And I don't use webcore at all, so can't comment there.
But when I wold do things like this in the past I would run the device in MANUAL mode, and use the motion event to turn it on off in logic (RM, webcore, whatever)- then it is easier to "trap" and compare to a variable (or whatever).
I would have thought using the physical on/off to trigger the variable would have worked for setting the variable, but without hubitat device logs (not webcore logs) it is hard to visualize which exact events are coming in and when.
The device is a bit annoying how it reports on/off as motion and button presses look the same, as I remember.
If I find an extra 2693x device I'll hook it up and look. I might have another one in a box somewhere.
I’ve got it in manual mode, I think the problem is when you reach in to turn it on, it picks up the motion, and flips the light on. So technically, when you actually hit the switch, nothing changed since the light was already on.
This device is annoying, I have 5 of them, and there’s different reasons and circumstances when I want them to just stay on.
I don’t know much about coding, but I’ll sit down and see what I can figure out. They worked perfect back in the day on ST, and HE is better at everything than ST was, so there is a way to do it, just gotta find someone who codes who has the same idea, or figure out how to code, lol.
Would you mind looking at that old ST driver, and see if there is any way to take what they did with the button, and pull it into your HE driver? I think you mentioned you used his as inspiration.