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

automation
mqtt
Tags: #<Tag:0x00007fd07678e710> #<Tag:0x00007fd07678e508>

#607

I am using a similar script, and have it setup to trigger on state change of my Garage or Front door,

- alias: Monitor MQTT Departure
  trigger:
  - entity_id: binary_sensor.door_window_sensor_158d00027b3daa
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: binary_sensor.door_window_sensor_158d000239432d
    from: 'off'
    platform: state
    to: 'on'
  action:
  - data: {}
    service: script.mqtt_depart

#608

cool thank you… obviously really. what about the script please? does it contain “service: mqtt.publish”

As Ben’s doesn’t appear to? or maybe I am having an old man minute?


#609

Nope that’s all you need, mine is the same, just different timings :smiley:


#610

so how does it cancel the depart script before it runs please?


#611

Sorry you lost me there, cancel the depart script before it runs ?

You want the depart script to run when you open the door. If you are going away, it will detect your phone as not here, if you just open the door to greet someone, you will still be there, so the depart script wont return a 0 value.


#612

ah just something that was said in another post not by you :slight_smile:


#613

Yeah, but you can’t buy 7 of them. They limit them at one per customer.


#614

Who does??


#615

In my region, the barebones Pi Zeros are indeed limited to one per customer, but bundles with cases, psus etc do not have any limits.


#616

Hi Guys! I want the monitor service call depart scan periodically (like a cron each 1 minute for example). Seems from everything that I read, I need to start it with flags monitor.sh -r -a -x. I already did it, and also subscribe to appropriate topic in node-red. But I see from logs that messages publishing not so often. I have some other solution (can actually publish scan command from my node red server each minute, or from HA), but I think would be better use this feature in monitor. So, does anybody know how to do that?)


#617

But then, it’s no longer cheap. which mean you are better of with ESP32s.


#618

Monitor is a bash script running on linux. Porting to esp32 will not be as simple as just running it on a different platform.

If you build it for esp32 then people will love you, but I think it is unlikely to just appear without a knowledgable enthusiast stepping in.


#619

@andrewjfreyer regarding this:

an mqtt message is sent to Home Assistant reporting that the scanned phone is “home” with a confidence of 100%. In addition, an mqtt message is sent to the second and third floor to trigger a scan on those floors as well.

Is the MQTT message that triggers the others to scan an internal setting in Monitor or is an automation via Node red or Hassio?


#620

How exactly do you set the flag?

Is it this setting?

#AMOUNT AN RSSI MUST CHANGE (ABSOLUTE VALUE) TO REPORT BEACON AGAIN
PREF_RSSI_CHANGE_THRESHOLD=5

#621

I have been monitoring some Nut 3 tiles for awhile with this excellent script and decided to extend this to some other items I would like to track. I have some Tile and generic beacons which require to be synced to an app first. I know there is a Tile component but it isn’t what I’m looking for. I can put the beacons into pair mode and “Monitor” can see them but the beacons go to sleep after that and always show “0”. Does anyone know if there is a way to have these beacons periodically probe like the Nut 3 ones do? Just want to know if my items are home or not not actually track their actual whereabouts.

Solved Nevermind they do this until they have actually been paired with a device


#622

I allways get a empty rssi ("rssi":"") from my phone, my wifes phone and the tv im tracking.
Is there any flag i need to set, or is the rssi only for some devices?
I would like to get my rssi into grafana to be able to compare some curves over a longer time.


#623

I got a CC2640 today, but confidence stays on 0 in monitor with -b and the mac-address in known_beacon_addresses. Have you succeeded ?


#624

Yeah I’m using the beta and apart from occasional restart needed it works great.


#625

Interesting, and you have it in known_beacon_addresses ? Perhaps the CC2640 I have is flashed differently than yours. I purchased one on AliExpress that I believe you linked to earlier.


#626

yes, i have the beacon address added to known_beacons_addresses.
Ibought from that exact seller/listing but it is possible something changed and they shipped different devices.
can you seee the beacon in nrf explorer and hcidump lescan ?