To save you a lot of trouble and to achieve a reliable solution, check this, my shared solution
https://discourse.nodered.org/t/presence-monitoring-using-bluetooth/5369
To save you a lot of trouble and to achieve a reliable solution, check this, my shared solution
https://discourse.nodered.org/t/presence-monitoring-using-bluetooth/5369