[DEPRECIATED]....... Post Withdrawn By Author!


#12

This is INSANE. I love it!


#14

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.


#16

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.


#17

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?


#19

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


#20

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
#22

Do you mind sharing what you have used for the timeout global variables? And what exactly does the init piece do?


#23

@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.


#24

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.


#25

thank you sir


#27

I may be changing the sensors. Still under 30 days and I’m not at all happy with them.


#28

Iris motions or Xiaomi. Iris are pricier. Xiaomi are a PITA to initially pair. But both are rock solid and quick


#29

Where do you get the xiamois and what’s the issue with pairing?


#30

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?


#31

The Xiaomi’s can be problematic to pair but once paired (I have found) they are great.
I have paired some, took the battery out, and then put the battery back in 3 months later and they work straight away. No need to pair again.
When they detect motion they will not report motion again for 1 minute. You can set a timer within the app for no motion.
It detects motion, it then reports no motion depending on your timer setting and then will only report motion again after 1 minute.
No, you do not need the gateway. Just download the DH’s for them.


#32

Wonderful! I will get them!


#34

Can we get the piston code added that isn’t a screenshot?

Or how do I import your pistons?


#36

Ahhh ok that little short code, I just realized that. Thank you, I’m new to WebCore and SmartThings in general. I just got three motion detectors and I’m trying to set this up to see how well it works :slight_smile:


#37

Will this work correctly if there are multiple people in the house? For example if two people are in the living room and one decides to walk down the hallway ( which triggers the hallway motion detector ) this will currently turn off the living room lights right?

I have a feeling the above quote from you has something to do with it, or maybe I’m using the wrong piston?


#39

mine works at the timer and motion sensor