[monitor] Reliable, Multi-User, Distributed Bluetooth Occupancy/Presence Detection

You have, this is likely a bug.

What are others other for their NodeRed HA flows for at least 2 known trackers? I am trying to create the best method usind -tad only as i trigger using the front door and garage door.

  • I current have a HA script that runs arrive with 30 sec delays 3 times on a trigger and the same for a depart. But want to see what others are doing and maybe i tweak my setup
    Thank you!!

I posted mine up above,

Changed a little bit with the latest HA node palette update, but not enough to warrant reposting.

So for me i have 2 piā€™s main floor and upper floor

  • I have a trigger on my main door and garage door
  • i am using Node Red in HA and i am using my confidence level of myself and my wife
  • when i open the front door it checks our conf level and if we are at 100 it will trigger the depart script which i have it calling the depart topic 4 times with 30 sec delays between them.
  • When we are at 0 it will run the arrive script

Here is the issue; i left the house first and i was at 100; so i got departed no problem; i am waiting in the car on the driveway now and my wife comes out from the front door and since she was at 100 it runs the depart script for her now - BUTā€¦ now that i am sitting at 0; it also runs the arrive script on me and brings me back home.

Thinking there has to be a better method to this all!!

Hey guys!

I have everything setup but Iā€™m having a hard time making work the depart or scan triggers when running monitor with -tad options.

Iā€™m connected to the MQTT broker (Mosquitto add-on on my Hassio install) on 2 different clients so with one I can send the topics and with the other I can make sure it was received. Everything seems to be working fine in the broker, I even get RSSI messages from one of my phones meaning monitor is also connected correctly to the broker.

However when I send the topic monitor/scan/depart or monitor/scan/arrive nothing happens and monitor doesnā€™t show any new scans. The message In the broker is received tho.

No entirely sure how to debug or what to try, any ideas?

Thanks!

Make sure youā€™re also using the -r flag for a full: -tadr - this will allow your nodes to communicate with eachother.

these should both be blank variables if you do not use a password on your mmqtt broker

Thanks @andrewjfreyer, I only have one node but I will try your suggestion and see if it makes a difference!

I misread - the -r flag addition wont matter for a single node installation. Run monitor from the command line and see what happens when you send the mqtt messages.

Yes, that is what Im doing, basically is not triggering anything :frowning:

@andrewjfreyer I much appreciate your work on this, and the copious documentation. I have just set up Monitor and having it running on default parameters. I am trying to track a few beacons (these ones) and I am struggling. I have run
sudo bash monitor.sh -b
and can see several devices being reported by MAC address, including those in the known_static_addresses file. But I donā€™t see any of my iBeacons being reported by UUID for some reason. I am running the iOS app eBeacon and it can see the beacons as normal, and I can configure them to display a specific name or UUID. But I donā€™t see them popping up in the activity reported by monitor.sh.

Iā€™m sure Iā€™m missing something pretty obvious but Iā€™m a newb on this stuff so I would really appreciate any pointers. Thanks again.

What do you mean by blank variables ? A space, nothing after a =, no rows entirely , nothing between commas, nothing between apostrophe. Can you please write it down.

The only one that gives less errors is

mqtt_user=" "

but the script is causing lots of problems in my mqtt server, I opened an issue in github

Has anyone started building a Hass.io addon for this?

like this:

mqtt_user: ""

@Craig_McGowan Iā€™m having difficulty duplicating this issue. Try stopping the service via sudo systemctl stop monitor and running via command line.

Like you say gives error

=================== DEBUG ======================
starting monitor.sh (v. 0.1.985)ā€¦

removing web request caches
removing public name cache
/home/openhabian/monitor/mqtt_preferences: line 11: mqtt_user::
command not found
/home/openhabian/monitor/mqtt_preferences: line 13: mqtt_passwo
rd:: command not found

Perhaps youā€™d better post your whole mqtt_preferences file.

I know this is your program, but shouldnā€™t it be

mqtt_user=''

No gives error

.

  GN

=. [x1
  GNU nano 2.7.4       File: mqtt_preferences

# ---------------------------
#                                                             $
# MOSQUITTO PREFERENCES
#                                                             $
# ---------------------------

# IP ADDRESS OR HOSTNAME OF MQTT BROKER
mqtt_address=192.168.1.16

# MQTT BROKER USERNAME (OR BLANK FOR NONE)
mqtt_user=''
# MQTT BROKER PASSWORD (OR BLANK FOR NONE)
mqtt_password=''

# MQTT PUBLISH TOPIC ROOT
mqtt_topicpath=monitor

# PUBLISHER IDENTITY
mqtt_publisher_identity='office_pi3'

# MQTT PORT
mqtt_port='1883'

# MQTT CERTIFICATE FILE (LEAVE BLANK IF NONE)
mqtt_certificate_path=''

#MQTT VERSION (LEAVE BLANK FOR DEFAULT; EXAMPLE: 'mqttv311')
mqtt_version=''


                       [ Read 30 lines ]
^G Get Help ^O Write Out^W Where Is ^K Cut Text ^J Justify
^X Exit     ^R Read File^\ Replace  ^U Uncut Tex^T To Spell

Thatā€™s on my hassio mosquitto log (it doesnā€™t stop until I stop the script)

92.168.1.238 on port 1883. 1549865767: Socket error on client <unknown>, disconnecting. 1549865767: New connection from 192.168.1.238 on port 1883. 1549865767: Socket error on client <unknown>, disconnecting. 1549865768: New connection from 192.168.1.238 on port 1883. 1549865768: Socket error on client