OpenWRT presence detection

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
lwolf
Posts: 216
Joined: Saturday 10 November 2018 18:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Hungary
Contact:

OpenWRT presence detection

Post 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.
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: OpenWRT presence detection

Post by solarboy »

This looks good, any idea what SCP is ?
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: OpenWRT presence detection

Post by Egregius »

solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: OpenWRT presence detection

Post 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 ?
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
lwolf
Posts: 216
Joined: Saturday 10 November 2018 18:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Hungary
Contact:

Re: OpenWRT presence detection

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest