[RELEASE] Combined Presence

Well that didn't seem to do anything. So this morning I changed the Standard Combiner to be an Advanced Combiner and that seemed to behave as expected then. I'll leave that in place for a bit and see if it's reliable. FWIW.

Okay, got another bad day with the presence today. Thoughts on this series of events...
I'm only combining her Hubitat app on phone and the Wifi (static IP) presence phone. The IFTT location Virtual presence switch is unreliable so I've abandoned that for now to not muddy water.
BTW, before this, she updated her app to latest hubitat app release that came out yesterday. The hub is also at latest 2.2.7.126 code.

You can see very bottom is when she leaves.
Then her Wifi phone gets one last ping in at 9:18am, then it should be 6 minutes of Wifi phone pings failing before that device will show as departed so set that aside. Farther up the logs it'll show the Wifi phone finally fail it's sixth time and flip to departed but the Combiner doesn't care about that.

You see the "Karla phone", which is the Hubitat app on her phone, show departed and the Presence status changes for that device. Not sure why in the same second it shows she's departed again but then the Combined Presence goes to ARRIVED and stays that way and never locks doors and sets alarm.

2021-05-14 09:19:02.356 am infoCombined Presence Karla has arrived

2021-05-14 09:19:02.348 am infoKarla Phone has departed

2021-05-14 09:19:02.339 am debugPRESENCE CHANGED for: Karla Phone

2021-05-14 09:19:02.297 am infoKarla Phone has departed

2021-05-14 09:18:42.155 am debugKarla Virtual Wifi Phone: httpGetCallback(The following result means that the hub was UNSUCCESSFUL in discovering the phone on the network: {"headers":null,"warningMessages":[],"status":408,"errorMessage":"Connect to 192.168.1.168:80 [/192.168.1.168] failed: connect timed out","errorData":null}, data)

2021-05-14 09:18:42.142 am debugKarla Virtual Wifi Phone: httpGetCallback({"headers":null,"warningMessages":[],"status":408,"errorMessage":"Connect to 192.168.1.168:80 [/192.168.1.168] failed: connect timed out","errorData":null}, data)

2021-05-14 09:18:32.079 am debugKarla Virtual Wifi Phone.refresh()

2021-05-14 09:17:41.346 am debugKarla Virtual Wifi Phone: httpGetCallback(The following 'connection refused' result means that the hub was SUCCESSFUL in discovering the phone on the network: {"headers":null,"warningMessages":[],"status":408,"errorMessage":"Connect to 192.168.1.168:80 [/192.168.1.168] failed: Connection refused (Connection refused)","errorData":null}, data)

2021-05-14 09:17:41.334 am debugKarla Virtual Wifi Phone: httpGetCallback({"headers":null,"warningMessages":[],"status":408,"errorMessage":"Connect to 192.168.1.168:80 [/192.168.1.168] failed: Connection refused (Connection refused)","errorData":null}, data)

2021-05-14 09:17:32.076 am debugKarla Virtual Wifi Phone.refresh()

2021-05-14 09:15:45.045 am infoFront Door OpenClose is closed

Oh wow. That is helpful. There's a really subtle bug in my code that could only be triggered if one of the sensors fired 2 departed events in close succession like that. That's never happened on my setup, but now that I see that you're getting a double event, it makes sense.

I'll work on it this weekend.

thanks!

Wow, well, thank you. I certainly didn't mean to monopolize your weekend. Hope it's an easy one. I share the sentiment the others have and very much appreciate your work!

Not sure if it's significant but I noticed when I view the Logs of the Hub, I see the Combined Presence Mark "arriving" repeatedly even though I've not re-arrived not to mention left. When I go to the "device" Combined Presence Mark and view Events button, it doesn't show that. I shows the last time I in-fact got home (yesterday at 6:40pmish).

I rebooted my hub at around 7:30 or so btw. You can see I arrive over and over again at random intervals and no where do I see a departed. But perhaps that's the Virtual Wifi Phone re-arriving and Combined Presence Mark just re-affirms that each time it sees the virtual phone re-arrive?? I dont have debug on for the virtual phone at moment.

The device itself Event button. Last arrived 6:40pm which is the reality.

Just food for thought I guess.

Hi there,

I've been having trouble the last few days. My combined presence is only set up for my iPhone and uses the Hubitat app. My problem is that even though my WiFi is present, my combined presence says that it is isn't present.

What am i doing wrong? I thought that if either were present, the combined would be too?

Question about integration with other solutions.
I have been using this for quite some time it works well. However, I'm using UniFi presence integration with this. UniFi does work correctly. I just don't know, or I suspect, that Combined presence may not be using this function/integration.
Is there a way to confirm that?

Reason for my suspiciousness is some of my combinations don't have multiple GOE location options and should that have a problem it doesn't look like they are taking into account.
Luckly, I have done a lot of work to overcome/resolve, so I have a very consistent behavior but at times if the Phone or whatever has a power issue (saver mode) it doesn't seem to look at the WIFI setting in UniFi .

Again, great applications. Been great to work with it

Took me a little bit to get to it, but I've published an update to Combined Presence. Let me know if it fixes your issue. Thanks!

Thank you for looking at this. I will let you know. Thank you!

I see an error. Trying different things to see if it will see the Unfi correctly. I just turn off the Wi-Fi on my phone.

app:18692021-08-02 09:57:02.529 pm errororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_app_joelwetzel_Combined_Presence___Standard_Combiner_954.presenceChangedHandler() is applicable for argument types: (com.hubitat.hub.domain.Event) values: [com.hubitat.hub.domain.Event@75a059] (presenceChangedHandler)

Yeah something didn't work right. I'll see if I can pull the logs. My wife has two geofencing sensors and a Wi-Fi sensor and it still shows her at home CP sensor even though all the sensors show away. My kids have one geosensor for each person and then the Wi-Fi sensor and the same thing had happened.

I forgot to turn on debugging so I'll go and do that now.

Seeing a lot of errors with the new update:

It just worked for my presence sensor. I'm wondering if turning on debug reinitialize the driver and might be working now. I didn't see much in the lodge to show one way or the other.

Yes, that's exactly right. I should have mentioned it. Go into each of your "standard" instances and save it again. That will fix the error. It needs to re-initialize.

1 Like

Thanks for looking at this and confirming this. Thank you again!

1 Like

@jwetzel1492 Standard Combiner is broken for me, I tried reinstalling but I get a 404 error when I try to create one. Maybe something wrong with the HPM manifest?

I'm not sure if it's the right way to do it, but I went into Apps Code and changed the name from Combined Presence - Standard Combiner to Standard Combined Presence Instance and that seemed to make it happy.

1 Like

You're very right. Not sure how that bug slipped in. I'll post an update asap.

Ok, I pushed out a v2.1.1. This resolves the naming mixup. You may need to re-save your existing combiners.

1 Like

Installed this app and very pleased with the results. Combining 4 GPS based apps, HE, Alexa, Macrodroid (both the builtin geofence and the Autolocation Tasker plugin). With Macrodroid, I use GET feature with Hubitat's Maker Api app to trigger a HE virtual presence device. Combing all of this with the WiFi presence.

Rock solid so far.

2 Likes