Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

All kinds of 'OS' scripts

Moderator: leecollings

TeamKleijn
Posts: 12
Joined: Sunday 05 January 2020 13:03
Target OS: -
Domoticz version:
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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
funky
Posts: 74
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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.
TeamKleijn
Posts: 12
Joined: Sunday 05 January 2020 13:03
Target OS: -
Domoticz version:
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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
funky
Posts: 74
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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.
Kubra
Posts: 22
Joined: Wednesday 01 April 2015 22:06
Target OS: NAS (Synology & others)
Domoticz version: latest
Location: Hollanda
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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...
funky
Posts: 74
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post by funky »

Thanx happy Xmas to all 😀
funky
Posts: 74
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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.
Kubra
Posts: 22
Joined: Wednesday 01 April 2015 22:06
Target OS: NAS (Synology & others)
Domoticz version: latest
Location: Hollanda
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post by Kubra »

Was ment to be a PM :lol:
Last edited by Kubra on Friday 25 December 2020 16:24, edited 2 times in total.
Kubra
Posts: 22
Joined: Wednesday 01 April 2015 22:06
Target OS: NAS (Synology & others)
Domoticz version: latest
Location: Hollanda
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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.
wouterbr
Posts: 3
Joined: Monday 24 September 2018 22:50
Target OS: OS X
Domoticz version:
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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?
wouterbr
Posts: 3
Joined: Monday 24 September 2018 22:50
Target OS: OS X
Domoticz version:
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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?
funky
Posts: 74
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

Re: Presence detection for Fritzbox script v2.0: using TR064 protocol communication to your router

Post 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

Code: Select all

sudo bash presence_detection.sh
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests