Since i was not happy with the available presence detection scripts which are worked not very well with iPhone. I made a presence detection script using the TR-064 protocol of my Fritzbox router and get direct information of the router itself.
This saves battery of your smartphone because there is no need of pinging all the time and its more accurate, because the router is made for having the correct information about network devices.
This script is tested with a fritzbox 7581 router but should be working with more routers who has a tr064 protocol implementation.
install script newest version 2.4:
Code: Select all
git clone https://github.com/hydex80/presence_detection_domoticz_fritzbox.git
Old version 2.3 can be downloaded here:
Code: Select all
git clone -b version-2.3 https://github.com/hydex80/presence_detection_domoticz_fritzbox
https://www.domoticz.com/wiki/Presence_ ... ox_router)
FAQ en readme:
https://github.com/hydex80/presence_det ... /README.md
Changed 2.4 18 dec 2020
- Now support for multiple repeaters (as many as you want

- Install script is updated. More checks and a little help by showing the default gateway.
- Config.txt is totally rewritten. Sorry if you update to this version you have to reinstall. Tip: Make a print screen of your old config.txt. You can leave the domoticz settings as is. In the script you can choose to set manually set the settings for the devices. If you want a fresh install? Remove the old devices from domoticz first before you start the script.
- delay time added. Can be set inside the script file. Change only if for some reason your FritzBox is replying slower then the default 2 seconds
Changed 2.3 26 juli 2019
1.Added lightning protection (thnx to allesvanzelf for supporting and added these lines)
2.Some text changes.
Changed 2.2 - 16 march 2019:
1.Check if dependencies are installed is now fixed.
2.Updated FAQ: https://github.com/hydex80/presence_det ... /README.md
Changed 2.0 - 23 februari 2019:
1. Easy installer. Now there is no need to edit script files
2. Add a lot of checks to make the script more reliable.
3. Its now possible to add as many devices as you want.
Changed 1.04 - 4 februari 2019:
1.Devices are now targeted with Mac adresses instead of ipadresses > more reliable and faster.
2.If you don't have a repeater, leave the ip adress of the host_repeater empty. The script will ignore repeater settings.
3.There was a bug , sometimes devices where not updated, its now fixed.
Changed 1.0:
1. Extra checks on availability of fritzhost and / or repeater
2. some nice colors for readability.