I’m relatively new to OpenHab2 so appologies if this is a daft question.
My requirement is fairly common, to implement presence detection such that I can arm / disarm my house alarm, set random lights etc.
I’ve seen a lot of examples and for the most part I’ve got this working. I’m using a simple (unbound) Switch item (Life360_IsSomeoneHome) to indicate if anyone is home. Changes in the switch are triggered as follows:-
- Family members all have the Life360 app on their phone (uses location based services / geofencing)
- When Life360 senses the phones have moved either within or away from our home, I use IFTTT to send a command to MyOpenHab (“Life360_IsSomeoneHome = ON” or “Life360_IsSomeoneHome = OFF”) - there’s logic built into Life360 that can tell if the last family member leaves, or the first family member arrives.
- MyOpenHab then communicates this to my OpenHabian install on my Raspberry Pi
- I then have various rules that are triggered when Life360_IsSomeoneHome changes from OFF to ON, or from ON to OFF.
For the mostpart this is all working fine. However, on occasion the value of Life360_IsSomeoneHome gets set to Null (which stops the rules from firing) - I can’t work out why this would be. It seems to happen when I run the OpenHab app on my iPhone (where I have the Switch item visible) although I don’t alter the value of the Switch through the UI, and even if I did I could only set it to ON or OFF. None of my rules set the value of Life360_IsSomeoneHome to be false. My Raspberry Pi isn’t restarting.
I appreciate there’s a lot of possibilities here, can anyone give me some hints on where to go next / how to debug?
- Is there a good log category to turn on / monitor?
- Is this anything to do with Persistence?
- Could it be to do with how myopenhab communicates with my OpenHabian install on my Raspberry Pi? Can I turn on logging for this?
- Any other thoughts?
Thanks in advance