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

How do you git clone the beta? When I try it, it says it’s not a valid repository :frowning:

just run monitor normally and go to HASS and send a MQTT trigger

location/scan/UPDATEBETA

This will automatically update your instance

1 Like

Thanks :slight_smile: that seems to work :slight_smile:

Hmm nope it’s still at 0.1.622

I just bought one for testing, so I’ll get it working.

Oh you are on 0.1.622!!!

you need to do

git pull

and update to the latest stable which is 0.1.675

after this you can send the mqtt command to

location/scan/UPDATEBETA

Try this to upgrade to beta:

git fetch
git checkout beta
git pull
1 Like

git fetch git://github.com/andrewjfreyer/monitor/tree/beta
fatal: remote error:
andrewjfreyer/monitor/tree/beta is not a valid repository name
Email [email protected] for help

I’ve now upgraded to 0.1.675

but publishing to monitor/scan/UPDATEBETA doesn’t do anything monitor just repeats the mqtt message back to me

EDIT: ok thanks guys got it to work now, I was using an old version of my mqtt pref file :frowning: from when I was using presence :stuck_out_tongue: )

EDIT 2: my nut mini still comes up with confidence 0

{“id”:“D7:XX:XX:XX:6D:28”, “retained”:“false”, “version”:“0.1.707”, “confidence”:“0”,“name”:“Nut “,“timestamp”:“Sun Nov 04 2018 00:38:19 GMT+0000 (GMT)”,“manufacturer”:“Unknown”,“type”:“KNOWN_MAC”,“rssi”:””}

Does anybody schedule a reboot of their nodes? I have an issue that on occasion they can become unresponsive. I might add a cron job but wasn’t sure if their was a better way.

Thanks
ahh nope nothing at all. Could it be android 8?

1 Like

this is what I do. (modified from earlier)
When my door opens I tell it to cancel mqtt_depart script just in case is still running from the last time someone closed the door. Once the door closes this depart script runs. On the last line it restarts the service.

Restarting of the service seems to have kept mine up and running.

mqtt_depart:
  sequence:
  - delay: 00:00:10
  - data_template:
      topic: location/scan/depart
    service: mqtt.publish
  - delay: 00:00:20
  - data_template:
      topic: location/scan/depart
    service: mqtt.publish
  - delay: 00:00:30
  - data_template:
      topic: location/scan/depart
    service: mqtt.publish
  - delay: 00:00:40
  - data_template:
      topic: location/scan/depart
    service: mqtt.publish
  - delay: 00:00:50
  - data_template:
      topic: location/scan/depart
    service: mqtt.publish
  - delay: 00:00:60
  - data_template:
      topic: location/scan/restart
    service: mqtt.publish

If you really want an actual Reboot im sure @andrewjfreyer could easily add this OR you could modify Line 731 of Monitor.sh. (assuming you are on 0.1.675)

			#RESTART SYSTEM
			sudo reboot
2 Likes

I have the exact same implementation (created from hints in your previous comments, thanks again). Whats the longest you’ve been up and running without requiring a reboot? Since leaving them alone I estimate mine lock up around once a week. Being able to issue a reboot this way will allow me to add some logic to when it takes place.

As if you haven’t already done enough would you mind adding this @andrewjfreyer ? If its added your end I can keep on pulling future changes.

now that I think about it I had one that was getting HCI errors about two weeks ago so one of my values was Unavailable.

When it locks up does it show Unavailable ?

Im using android 8 and this doesn’t happen to me. Try to turn on discovery mode (even though you shouldnt have to) and see if you start getting the advertisements.

nope nothing at all… tried 2 android 8 phones and spare galaxy s5. Nothing for any of them. Going to install everything again on another Pi zero W. Thanks for all the help with this!

OK same issue on a new install. My phones do not advertise BLE by default. I installed an app called BLE tools and this can be used to start advertising, once I install this is works.

Strange that they don’t do it by default?

Now I get this in the logs when testing

> HCI Event: LE Meta Event (0x3e) plen 30
    LE Advertising Report
      ADV_IND - Connectable undirected advertising (0)
      bdaddr 5A:8E:F3:6A:22:6F (Random)
      Flags: 0x02
      Complete local name: 'Mark Phone'
      TX power level: 249
      RSSI: -45

When it locks up I cannot access via SSH in and any MQTT messages are ignored only fix is a hard reboot.

Hmm that’s interesting. I think that may be a first around here,. Maybe there is something in the developers settings you can take a look at.

Glad something is finally working for you. Hopefully it’s a setting that you can set and forget

Oh… That would be an issue :sweat_smile:
It sucks that you can’t ssh into it to take a look at some logs and see why it’s locking up.

You just Jinxed me!!!

I had one node that wasn’t working correctly but it ended up being the ChromeCast ethernet adapter that needed to be unplugged. Unfortunately I don’t think there is a way I can monitor for this.

Is there any chance this can run on the same Pi as Hassio? Buying other Pi devices isn’t as affordable for me. Or maybe a similar project running on an ESP32?