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.
OpenWRT presence detection
Moderator: leecollings
-
- 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
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
-
- 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
Excellent thanks.Egregius wrote: ↑Monday 20 November 2023 7:31 https://superuser.com/questions/134901/ ... p-and-sftp![]()
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 &
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
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: OpenWRT presence detection
There are only one parameter: the MQTT broker. This has to be replaced to 192.168.1.2 which is the example.solarboy wrote: ↑Monday 20 November 2023 20:25Or should that be the IP of my Openwrt router ? If so, where do I add the IP of my MQTT broker ?Code: Select all
nohup /usr/bin/presence_report 192.168.1.2 >/dev/null 2>&1 &
Who is online
Users browsing this forum: No registered users and 1 guest