[DEPRECIATED]…
Post withdrawn by author!
[DEPRECIATED]....... Post Withdrawn By Author!
Runtime Code Reuse
Occupancy not switching to engaged?
Security/Alarm Piston
Device Status Tiles
Moving this to the examples. Go ahead and edit your post with how you did it. There will be interest.
Looking foreword to seeing them. I’ve got some occupancy detection pistons, but it’s limited use case cause of the kind of sensor tracking, its not just movement after all.
very true. though, if you had motion sensors that cover every room or area of the house with no overlapping coverage areas you could assert which of those rooms and/or areas are occupied with a high degree of certainty. may be thats the solution here.
This is a really cool idea, I don’t have motion sensors in all of my rooms yet to really get full use for these DTHs/Piston examples you have. I do plan on adding more motion sensors as time goes along and will definitely look to try this idea out later this year.
@Baz2473 quick question - what do you mean in option 4 of the room type for a linked room? Do you mean, as an example, a lounge that has a door that goes into a conservatory and the lights are operated independently? Or do you mean the lights should be on in the conservatory if the lights are on in the lounge? I understand use case 1 to 3 but 4 got me a bit confused - my lounge has a conservatory coming of it, the dining room coming off it and a hall way to take you to the kitchen/downstairs bathroom/understairs cupboard/front door.
Thanks
I’m having a hard time adjust the sensor timeout to my sensor’s timeouts. can you explain a little better what that means?
It’s how long from a motion detection it goes to no motion correct?
Do your motion sensors have any sort of idle time? I think mine (Bosch) have a minute or two where once it detects motion, it stops looking for a few minutes. I’m not entirely sure. I have to check out the device handlers.
it’s this one https://community.smartthings.com/t/bosch-motion-detector/72127/13
there are 2 DTHs that I can see and I’m hoping to open one up today and see if there’s any sort of switches one it.
They were $15 a piece so I am not at all shocked if they’re not perfect.
The main issue right now is that since there’s this 3 minute delay, the motion detector detects me in my cancelation sensor (hallway), then in the bedroom, light turns on, and if I walk back out in less than 3 minutes, the cancelation sensor doesn’t sense me leaving…
any idea on how I can tackle this?
After motion it sends no motion in 5 seconds. and it’s just one hit.
I can sit there and jump up and down and it’ll record the first time and 5 seconds later send no motion for 3 minutes while I’m jumping up and down. and at the 3 minute mark it’ll send motion again.
I am hoping someone knows DTH language because I don’t. SteveC theoretically fixed it for some people but for me it hasn’t been fixed. there are 2 DTHs out there and both do the same for me
Well, here’s my attempt to improve it. Imagine a room 2 perimeters: inner and outer. inner perimeters are the doors. outer perimeters are adjacent motion sensors. Based on the order the sensors activate/open and deactivate/close, we can come to some conclusions about the room state. The inner perimeter is optional, but if used allows the room to remain engaged indefinitely. It has been working well so far.
Thank you for the inspiration, and the device handler, which I am using. I wish there was a device with more states though.
Sometimes events are missed when waiting at a semaphore
Do you mind sharing what you have used for the timeout global variables? And what exactly does the init piece do?
@defaultRoomEngagementTimeOutInHours = 15
This one should be large. I use it just in case there’s a situation/bug that causes Engaged state when there’s nobody in the room. This way it will self heal after the specified time. Just make sure this is greater than the maximum sleep time, or it will time out during the night.
@defaultRoomOccupationTimeOutInMinutes = 20
@defaultRoomReservationTimeOutInMinutes = 10
Of course you need to play with these values and find what works best for your case.
One observation: the logic of the code has this basic assumption: that the time out of the motion sensors are the same. If they don’t match, you might get Occupied state when it should be Reserved, but with the time out will make it self heal. For the Engaged state (when movement happened with doors closed), this doesn’t matter.
The init section is not really needed. As you make changes, you want to reinitialize the variables. I don’t like that in WebCore, local variables that are initialized in the code behave so different than the ones that are not. I think we should have a 5th type of variable besides system, superglobal, global and local. Something that could be explicitly initialized in the piston, but retains state across runs -instance variables if you will.
How many states are you after?
8 would be ideal, but 7 would suffice: [Undefined],Vacant,Reserved?,Reserved,Occupied?,Occupied,Engaged?,Engaged
Right now I use the local variable, instead of the virtual device, to store all those states. I wish I could use a virtual device directly.
Iris motions or Xiaomi. Iris are pricier. Xiaomi are a PITA to initially pair. But both are rock solid and quick
I need about 10 of them
Do I need the gateway? Is there any weird models or is it just the one?
And it senses motion constantly? Doesn’t go to sleep for 3 minutes right?