Occupancy not switching to engaged?


#1

1) Give a description of the problem
Using one of the old occupancy pistons, the room never actually goes into engaged mode

2) What is the expected behavior?
After door closes (room alarm is strobe and siren), IF motion is detected inside, that means the room is 100% occupied with no doubts. Set alarm to siren

3) What is happening/not happening?
After the sensor stops detecting motion (xiaomi sensor only senses motion for about 5 seconds then sits dormant for 55 seconds) it resets the motion IF so the timer stops.

If I set TCP to never, then regardless of other changes to the alarm (like if I open the door) it won’t do the change because the timer is still running and after the timr stops, the alarm will always go to siren.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach any logs (From ST IDE and by turning logging level to Full)

@Baz2473 Even though you’ve changed how you do things a little you may have an answer? Afterall your new app detect engaged pretty accurately. I just have some issues with the room in occupied mode. I can PM you about that but for now if you could help me fix this?


#2

When I first made these pistons I didn’t realise that people could use sensors other than smartthings own sensors with smartthings so I just assumed that it would work for everyone.
The pistons are designed in such a way as so that things can only happen correctly if motion is still active.

The problem is the sensor, the fact that it has a 55 sec blind time is causing it not to function how the piston was designed to. I’ll make some changes to the current piston design you have sent me and see if I can make a fix for the Xiaomi sensors for you.


#3

All of my sensors are SmartThings own SmartSensors, so unfortunately i can’t check that this will work for your sensors, I’ve tried to imagine all the scenarios for your room and sensor but i may have overlooked something, please give this new piston a try and see how it goes… let me know what works and what doesn’t and i’ll see if i can change things if need be…


#4

I don’t want to exagerate things here but You are a GOD


#5

Just one question:

And I have this problem when I try it too. {sensortimeout + 2} if I open that condition, the expression result is 2000

I have the same issue if I try to do any sort of math with my integer as well. like sensortimeoutx2 comes out to be 70000 for some reason


#6

your sensortimeout must have been empty when you try the +2

miliseconds is the key…

70,000 would be 35 seconds x 2


#7

Just Updated…

  • Version: 1.8.3
  • Added The Option To Send A Notification (Push/SMS) To Contacts When Area Becomes ‘VACANT’.
  • Added The Option To Only Send Notification During Selected Modes.
  • Version: 1.8.0
  • Added The Option To Send A Notification (Push/SMS) To Contacts When Area Becomes ‘OCCUPIED’.
  • Added The Option To Only Send Notification During Selected Modes.

https://community.webcore.co/t/occupancy-detection-with-smartapp-custom-dth-useful-for-keeping-lights-on-if-a-room-is-occupied-motionless/505?u=baz2473


#8

ah I see! Thanks! it actually works fine!


#9

Did that new piston fix it for you?


#10

I think so. haven’t had much time to test but so far it seems fine?