I did just that. Checked the home of the user in /etc/passwd, moved them there, chown. Still nothing... Must still be doing something wrong. We pick it up later. First I'll enjoy this great plugin. Thanks again!EscApe wrote: ↑Sunday 20 October 2019 22:11Happy to hear you got it working!Forget about all that. I figured out how to install sshpass in my alpine based container. Now working with username:pass. Works like a charm!
If you ever want to (re)try key based authentication I think you can just copy the key files you created as root to the .ssh folder in the abc home directory and change ownership... not sure though![]()
Python plugin: Presence detection from wireless router
Moderator: leecollings
-
- Posts: 5
- Joined: Monday 03 April 2017 12:53
- Target OS: NAS (Synology & others)
- Domoticz version: 4.11337
- Contact:
Re: Python plugin: Presence detection from wireless router
-
- Posts: 1
- Joined: Saturday 17 March 2018 1:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Hi escApe,
I have an Asus RT-AC66U-B1 and it is working like a charm!
Domoticz Version 4.10717(2019-05-09)
dzVents Version 2.4.19
Python Version 3.7.3(03-4-2019)
Great work!
Thank you!
I have an Asus RT-AC66U-B1 and it is working like a charm!
Domoticz Version 4.10717(2019-05-09)
dzVents Version 2.4.19
Python Version 3.7.3(03-4-2019)
Great work!
Thank you!

-
- Posts: 1
- Joined: Monday 04 November 2019 16:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
Hi all,
I just started a week ago with Domoticz (and Dashticz) and wanted to use iDetect to see who's home. I have an Experia Box V10 provided by my internet provider and I can't get it to work. The installation works fine, I manage to see three devices (all switches): Anyone, Override and phone1. They are all on "off" and I would have expected phone1 to be "on" when it's connected to the WLAN. What am I missing here?
I read on a (Dutch) forum (https://forum.kpn.com/internet-9/experi ... ren-429818) that the information on this router cannot be accessed in any other way but through the web interface. Could that be a problem? Any suggestions on how to make this work are very much welcome!
I just started a week ago with Domoticz (and Dashticz) and wanted to use iDetect to see who's home. I have an Experia Box V10 provided by my internet provider and I can't get it to work. The installation works fine, I manage to see three devices (all switches): Anyone, Override and phone1. They are all on "off" and I would have expected phone1 to be "on" when it's connected to the WLAN. What am I missing here?
I read on a (Dutch) forum (https://forum.kpn.com/internet-9/experi ... ren-429818) that the information on this router cannot be accessed in any other way but through the web interface. Could that be a problem? Any suggestions on how to make this work are very much welcome!
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Hoi Michel1508,
The plugin only supports querying the router through ssh. I have some ideas on making it more modular so other methods might be added. But to be honest, that would mean a massive rewrite and I don't have any need for that myself, so I'm spending most of my free time on other projects. No real plans for this rewrite in the near future.
Short answer: yesthis router cannot be accessed in any other way but through the web interface. Could that be a problem?
The plugin only supports querying the router through ssh. I have some ideas on making it more modular so other methods might be added. But to be honest, that would mean a massive rewrite and I don't have any need for that myself, so I'm spending most of my free time on other projects. No real plans for this rewrite in the near future.
-
- Posts: 5
- Joined: Saturday 27 April 2019 21:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
Do you have a picture of the modem? I have a ziggo modem too and would like to know if and how you made this work.bkram wrote: ↑Wednesday 27 June 2018 11:28 Hi,
Thanks for the plugin, I am using it with an Ziggo TP-Link Arcer C7 running Lede.
A request for the "Anyone" feature, I would like to blacklist some Wifi devices which are always online, so I can detect if there are any 'Guests' in the house.
Regards
bkram
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
ONLY FOR THE BRAVE !!
I have (almost) completely rewritten the plugin to be more modular, so others methods beside ssh can be added (in the future).
It's in the 'modular' branch on GitHub.
It all seems to work just fine and it should even work without changing the configuration for most users. However! It must be considered an early beta. Chances are you will run into bugs or it might not work for your router (yet). Adding specific router types that use ssh is very easy now, so that can be quickly corrected. Adding other polling methods, like http pages should also be relatively easy, as long as the code to query the http page is available.
Any help in testen en perfecting this version is greatly appreciated!
EDIT: You might have to pip3 install some additional python modules. Please check the imports or trial and error... I will document these before the final version, but am calling it a night for now
I have (almost) completely rewritten the plugin to be more modular, so others methods beside ssh can be added (in the future).
It's in the 'modular' branch on GitHub.
It all seems to work just fine and it should even work without changing the configuration for most users. However! It must be considered an early beta. Chances are you will run into bugs or it might not work for your router (yet). Adding specific router types that use ssh is very easy now, so that can be quickly corrected. Adding other polling methods, like http pages should also be relatively easy, as long as the code to query the http page is available.
Any help in testen en perfecting this version is greatly appreciated!
EDIT: You might have to pip3 install some additional python modules. Please check the imports or trial and error... I will document these before the final version, but am calling it a night for now

-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Things are moving along quickly with the (modular) beta version
I'm pretty excited about the new possibilities that this modular approach offers. Just added pinging as an option to monitor 'presence'. Not really the way a want to monitor the presence of wireless devices (will drain battery!), but it can be used to monitor other stuff, like: is my computer/router/tv etc online? In that case don't forget to add #ignore after the address, so it does not interfere with the 'Anyone home' status.
If someone still insist on using ping to monitor wireless devices .... now you can
This is now a valid configuration
:
The ping module will only activate if there are any ip addresses to monitor. You don't have to enable/disable it.
Keep in mind that this is still an early beta. Bugs are to be expected. I am running it on my live system without problems (using Asus router and auto detection)
The code still needs cleaning up and some stuff is hardcoded (like the ping interval: 30 seconds). Will see if I can make that configurable somehow.
I would have preferred to use threading timers to initiate the polling, but they don't work in the plugin framework. At least threading is working now, so that's great! SSH polling now runs in the background.
I would appreciate feedback on this beta version. Especially on performance in more complicated setups. I just have one router to poll and that does not seem te impact performance at all.
I'm pretty excited about the new possibilities that this modular approach offers. Just added pinging as an option to monitor 'presence'. Not really the way a want to monitor the presence of wireless devices (will drain battery!), but it can be used to monitor other stuff, like: is my computer/router/tv etc online? In that case don't forget to add #ignore after the address, so it does not interfere with the 'Anyone home' status.
If someone still insist on using ping to monitor wireless devices .... now you can

This is now a valid configuration

Code: Select all
phone=44:cc:22:12:32:E2, phone2=21:33:e2:03:02:63, tv=192.168.1.11#ignore
Keep in mind that this is still an early beta. Bugs are to be expected. I am running it on my live system without problems (using Asus router and auto detection)
The code still needs cleaning up and some stuff is hardcoded (like the ping interval: 30 seconds). Will see if I can make that configurable somehow.
I would have preferred to use threading timers to initiate the polling, but they don't work in the plugin framework. At least threading is working now, so that's great! SSH polling now runs in the background.
I would appreciate feedback on this beta version. Especially on performance in more complicated setups. I just have one router to poll and that does not seem te impact performance at all.
Re: Python plugin: Presence detection from wireless router
Hi, how can I install the modular version?
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Remove the old version first and then:
If you don't use/have git then download it as a zip from GitHub and place the files and folder manually in the domoticz/pliugins/Presence directory.
Code: Select all
cd /home/pi/domoticz/plugins (or wherever you plugins directory resides)
git clone -b modular https://github.com/d-EScape/Domoticz_iDetect.git Presence
-
- Posts: 13
- Joined: Wednesday 21 November 2018 19:57
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
Hi,
I have Tplink Archer C9 and not have ssh. So I can't use this plugin?
I have Tplink Archer C9 and not have ssh. So I can't use this plugin?
-
- Posts: 68
- Joined: Sunday 10 June 2018 16:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
Hi,
I've had the plugin running for 'ages' but yesterday I did a router firmware update but since then I get this error.
SSH is enabled in my router.
Not sure what to do since it was sooo long ago I installed it.
I've had the plugin running for 'ages' but yesterday I did a router firmware update but since then I get this error.
Code: Select all
2019-11-13 19:05:31.503 (iDetect) SSH subprocess for 192.168.3.1 failed with error (255):b''
2019-11-13 19:05:31.503 (iDetect) SSH command on 192.168.3.1 took 132 milliseconds.
2019-11-13 19:05:31.503 (iDetect) Could not retreive available commands on 192.168.3.1
Not sure what to do since it was sooo long ago I installed it.
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Try to ssh login to your router from the commandline under the user name that is running Domoticz... Router keys probably changed. The (error)message on the cli will explain what to do.
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
The modular (beta) version just got even better. Lots of new settings to tweak individual trackers (eg. routers) and tags (eg. phones), while limiting the amount of breaking changes (for existing configurations).
Also added preliminary documentation on GitHub explaining the new features and settings.
Also added preliminary documentation on GitHub explaining the new features and settings.
-
- Posts: 68
- Joined: Sunday 10 June 2018 16:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
Hi,
Presence detection is working on my asus ac68u on my normal network but when I go with my cell on the guest network it doens't detect my phone.
Is there anyone with a solution?
Presence detection is working on my asus ac68u on my normal network but when I go with my cell on the guest network it doens't detect my phone.
Is there anyone with a solution?
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Important announcement for 2.0 beta users:
The upcoming version will use Paramiko (native python ssh client) instead of calling the linux ssh client. I finally figured out why Paramiko and threading timers would crash Domoticz when the plugin was stopped, so I am incorporating both.
You will need to pip3 install paramiko
Your private ssh key file needs to be RSA compliant. Paramiko wilt tell you 'not a valid RSA private key' if it isn't. You can convert an existing key using Another way to check: If the header of ~/.ssh/id_rsa says something with OPENSSH it will need conversion.
I expect to push the next version in 1-2 days, if it proofs reliable in my test setup.
The upcoming version will use Paramiko (native python ssh client) instead of calling the linux ssh client. I finally figured out why Paramiko and threading timers would crash Domoticz when the plugin was stopped, so I am incorporating both.
You will need to pip3 install paramiko
Your private ssh key file needs to be RSA compliant. Paramiko wilt tell you 'not a valid RSA private key' if it isn't. You can convert an existing key using
Code: Select all
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa
I expect to push the next version in 1-2 days, if it proofs reliable in my test setup.
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
@drwurn
It seems the guest network on an Asus router is named 'wl1.0' (wl1.1 etc). The plugin would only auto detect interfaces starting with 'eth' or 'wlan'. I added these interfaces to the auto detection in the upcoming 2.0 beta version, which I will probably commit tomorrow.Presence detection is working on my asus ac68u on my normal network but when I go with my cell on the guest network it doens't detect my phone.
Is there anyone with a solution?
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
I just pushed the latest beta (2.0) to GitHub. Important changes:
- uses Paramiko as native python ssh client (install paramiko before starting the plugin)
- the plugin now supports Windows(!)
- uses timers instead of the plugins heartbeat for the poll interval
- uses Paramiko as native python ssh client (install paramiko before starting the plugin)
- the plugin now supports Windows(!)
- uses timers instead of the plugins heartbeat for the poll interval
-
- Posts: 68
- Joined: Sunday 10 June 2018 16:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
When will the stable version be online?It seems the guest network on an Asus router is named 'wl1.0' (wl1.1 etc). The plugin would only auto detect interfaces starting with 'eth' or 'wlan'. I added these interfaces to the auto detection in the upcoming 2.0 beta version, which I will probably commit tomorrow.
-
- Posts: 535
- Joined: Thursday 02 April 2015 8:46
- Target OS: Linux
- Domoticz version: 2020+
- Location: The Netherlands
- Contact:
Re: Python plugin: Presence detection from wireless router
Getting feed back from some beta testers would speed things up.When will the stable version be online?
I have recently added a timeout to the ssh session, because the plugin would sometimes just stop polling. That seems to be fixed now... At least in my single Asus router setup. Would love to hear how it performs in more complex setups and with other routers before calling it stable.
-
- Posts: 170
- Joined: Monday 22 January 2018 21:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Presence detection from wireless router
I will certainly test it when I have some spare-time, I'm interested in this plugin. I have an Orbi router, so could be more complex...
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
Zwave, Zigate, RFlink etc.
Who is online
Users browsing this forum: No registered users and 1 guest