Page 7 of 7
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 04 December 2020 22:46
by TeamKleijn
Hello all,
At first i had some problems with the script from Funky, so i've roll it back to the standard presence within domoticz.
But there is still developing power i'll see here.
At the moment my FritzBox network is expanded with three repeaters two 1750II and one 1300.
is it possible to install it again and made a succesfull solution ?
"Team Kleijn"
Rob
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 04 December 2020 23:03
by funky
Hi Rob
Currently the script only works with one repeater At the end of dec I will take a some time to make it work with more repeaters.
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 04 December 2020 23:51
by TeamKleijn
Ok, i'll wait for your new release and i'll test it again, thanks a lot funky, i believe it's more better and secure then the inbuild Domoticz one (based on Pinging the devices)
Met vriendelijke groeten,
"Team Kleijn"
Rob
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 18 December 2020 14:59
by funky
Good news a new version of the presence detection has been released.
Release notes version 2.4:
- 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.sys. 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
I've also updated the readme. Some of you are complaining about that there are differences between the status of the script vs the status in fritz.box. For some reasons there is sometimes a delay it can take up to 30 seconds before the script gets the good information of the fritz devices. Therefore you have to set in the crontab to run the script every minute.
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Tuesday 22 December 2020 11:14
by Kubra
Good news a new version of the presence detection has been released.
Good news indeed! Thanks in advance.
I will install and test it during X-Mas holidays. But I assume there will be not much difficulties. If so, I'll let you know.
For now, happy X-Mas etc...
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Tuesday 22 December 2020 11:46
by funky
Thanx happy Xmas to all

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 25 December 2020 13:44
by funky
Hey kubra
I tried to send you a personal message but I cannot send you a PM, because you have disabled private messages in your profile. Can you enable it?
In the meantime if you want back to version 2.3 you can do so with
Code: Select all
git clone -b version-2.3 https://github.com/hydex80/presence_detection_domoticz_fritzbox
plz let me know if that fixed the issue. And it would be nice if you send me the complete debug file. Maybe there is an issue with the config.txt.
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 25 December 2020 14:23
by Kubra
Was ment to be a PM

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Friday 25 December 2020 15:08
by Kubra
For Synology users, who also want to try out this script on their NAS, it goes like this. Please note, in terms of settings, this depends on how your NAS is set up. With regard to the brief instruction given below, I also assume that some basic knowledge is present.
1. Create a directory (eg "presence_detection" in @appstore)
2. Place the 4 files from the downloaded zip file in the previously created folder
3. DO NOT execute the command "sudo bash presence_detection.sh" (with or without "install" supplemented), but ...
4.Create a config.txt file with the following content (leave out help text after #) in the folder and adjust it to your situation:
5. pass_fritzbox = xxxxxxx # enter the password of your fritzbox here
fritzdevice_names = (fritz_device1 fritz_device2) #in parentheses here number of repeaters, in my case 2)
fritzdevice_ips = (XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX) #Enter ip addresses of your repeaters
ip_domoticz = xxx.xxx.xxx.xx: xxxx #ip address of domoticz + port
domoticzpasscode = xxxxxxxxxxxxxx #eg. pwd domoticz
device_names = (phone_1 etc.) # create manually the virtual devices in domoticz as described on git
device_macs = (XX: XX: XX: XX: XX: XX etc.) # the corresponding mac addresses of the devices above
device_idx = (XXX etc.) # and enter the idx of the devices here
6. You can now run the script in debug once (eg in Putty using "sudo bash presence_detection.sh debug" to check if it works properly. If so, go to the next step to make it run automatically.
7. Create a task on your Synology to run the script every minute. Job to be executed ("Job settings" tab) becomes
"sh /volume1/@appstore/presence_detection/presence_detection.sh" (path name to the script depends on your situation)
I myself use "notifications" in Domoticz and receive notifications on my smartphone. Useful.
So far and good luck with it. Questions? Ask them and hopefully I can make a difference.
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Saturday 26 December 2020 16:19
by wouterbr
I'm trying the script but get presence_detection.sh: line 294: /usr/bin/curl: Permission denied
There is a problem retrieving information of domoticz, Restart install script and check domoticz ip settings or check if domoticz is offline
What canI do now?
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Saturday 26 December 2020 16:25
by wouterbr
I'm trying the script but get presence_detection.sh: line 294: /usr/bin/curl: Permission denied
There is a problem retrieving information of domoticz, Restart install script and check domoticz ip settings or check if domoticz is offline
What canI do now?
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Saturday 26 December 2020 16:34
by funky
wouterbr wrote: ↑Saturday 26 December 2020 16:25
I'm trying the script but get presence_detection.sh: line 294: /usr/bin/curl: Permission denied
There is a problem retrieving information of domoticz, Restart install script and check domoticz ip settings or check if domoticz is offline
What canI do now?
You have a permission problem.
Login as root or admin on your linux and run the script with sudo
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Tuesday 18 March 2025 17:36
by geschriever
Hi All,
I made some changes so the script is working again on the latest versions of Domoticz.
Due to a change the information retrieved from Domoticz was not available anymore.
By changing the command to the latest syntax the script is working again.
It does support Python3 and retrieve the status of devices in Domoticz now correctly.
To support python3 also the libraries should be updated with: python3-lxml and python3-requests
Have fun with it!
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Wednesday 19 March 2025 6:16
by funky
Nice!! Good to see that stil people using this script Although im not working on it. (Dont have domoticz anymore) If you made a pull request on github i can merge your code.
Other option. Make a fork and i will change The start post.
Send me a pm.
Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router
Posted: Saturday 22 March 2025 14:21
by MartjeB
Never had this installed, but I can't get it to work.
Traceback (most recent call last):
File "/home/pi/domoticz/scripts/presence_detection_domoticz_fritzbox/fritzhosts.py", line 25, in <module>
import fritzconnection
File "/home/pi/domoticz/scripts/presence_detection_domoticz_fritzbox/fritzconnection.py", line 36, in <module>
import requests
ImportError: No module named requests