Using the app to detect the car BT connection and turn HAM on/OFF sort of worked but not 100%, sometimes it would fail to turn HAM on after connection.
I have found that using the phone to detect the BT connection, update the server then using NodeRed to tell the phone to turn HAM on or off works 100% reliably, every time.
Its all sort of working now, on my phone at least and when I’m in my own car.
As it goes on, I might just switch to using a keyring mounted NFC tag and a reader near the front door after all; it’s way more reliable, works for anyone I give a tag to, and gives a working chance of the system having a chance to warn the user if any windows or doors are left open when going out - this is difficult with presence detection as a time delay is needed incase the phone drops off wifi.
Its all good fun, educational and as I’m not using electronic door locking, it’s not mission-critical.
I have the parts to make an ESP NFC reader so will throw one together soon and try that. I don’t want to use the companion app as the reader for a static tag as i’m the only user with the app.