Question about using "monitor"

I am using monitor for presence detection and hope someone can support here. I got the sensor running and it show my device 100% available or 0%. SO that is ok.

But what I struggle with is using the scan/depart or arrival thing. It is not triggering what i see. I tried from HA developer console to trigger

service: mqtt.publish
topic: "monitor/raspberrypi/scan/depart"

where raspberry is the device running the app.

Another thing that is unclear for me, how is the creator using it for different floor to decide if someone is there. Is that only checking 0% or 100% or can it also check if someone is on that floor or on another floor?

Any suggestions or some infos missing?

That topic is wrong, as explained here it’s just monitor/scan/depart (or monitor/scan/arrive). Here’s a snippet of my working depart script:

  - service: mqtt.publish
    data:
      topic: monitor/scan/depart
      payload: ''

But If I use it like this how does MQTT know where to send it? I do not see where to config the server with monitor to send the depart/arrive thing to.

Should it trigger immediately an update or does that update take some seconds? Because when I run it like you nothing happens short after I send this.

MQTT doesn’t send it anywhere

  1. You configure monitor to talk to your MQTT broker
  2. You configure Home Assistant to talk to the same MQTT broker

Both know which topics they want to listen to - that’s how MQTT works.

If you’ve configured things correctly, you should see monitor logging that it’s started a scan (if the log level on monitor is high enough).

There is a thread on monitor and it may be that your answers are already in there. If not posting there will get many more eyes on your question.

1 Like

@Tinkerer is correct. The only reason you would use a path like monitor/raspberrypi/scan/depart would be if you specifically set monitor/raspberrypi as your mqtt_topicpath in your mqtt_preferences file.