Page 1 of 1

OpenWRT presence detection

Posted: Thursday 16 November 2023 19:49
by lwolf
There is an OpenWRT presence detection script on github:
https://github.com/dersimn/owrtwifi2mqtt/

In case anyone needs similar functions i have modified the above to be MQTT Autodiscovery compatible:
https://github.com/enesbcs/owrtwifi2mqtt

Its a script which has to be uploaded to an OpenWRT router and to be setup to start automatically.
The script reports by MQTT if a wireless device connects/disconnects, and also sends an autodiscovery config object to register a binary_sensor.

Re: OpenWRT presence detection

Posted: Sunday 19 November 2023 23:10
by solarboy
This looks good, any idea what SCP is ?

Re: OpenWRT presence detection

Posted: Monday 20 November 2023 7:31
by Egregius

Re: OpenWRT presence detection

Posted: Monday 20 November 2023 20:25
by solarboy
Excellent thanks.

Do I change the IP here to that of my existing MQTT broker ?

Code: Select all

nohup /usr/bin/presence_report 192.168.1.2 >/dev/null 2>&1 &
Or should that be the IP of my Openwrt router ? If so, where do I add the IP of my MQTT broker ?

Re: OpenWRT presence detection

Posted: Tuesday 21 November 2023 15:03
by lwolf
solarboy wrote: Monday 20 November 2023 20:25

Code: Select all

nohup /usr/bin/presence_report 192.168.1.2 >/dev/null 2>&1 &
Or should that be the IP of my Openwrt router ? If so, where do I add the IP of my MQTT broker ?
There are only one parameter: the MQTT broker. This has to be replaced to 192.168.1.2 which is the example.