[RELEASE] Combined Presence

Device 1952 is a virtual presence with switch.

In your driver for your virtual presence, does the metadata include departed? Here's what mine looks like:

metadata {
    definition (name: "Enhanced Virtual Presence Sensor", namespace: "joelwetzel", author: "Joel Wetzel") {
	    capability "Actuator"
        capability "Switch"
        capability "PresenceSensor"
	    capability "Sensor"
    
	    command "arrived"
	    command "departed"
    }
}

I don't think so. Do you use a driver with a presence and switch?

Here's the driver I use: https://raw.githubusercontent.com/joelwetzel/Hubitat-Miscellaneous-Drivers/master/EnhancedVirtualPresenceSensor.groovy

Thanks. I’ll give that a shot.

@jwetzel1492

using this driver

Summary
/*


*/

metadata {
    definition (
		name: "Hubitat presence Combined Driver", 
		namespace: "mark-c-uk", 
		author: "mark-c-uk",
	    importUrl:""
    ){
        capability "PresenceSensor"
        capability "Notification"
command "arrived"
            command "departed"
    }
}

preferences {
	input("loggEnable", "bool", title: "Enable logging?")
}

def installed() {
	log.trace "installed()"
}
def deviceNotification(text){
	if (loggEnable == true) log.info "${device.lable} Notification message recived $text"
	sendEvent(name:"notification", value:text)
}
def arrived(){
	if (loggEnable == true) log.info "${device.lable} arrived"
	sendEvent(name:"presence", value:"present")
}
def departed(){
	if (loggEnable == true) log.info "${device.lable} arrived"
	sendEvent(name:"presence", value:"not present")
}

and adding these
ln 141

if (outputSensor.hasCapability("Notification") == true && inputSensorsGps.hasCapability("Notification") == true){
subscribe(outputSensor, "notification", NoteHandler) //assuming custom virtal driver`
}

and this

def NoteHandler(text){
    log.info "message recived from $outputSensor ${text.value} sending to $inputSensorsGps"
    inputSensorsGps.deviceNotification(text.value)
}

you can use the app to pass though notifications so that you can then route all your notification and app's to the one virtaul presence device

Interesting. I don't use the Notification capability, I don't think. What's the use case here?

just so have one device to point all your rules and notifiactions to, at the moment i have presance rules to the virtual and notifiactions to the hubitat mobile app

I'm seeing the same behavior now. My GPS presence is 'not present' and my Wifi presence is 'not present' but my output sensor is 'present'. Standard combiner with all logging enabled. Is there any sort of a delay or should it be instantly reflected in the output sensor once both are not present?

app:2702022-03-30 09:02:19.023 am debuginputsAreInconsistent false
app:2702022-03-30 09:02:19.020 am debuginputsAreAllNotPresent true
app:2702022-03-30 09:02:19.018 am debuginputsAreAllPresent false
app:2702022-03-30 09:02:19.015 am debug***** checkForInconsistencies()

I've been trying to troubleshoot this issue with no luck.. I have a GPS device for my wife's phone (Smartthings App through HubConnect) and that device is funcitoning as expected, the states change correctly within Hubitat. I also have a iPhone Wifi Presence device for her phone and that functions correctly. However, her standard combiner stays 'present' even when both of those other devices are changing. I have the same setup for my phone (smartthings + wifi) and my standard combiner works fine.

I have tried reinstalling Combined Presence, setting up the GPS/wifi devices again, setting up a new output device, etc. Any help would be great.

I've wondered if it was a versioning thing. I haven't been experiencing any issues. This morning, I updated my hubs to latest firmware. We'll see if anything changes.

I am having what seems like the same problem as @BrenenP and @stevenkandres

I've got 2 standard combiners, 1 for me and 1 for my wife. Both are configured the same to combine an OwnTracks Virtual Mobile Presence Device with an iPhone WiFi Presence Sensor. When my 2 presence sensors are "not present", the output sensor associated with these shows "not present". However, when my wife's 2 presence sensors are "not present", the output sensor associated with these shows "present". I'm using Standard Combiner v2.2.1, installed via Hubitat Package Manager and my hub is running 2.3.1.138.

Have we found any possible solutions for this? Let me know if any further information would be helpful! I'm happy to help troubleshoot!

Unfortunately, I'm not able to reproduce it here at my house, with mine or my wife's phones.

How's big are you Geo fences? If your wifi has better range than the size of your geo fense you could have race condition.

Ah, interesting @napalmcsr. However, my Wi-Fi is actually pretty weak and my geofence radii are set to 300m, definitely beyond my coverage area.

1 Like

I remade this app in Webcore, it's working as expected now.

Sweet. Do you want to share your app? Maybe I can give it a try.

Sure!

It just follows the logic of this app, where Wifi devices can trigger arrival but not departed, and GPS devices can trigger both arrived and departed.

Unknown Device 22 and Unknown Device 2 are iPhone Wifi Presence Devices

Unknown Device 23 and Unknown Device 3 are Smartthings Presence Devices

Unknown Device 20 and Unknown Device 19 are the virtual presence devices I had made for this app to manage. It works perfectly now. I know this is sidestepping this app, but it just doesn't work for me after hours of troubleshooting.

1 Like

I have a novice question for this Combined presence app. I have used presence to arm the Hubitat HSM monitor when both my wife and I have left the house via Rule Machine. I used Life 360 and our Samsung phones for presence sensors. Recently, the HSM would arm when I left but my wife was still at home. This led to misery and anguish.

I read that the Combined Presence app could help with this issue. I used Hubitat Package Manager to install the app. I set up a a Boolean-Combiner for myself and my wife. I did not set up Standard Combiners for either one of us. I used the Life 360 presence and the Samsung phone for each of us to set up two boolean sets-one for me and one for my wife.

The problem is probably that my brain is too small to set this up correctly. Is there a resource for this app to explain how to setup the virutal sensors so that I can instruct Rule machine that the last person leaving arms the HSM and the first person arriving disarms the HSM? Thanks for your help.

This is a nice app to have, but i don't think it solves the real problem, that we do not have a reliable geofencing app. Or maybe i am wrong and someone could explain.
Let's say we have multiple geofencing apps combined. What happens if one of the apps does not wor k and it continues to show that you are in the geofence area? It does not matter that the other apps work because the logic would be something like all of them show not present. If you use the other possible scenario and set departed if any of the apps shows departed, it is the same case. It won't work.