[Updated] Presence Central

community_app

#1

Guys
this is a port of my original ST Presence Central

The original reason I wrote this is because I had lots of separate apps controlling different presence actions.
I just wanted to bring everything together in on Parent/Child app

This is a Parent/Child app to control presence sensor actions. Once installed you can setup any number of ‘child’ apps.

Inputs for events:

  1. Single Presence Sensor – arrived/departed

  2. Group Presence1 – This sets presence to ‘home’ if ANYONE arrives and sets presence to ‘away’ if ANYONE leaves

  3. Group Presence 2 – This sets presence to ‘home’ if ANYONE is present and sets presence to ‘away’ only once EVERYONE leaves.

  4. Group Presence 3 – This sets presence to ‘home’ if EVERYONE is present and sets it to away if ANYONE leaves

  5. Check for presence at a certain time - Useful if you want to do something at a certain time but only if someone is present

Actions:

  1. Control a Switch – Configurable for arrival or departure to turn on/off a switch

  2. Send A Message – on arrival or departure (SMS)
    US & UK

  3. Change Mode – on arrival or departure

  4. Control a Lock - Unlock on arrival, lock on departure

  5. Flash Lights - on arrival or departure

  6. Arm/Disarm Hubitat Safety Monitor

  7. Send a 'PushOver' message

  8. Speak A Message (TTS)

Each child app can be configured to be enabled/disabled via an optional switch.
There are also optional restrictions for mode, within a certain time period, sunrise to sunset & sunset to sunrise.

Current Versions
Parent: 2.0.0
Child :2.4.0


10/05/2018 - Update V2.4.0
Enabled 'Speak A Message' now that we have TTS


21/03/2018 - Update V2.3.1
Added ability to select message priority in PushOver
(Thanks to @stephack & @ogiewon and their brilliant work on the driver)


20/03/2018 - Update V2.3.0
I have now added the ability to send messages with 'PushOver'
Thanks to the excellent driver from @ogiewon

Found here in this thread:


18/03/2018 - Update V2.2.0

Debug issue with SMS sending.
Also added 5 slots for telephone numbers


15/03/2018 - Update V2.1.0

I have now added the ability to Arm/Disarm Hubitat Safety Monitor by presence.
This can be triggered by a single or group presence.

This may be obvious, but this is how it works.

Presence (or group) Leaves/Not present = HSM Arms (Away)
Presence (or group) Arrives/Is present = HSM disarms (Disarms 'Intrusion' but not other alerts)


INSTALL NOTES:

  1. Copy the Parent code from GitHub into a 'New App' under the 'Apps Code' menu then click 'Save'
  2. Copy the Child code from GitHub into a second 'New App' & save this too
  3. Go to 'Apps'
  4. Click 'Load New Apps'
  5. Select 'Presence Central' under 'User Apps'
  6. Save
  7. Go back to Apps and open Presence Central - You can now create new child apps directly from here.

Install and save the Parent first before creating any children.


Future Additions
'Control a door (If someone want to help me test this I would be grateful)


Community Apps
SmartThings now permanently offline
[Updated] - Cobra Apps Container
RM Presence options
Presence triggers with two people
Cobra Apps & Drivers - All Updated
IFTTT & checking multiple conditions using apilio - to set HE mode to "Away"
Presence/Geofencing
#2

Shout out to @Cobra

Huge thanks Andy for this app. It works great, easy to setup and very reliable

Great job and thanks again :slight_smile:

Rick


#3

Update...
Enabled 'Speak A Message' for arrival/departure (TTS)

New Child Version: 2.4.0


#4

@Cobra I tried this app out but decided it wasn't what I needed (No offense). However, when I deleted it from HE it appears that the child app "hung on" to one of my life360 presence sensors and now won't let me delete the code. I tried re-installing the code, but the child app doesn't show up, tried deleting the presence sensor but it still says the code is in use. Any recommendations?


#5

Did you delete just the parent app?
If you delete all the child apps then the parent it should delete ok.

Have you tried a reboot to clear the call on the presence sensor?

BTW
What didn’t work for you in the app?
What didn’t you like?

Andy


#6

The app worked fine just didn't offer anything I needed above what I was doing in RM.


#7

Yes I have tried rebooting, still hanging on. I originally had 6 child apps, the others deleted fine. The apps are no longer present in the app list, but when I try to delete the code it still says the "ghost" child app is in use by a presence device that doesn't exist anymore.

I went ahead and opened a support ticket to see if the HE team can help my fix this. Thanks for your input.


#8

Hi Andy.
Just looking at this app and the first thing I notice that there is no option to change mode if ALL presence sensors are away.
Am I missing something?
Just having a look and wondering if this would work for me.
I can see how it would work for presence changing mode to home when any of a set of presence sensors return to present.


#9

Try this:
Select ‘Group2 - present if anyone is at home’

(This is also not present if everyone left.)

Then select all your presence sensors

Then select “change mode” as the action
You will then see that you can set a mode when everyone leaves
(you shouldn’t need to set a ‘present’ mode)

Andy


#10

I must be missing something but I do not see when everyone leaves, only when someone leaves.


#11

Ok..
perhaps this is not worded correctly but if you set it up like this:

It should work the way you want.

If you think about it..
Group2 is present if there is anyone at home
and not present when EVERYONE leaves (because anyone present would show in the app as 'present'

Try this with a couple of virtual sensors and see how it should work

(Perhaps Group2 should really say: 'Present when anyone is home - not present when everyone leaves)

Andy


#12

So I really like the idea of this solution. So the question is what "presence" solutions should I be using to detect if someone is home or not? In ST I purchased the WebCORE presence and it works awesome. I have not moved that to HE though and not sure if it works. What are you using?


#13

Most of us are using the free Life360 integration with Hubitat. It is currently the only officially supported mobile presence solution. I have also been testing IFTTT's geofencing capability to 'turn on' and 'turn off' a virtual presence sensor. It seems to work pretty well. (Note: this requires a special Virtual Presence sensor that also supports the Switch capability. Let me know if you'd like the source code for it!)

Hopefully, once Hubitat releases their mobile phone app, its presence capabilities will be robust and reliable.


#14

I use a couple of things per person/vehicle

Person:
Life360 on Hubitat
Smartthings presence sensor on Hubitat
Phone app on Smartthings (Sent to Hubitat)

Then Presence Central to control a (switchable) virtual presence sensor

Vehicle
Smarthings presence sensor on Hubitat
Smartthings presence sensor on smartthings (sent to Hubitat)

Then Presence Central to control a (switchable) virtual presence sensor

Sounds complicated but this is the most reliable presence I have had for a long time :slight_smile:

Edit: I forgot to mention that the presence sensors in the vehicles have all been converted to run on AA batteries

Andy


#15

Life360 works great until android sends an update and changes my performance mode from high performance to optimized every time.
Samething always happened with SmartThings using "Tasker/SharpTools/AutoLocation"
Life360 works just as good with less work.

As a backup in one of the vehicles I use the SmartThings arrival (presence) sensor one with the battery mod but I used rechargeable batteries and added a usb battery charger I took from an old dead xbox controller battery I had. Then plugged them into a usb port on the vehicle so it charges the batteries whenever the car is running.
In the second vehicle I did not have another usb battery charger so I removed the battery completely from another SmartThings arrival (presence) sensor and just wired 5 volts (you can use 3.3 volts from it as well I just want to test if 5 volts gave them better range) from a usb adapter and plugged it into cars usb port.
So it is only powered on and shows present whenever the car is running. Then goes to departed 5 minutes after the car is shut off. But I only need it to show arrived when I first come home to disarm, unlock and open garage door. Range is still not great but it always works.
Not sure how cycling the power on and off will affect longevity of the sensor but should be no different than a switch/button.


#16

I have this cycling 5V on/off for 2 years with the exact same thing you are doing and no issue so far on ST.


#17

Smartthings presence sensor on Hubitat

This device?


#18

Yep!
That looks like the one
The Hubitat guys has already written a driver for them.

The ones in my cars are converted to run on AA batteries (which have lasted a year so far) so don’t fit in your pocket but work well.

Andy


#19

Battery mod is here:

Andy


#20

Curious why not hard wire this into the car itself to use the car's battery? Just use a 12v-5v step down and then mount under dash. More of a permanent solution but this doesn't solve people presence nor geo-fencing. I have had no success with Life360 for reliability. On iPhone the app will take it's last presence on the map, pause, ST/HE sees the person in the geo-fence and executes routines (like garage doors open or doors unlock). So I had to abandon Life360 and leveraged the WebCORE mobile app with presence.