Python plugin: Presence detection from wireless router

Python and python framework

Moderator: leecollings

EscApe
Posts: 528
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

Post by EscApe »

MrRikkie wrote: Sunday 15 January 2023 14:17 I'm trying to install iDetect Python plugin however already in the first command i get stuck.

sudo pip3 install requests paramiko

<snip>

Does anybody have an idea how to solve this ?
Hi @MrRikkie,

Please excuse the late response. The forum somehow stopped notifying me about new messages.
Where you able to solve it?

If I remember correctly I solved the same error message in my docker installation by installing python3-cryptography (sudo apt install python3-cryptography) before installing the paramiko python module. Just another way to satisfy the requirements for paramiko, but this way worked for me.
Last edited by EscApe on Monday 20 March 2023 19:57, edited 1 time in total.
EscApe
Posts: 528
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

Post by EscApe »

hestia wrote: Monday 27 February 2023 15:36 Hi,
new install on a new env RPI bullseye
Domoticz Version: 2023.1 (build 15098)
Build Hash: 867c4e8fa
Compile Date: 2023-02-24 07:56:50
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
When dz restart, I've got those errors
Spoiler: show
2023-02-27 00:13:23.920 ePresence: Worker thread started.
2023-02-27 00:13:32.748 Error: ePresence: wapchambre ====> SSH Could not connect (using password). Exception: No existing session
2023-02-27 00:13:42.701 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:13:47.227 ePresence: wapsalon Could not be polled
2023-02-27 00:13:47.227 Status: ePresence: wapsalon ====> SSH resetting connection
2023-02-27 00:13:47.226 Error: ePresence: wapsalon ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:13:52.794 ePresence: wapstudio Could not be polled
2023-02-27 00:13:52.794 Status: ePresence: wapstudio ====> SSH resetting connection
2023-02-27 00:13:52.792 Error: ePresence: wapstudio ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:13:57.702 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:14:02.352 Status: ePresence: wapsalon ====> SSH connection established
2023-02-27 00:14:07.922 Status: ePresence: wapstudio ====> SSH connection established
2023-02-27 00:14:12.703 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:14:22.427 ePresence: wapsalon Could not be polled
2023-02-27 00:14:22.427 Status: ePresence: wapsalon ====> SSH resetting connection
2023-02-27 00:14:22.427 Error: ePresence: wapsalon ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:14:27.708 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:14:27.986 ePresence: wapstudio Could not be polled
2023-02-27 00:14:27.985 Status: ePresence: wapstudio ====> SSH resetting connection
2023-02-27 00:14:27.983 Error: ePresence: wapstudio ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:14:37.554 Status: ePresence: wapsalon ====> SSH connection established
2023-02-27 00:14:42.709 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:14:43.114 Status: ePresence: wapstudio ====> SSH connection established
2023-02-27 00:14:57.660 ePresence: wapsalon Could not be polled
2023-02-27 00:14:57.710 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:14:57.660 Status: ePresence: wapsalon ====> SSH resetting connection
2023-02-27 00:14:57.659 Error: ePresence: wapsalon ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:15:03.165 ePresence: wapstudio Could not be polled
2023-02-27 00:15:03.165 Status: ePresence: wapstudio ====> SSH resetting connection
2023-02-27 00:15:03.164 Error: ePresence: wapstudio ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:15:12.711 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:15:12.785 Status: ePresence: wapsalon ====> SSH connection established
2023-02-27 00:15:18.295 Status: ePresence: wapstudio ====> SSH connection established
2023-02-27 00:15:27.713 ePresence: wapchambre Not (yet) ready for polling
2023-02-27 00:15:32.827 ePresence: wapsalon Could not be polled
2023-02-27 00:15:32.827 Status: ePresence: wapsalon ====> SSH resetting connection
2023-02-27 00:15:32.826 Error: ePresence: wapsalon ====> SSH failed with exception: Timeout opening channel.
2023-02-27 00:15:38.360 ePresence: wapstudio Could not be polled
2023-02-27 00:15:38.360 Status: ePresence: wapstudio ====> SSH resetting connection
I disable and enable the pluging and after it's ok
Spoiler: show
2023-02-27 00:15:48.714 Status: ePresence: Stop directive received.
2023-02-27 00:15:48.908 Status: ePresence: Exiting work loop.
2023-02-27 00:15:48.914 Status: ePresence: Stopping threads.
2023-02-27 00:15:48.914 Status: ePresence: Stopped.
2023-02-27 00:15:57.779 ePresence: Worker thread started.
2023-02-27 00:15:57.779 Status: ePresence: Entering work loop.
2023-02-27 00:15:57.779 Status: ePresence: Started.
2023-02-27 00:15:57.941 Status: ePresence: Initialized version 2.1, author 'ESCape'
2023-02-27 00:15:59.268 Status: ePresence: Starting tracker:wapsalon, user:admin, class:ssh_autodetect and poll interval:15
2023-02-27 00:15:59.394 Status: ePresence: wapsalon ====> SSH connection established
2023-02-27 00:15:59.514 Status: ePresence: Starting tracker:wapchambre, user:admin, class:ssh_autodetect and poll interval:15
2023-02-27 00:15:59.748 Status: ePresence: wapchambre ====> SSH connection established
2023-02-27 00:15:59.902 Status: ePresence: Starting tracker:wapstudio, user:admin, class:ssh_autodetect and poll interval:15
2023-02-27 00:16:00.025 Status: ePresence: wapstudio ====> SSH connection established
Some config
Screenshot 2023-02-27 153232.jpgScreenshot 2023-02-27 153249.jpg
Any idea to make it work?
Do I understand correctly that the plugin does not work when dzvents is enabled?
Im not using dzVents but when I enable it on Domoticz 2023.1 I can still run the plugin. Using python version 3.7.3.

Sorry I can't offer any real insights.
EscApe
Posts: 528
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

Post by EscApe »

DeKraker wrote: Sunday 12 March 2023 12:36 <snip>
Do I miss something or am I doing anything wrong?

Many thanks for any help!
I really can't tell from just this information. Please include a debug log from the moment the plugin starts until the first poll attempt.
EscApe
Posts: 528
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

Post by EscApe »

hestia wrote: Sunday 19 March 2023 17:28 <snip>
I still have the same issue :-(
SSH Could not connect (using password). Exception: No existing session
I need to disable the hardware and enable it again, and restart dz.
Some compatibility issue with ZigBeeForDonomoticZ: when I disable ZigBeeForDomoticZ, no issue
I have seen python plugins interfere before but my knowledge of the plugin framework is insufficient to solve these kind of problems. Maybe someone else can offer some insights?

Using zigbee2mqtt with MQTT auto-discovery in Domoticz myself.
EscApe
Posts: 528
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

Post by EscApe »

pipiche wrote: Monday 20 March 2023 17:07 Hello,

I'm trying to use iDetect with an Orbi system , but so far it is hardly failing. Would appreciate any help

<snip>
Maybe the login is failing. Might be a change in the Orbi interface. Can you share the debug log of the plugin starting (and initializing the Ordi session)?

In your message on GitHub you said "Ok. I did post an issue on the forum, so I'll wait for that and work with my hack in beween". Can you share your 'hack'? It might give some indication on what's going wrong.
EscApe
Posts: 528
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

Post by EscApe »

Kubra wrote: Saturday 01 October 2022 15:10 I have been using and testing this plugin for about 4 weeks now and must say that it works flawless so far. Not a single on/off event is missed. I had been using the presence detection script from Hydex80 the last 3 years or so but it wasn't performing that good. Lot of events where missed. So recently made a choice to look for a better and more consistent solution.

So I would thank you EscApe for your excellent plugin and keep up the good work. Greetings from a happy user. 8-)
Thank you Kubra. Glad it is working for you!
(the forum was no longer notifying me on new messages, so I just saw jour post)
EscApe
Posts: 528
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

Post by EscApe »

pipiche wrote: Monday 20 March 2023 17:07 Hello,
I'm trying to use iDetect with an Orbi system , but so far it is hardly failing. Would appreciate any help
<snip>
I had to build a test setup over vpn yesterday, because the Orby I am trying this on is at my parents home. But I might have found something.

1. You have to specify a port number (#type=orbi-http&port=443), because the hardcoded 443 does not work as expected (will probably fix this in a future release)
2. Make sure you are not logged onto the management interface of the orbi from any other pc! This is important. As it turns out the Orby will only allow one http login session at a time.

Tested succesfully on a Orbi rbk50
DeKraker
Posts: 7
Joined: Tuesday 03 April 2018 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Python plugin: Presence detection from wireless router

Post by DeKraker »

EscApe wrote: Monday 20 March 2023 19:38
DeKraker wrote: Sunday 12 March 2023 12:36 <snip>
Do I miss something or am I doing anything wrong?

Many thanks for any help!
I really can't tell from just this information. Please include a debug log from the moment the plugin starts until the first poll attempt.
I have got some results when I specified the tracker as followed. '192.168.11.1:433#type=orbi-http'.
Below the log. Connected devices are not yet picked up as being 'at home'.

Any help is much appreciated ;-)

Code: Select all


2023-03-21 16:34:05.251 Home detection: 192.168.11.1 Timed poll starting like clockwork
2023-03-21 16:34:05.563 Home detection: 192.168.11.1 Returned: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2023-03-21 16:34:05.563 <html>
2023-03-21 16:34:05.563 <head>
2023-03-21 16:34:05.563 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2023-03-21 16:34:05.563 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
2023-03-21 16:34:05.563 <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
2023-03-21 16:34:05.563 <meta name="title" content="NETGEAR">
2023-03-21 16:34:05.563 <link type="image/vnd.microsoft.icon" rel="icon" href="images/favicon.ico" />
2023-03-21 16:34:05.563 <link type="image/x-icon" rel="shortcut icon" href="images/favicon.ico" />
2023-03-21 16:34:05.563 <script language="javascript" type="text/javascript" src="language/Dutch.js"></script>
2023-03-21 16:34:05.563 <script language="javascript" type="text/javascript" src="language/RU_flow_en.js"></script>
2023-03-21 16:34:05.563 <script>var LG_region="Dutch";</script>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <script language=javascript type=text/javascript src=/jquery-1.7.2.min.js></script>
2023-03-21 16:34:05.563 <script language=javascript type=text/javascript src=/jquery.base64.min.js></script>
2023-03-21 16:34:05.563 <link href="css/login-styles.css" rel="stylesheet">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </head>
2023-03-21 16:34:05.563 <body>
2023-03-21 16:34:05.563 <form>
2023-03-21 16:34:05.563 <script>
2023-03-21 16:34:05.563 var ts = "087146572256";
2023-03-21 16:34:05.563 function isValidChar_space(each_char)
2023-03-21 16:34:05.563 {
2023-03-21 16:34:05.563 if( each_char < 32 || each_char > 127)
2023-03-21 16:34:05.563 return false;
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 function check_fail()
2023-03-21 16:34:05.563 {
2023-03-21 16:34:05.563 document.getElementById("failmsg").style.display="";
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 function ajax_post(input,success_cb, error_cb, ts, htm){
2023-03-21 16:34:05.563 var data = input || {};
2023-03-21 16:34:05.563 $.ajax({
2023-03-21 16:34:05.563 url: "/apply.cgi?"+(htm||'')+" timestamp=" + ts,
2023-03-21 16:34:05.563 type: "POST",
2023-03-21 16:34:05.563 data: data,
2023-03-21 16:34:05.563 dataType: 'text',
2023-03-21 16:34:05.563 contentType: "application/json; charset=utf-8",
2023-03-21 16:34:05.563 success: function (output) {
2023-03-21 16:34:05.563 console.log('success!');
2023-03-21 16:34:05.563 if( typeof success_cb === "function" ) {
2023-03-21 16:34:05.563 success_cb(output);
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563 },
2023-03-21 16:34:05.563 error: function (err) {
2023-03-21 16:34:05.563 console.log('error!');
2023-03-21 16:34:05.563 if( typeof error_cb === "function" ) {
2023-03-21 16:34:05.563 error_cb(err);
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563 });
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 function checklogin(cf)
2023-03-21 16:34:05.563 {
2023-03-21 16:34:05.563 ajax_post({"submit_flag": "admin_login","username":cf.username.value, "password":$.base64.encode(cf.password.value)},
2023-03-21 16:34:05.563 function(output){
2023-03-21 16:34:05.563 var result = output;
2023-03-21 16:34:05.563 if(result == 5)
2023-03-21 16:34:05.563 top.location.href="unauth.cgi";
2023-03-21 16:34:05.563 else if(result == 3)
2023-03-21 16:34:05.563 top.location.href="multi_login.html";
2023-03-21 16:34:05.563 else
2023-03-21 16:34:05.563 top.location.href="start.htm";
2023-03-21 16:34:05.563 },
2023-03-21 16:34:05.563 check_fail,ts,null);
2023-03-21 16:34:05.563 return false;
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </script>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div id="loginWrapper">
2023-03-21 16:34:05.563 <div class="netgearLogo">
2023-03-21 16:34:05.563 <a href="http://www.netgear.com/" target="_blank">
2023-03-21 16:34:05.563 <img src="images/netgear.png">
2023-03-21 16:34:05.563 </a>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 <div class="usernameWrapper">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="head-text"><script>document.write(username);</script></div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="body-text">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <input class="editBody" type="text" name="username" value="" autocomplete="on" autofocus="autofocus">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 <div class="passwordWrapper">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="head-text"><script>document.write(bh_ddns_passwd);</script></div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="body-text">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <input class="editBody" type="password" name="password" value="" autocomplete="on">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="loginButton">
2023-03-21 16:34:05.563 <div>
2023-03-21 16:34:05.563 <a onclick="return checklogin(document.forms[0])">
2023-03-21 16:34:05.563 <script>document.write(bh_login);</script>
2023-03-21 16:34:05.563 </a>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 <div id = "failmsg" class="errorMsg" style="display:none"><script>document.write(bh_login_fail_msg);</script></div>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 </form>
2023-03-21 16:34:05.563 </body>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </html>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 Home detection: 192.168.11.1 Sent RAW:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2023-03-21 16:34:05.563 <html>
2023-03-21 16:34:05.563 <head>
2023-03-21 16:34:05.563 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2023-03-21 16:34:05.563 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
2023-03-21 16:34:05.563 <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
2023-03-21 16:34:05.563 <meta name="title" content="NETGEAR">
2023-03-21 16:34:05.563 <link type="image/vnd.microsoft.icon" rel="icon" href="images/favicon.ico" />
2023-03-21 16:34:05.563 <link type="image/x-icon" rel="shortcut icon" href="images/favicon.ico" />
2023-03-21 16:34:05.563 <script language="javascript" type="text/javascript" src="language/Dutch.js"></script>
2023-03-21 16:34:05.563 <script language="javascript" type="text/javascript" src="language/RU_flow_en.js"></script>
2023-03-21 16:34:05.563 <script>var LG_region="Dutch";</script>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <script language=javascript type=text/javascript src=/jquery-1.7.2.min.js></script>
2023-03-21 16:34:05.563 <script language=javascript type=text/javascript src=/jquery.base64.min.js></script>
2023-03-21 16:34:05.563 <link href="css/login-styles.css" rel="stylesheet">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </head>
2023-03-21 16:34:05.563 <body>
2023-03-21 16:34:05.563 <form>
2023-03-21 16:34:05.563 <script>
2023-03-21 16:34:05.563 var ts = "087146572256";
2023-03-21 16:34:05.563 function isValidChar_space(each_char)
2023-03-21 16:34:05.563 {
2023-03-21 16:34:05.563 if( each_char < 32 || each_char > 127)
2023-03-21 16:34:05.563 return false;
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 function check_fail()
2023-03-21 16:34:05.563 {
2023-03-21 16:34:05.563 document.getElementById("failmsg").style.display="";
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 function ajax_post(input,success_cb, error_cb, ts, htm){
2023-03-21 16:34:05.563 var data = input || {};
2023-03-21 16:34:05.563 $.ajax({
2023-03-21 16:34:05.563 url: "/apply.cgi?"+(htm||'')+" timestamp=" + ts,
2023-03-21 16:34:05.563 type: "POST",
2023-03-21 16:34:05.563 data: data,
2023-03-21 16:34:05.563 dataType: 'text',
2023-03-21 16:34:05.563 contentType: "application/json; charset=utf-8",
2023-03-21 16:34:05.563 success: function (output) {
2023-03-21 16:34:05.563 console.log('success!');
2023-03-21 16:34:05.563 if( typeof success_cb === "function" ) {
2023-03-21 16:34:05.563 success_cb(output);
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563 },
2023-03-21 16:34:05.563 error: function (err) {
2023-03-21 16:34:05.563 console.log('error!');
2023-03-21 16:34:05.563 if( typeof error_cb === "function" ) {
2023-03-21 16:34:05.563 error_cb(err);
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563 });
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 function checklogin(cf)
2023-03-21 16:34:05.563 {
2023-03-21 16:34:05.563 ajax_post({"submit_flag": "admin_login","username":cf.username.value, "password":$.base64.encode(cf.password.value)},
2023-03-21 16:34:05.563 function(output){
2023-03-21 16:34:05.563 var result = output;
2023-03-21 16:34:05.563 if(result == 5)
2023-03-21 16:34:05.563 top.location.href="unauth.cgi";
2023-03-21 16:34:05.563 else if(result == 3)
2023-03-21 16:34:05.563 top.location.href="multi_login.html";
2023-03-21 16:34:05.563 else
2023-03-21 16:34:05.563 top.location.href="start.htm";
2023-03-21 16:34:05.563 },
2023-03-21 16:34:05.563 check_fail,ts,null);
2023-03-21 16:34:05.563 return false;
2023-03-21 16:34:05.563 }
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </script>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div id="loginWrapper">
2023-03-21 16:34:05.563 <div class="netgearLogo">
2023-03-21 16:34:05.563 <a href="http://www.netgear.com/" target="_blank">
2023-03-21 16:34:05.563 <img src="images/netgear.png">
2023-03-21 16:34:05.563 </a>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 <div class="usernameWrapper">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="head-text"><script>document.write(username);</script></div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="body-text">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <input class="editBody" type="text" name="username" value="" autocomplete="on" autofocus="autofocus">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 <div class="passwordWrapper">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="head-text"><script>document.write(bh_ddns_passwd);</script></div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="body-text">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <input class="editBody" type="password" name="password" value="" autocomplete="on">
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 <div class="loginButton">
2023-03-21 16:34:05.563 <div>
2023-03-21 16:34:05.563 <a onclick="return checklogin(document.forms[0])">
2023-03-21 16:34:05.563 <script>document.write(bh_login);</script>
2023-03-21 16:34:05.563 </a>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 <div id = "failmsg" class="errorMsg" style="display:none"><script>document.write(bh_login_fail_msg);</script></div>
2023-03-21 16:34:05.563 </div>
2023-03-21 16:34:05.563 </form>
2023-03-21 16:34:05.563 </body>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.563 </html>
2023-03-21 16:34:05.563
2023-03-21 16:34:05.565 Home detection: Inbound data from: 192.168.11.1 containing []
2023-03-21 16:34:05.565 Home detection: 0 devices are present (excluding ignored devices)
EscApe
Posts: 528
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

Post by EscApe »

DeKraker wrote: Tuesday 21 March 2023 16:42 I have got some results when I specified the tracker as followed. '192.168.11.1:433#type=orbi-http'.
Below the log. Connected devices are not yet picked up as being 'at home'.
Could you try 192.168.11.1#type=orbi-http&port=443 instead?
pipiche
Posts: 1975
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Python plugin: Presence detection from wireless router

Post by pipiche »

EscApe wrote: Tuesday 21 March 2023 18:01
DeKraker wrote: Tuesday 21 March 2023 16:42 I have got some results when I specified the tracker as followed. '192.168.11.1:433#type=orbi-http'.
Below the log. Connected devices are not yet picked up as being 'at home'.
Could you try 192.168.11.1#type=orbi-http&port=443 instead?

Yes, it works if the port is defined, otherwise there is "False" value somewhere ...
I'm back to the mainstream.

And I do agree, if you are connected from an other place, then you get and error, because the Orbi is requesting you to explicity accept to kick the other session out.
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
hestia
Posts: 357
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: Python plugin: Presence detection from wireless router

Post by hestia »

EscApe wrote: Monday 20 March 2023 19:43
hestia wrote: Sunday 19 March 2023 17:28 <snip>
I still have the same issue :-(
SSH Could not connect (using password). Exception: No existing session
I need to disable the hardware and enable it again, and restart dz.
Some compatibility issue with ZigBeeForDonomoticZ: when I disable ZigBeeForDomoticZ, no issue
I have seen python plugins interfere before but my knowledge of the plugin framework is insufficient to solve these kind of problems. Maybe someone else can offer some insights?

Using zigbee2mqtt with MQTT auto-discovery in Domoticz myself.
Perhaps with more log (debug)
the same error in 2023-03-21 19:43:28.896

Code: Select all

2023-03-21 19:43:18.293 Sunrise: 06:52:00 SunSet: 19:04:00
2023-03-21 19:43:18.293 Day length: 12:13:00 Sun at south: 12:58:00
2023-03-21 19:43:18.293 Civil twilight start: 06:20:00 Civil twilight end: 19:36:00
2023-03-21 19:43:18.293 Nautical twilight start: 05:43:00 Nautical twilight end: 20:13:00
2023-03-21 19:43:18.293 Astronomical twilight start: 05:05:00 Astronomical twilight end: 20:51:00
2023-03-21 19:43:18.367 Active notification Subsystems: email, http, telegram (3/13)
2023-03-21 19:43:18.400 Starting shared server on: :::6144
2023-03-21 19:43:18.264 Status: Domoticz V2023.1 (build 15163) (c)2012-2023 GizMoCuz
2023-03-21 19:43:18.264 Status: Build Hash: ec057e0bf, Date: 2023-03-16 17:37:02
2023-03-21 19:43:18.264 Status: Startup Path: /home/pihestia/PROD_domoticz/
2023-03-21 19:43:18.360 Status: PluginSystem: Started, Python version '3.9.2', 3 plugin definitions loaded.
2023-03-21 19:43:18.372 Status: WebServer(HTTP) started on address: :: with port 8080
2023-03-21 19:43:18.393 Status: WebServer(SSL) started on address: :: with port 443
2023-03-21 19:43:18.399 Status: Camera: settings (re)loaded
2023-03-21 19:43:18.400 Status: TCPServer: shared server started...
2023-03-21 19:43:18.401 Status: RxQueue: queue worker started...
2023-03-21 19:43:20.421 ePresence: Worker thread started.
2023-03-21 19:43:20.422 zigbeeE: Worker thread started.
2023-03-21 19:43:20.421 Status: ePresence: Entering work loop.
2023-03-21 19:43:20.421 Status: ePresence: Started.
...
2023-03-21 19:43:20.423 Status: EventSystem: reset all events...
2023-03-21 19:43:20.429 Status: EventSystem: reset all device statuses...
2023-03-21 19:43:20.731 Status: ePresence: Initialized version 2.1, author 'ESCape'
2023-03-21 19:43:20.795 Status: PluginSystem: 2 plugins started.
2023-03-21 19:43:21.889 Status: Python EventSystem: Initializing event module.
2023-03-21 19:43:21.889 Status: EventSystem: Started
2023-03-21 19:43:21.890 Status: EventSystem: Queue thread started...
2023-03-21 19:43:23.453 ePresence: Debug logging mask set to: PYTHON
2023-03-21 19:43:23.453 ePresence: Operation system is: linux
2023-03-21 19:43:23.481 ePresence: The OS user profile running domoticz is: root
2023-03-21 19:43:23.481 ePresence: Parsing user and optional keyfile from:admin
2023-03-21 19:43:23.482 ePresence: start get or create wireless device
2023-03-21 19:43:23.482 ePresence: Camille monitor tag_id:EA:36:A7:8C:C5:A7, domoticz unit:2
2023-03-21 19:43:23.482 ePresence: start get or create wireless device
2023-03-21 19:43:23.482 ePresence: Mathilde monitor tag_id:FE:B5:68:2D:0B:22, domoticz unit:3
2023-03-21 19:43:23.482 ePresence: start get or create wireless device
2023-03-21 19:43:23.482 ePresence: Pascal monitor tag_id:00:0A:F5:44:C0:24, domoticz unit:4
2023-03-21 19:43:23.482 ePresence: start get or create wireless device
2023-03-21 19:43:23.482 ePresence: Valérie monitor tag_id:5A:46:E2:13:C5:3C, domoticz unit:5
2023-03-21 19:43:23.482 ePresence: start get or create wireless device
2023-03-21 19:43:23.482 ePresence: Constance monitor tag_id:30:32:35:14:2F:70, domoticz unit:6
2023-03-21 19:43:23.482 ePresence: Monitoring {'EA:36:A7:8C:C5:A7': <plugin.tag_device object at 0x7198f6a0>, 'FE:B5:68:2D:0B:22': <plugin.tag_device object at 0x68f40088>, '00:0A:F5:44:C0:24': <plugin.tag_device object at 0x68f400d0>, '5A:46:E2:13:C5:3C': <plugin.tag_device object at 0x68f40238>, '30:32:35:14:2F:70': <plugin.tag_device object at 0x68f40070>} for presence.
2023-03-21 19:43:23.482 ePresence: Tracker configuration:wapsalon,wapchambre,wapstudio
2023-03-21 19:43:23.483 ePresence: tracker:wapsalon
2023-03-21 19:43:23.483 ePresence: options:
2023-03-21 19:43:23.484 ePresence: wapsalon Tracker is of the ssh kind
2023-03-21 19:43:23.484 ePresence: wapsalon ====> SSH Fetching data using:
2023-03-21 19:43:23.484 export PATH=/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:$PATH
2023-03-21 19:43:23.484 type wl
2023-03-21 19:43:23.484 type iwinfo
2023-03-21 19:43:23.484 type wlanconfig
2023-03-21 19:43:23.484 type wl_atheros
2023-03-21 19:43:23.484 type qcsapi_sockrpc
2023-03-21 19:43:23.484 type ip
2023-03-21 19:43:23.484 type brctl
2023-03-21 19:43:23.484 type arp
2023-03-21 19:43:23.484 [ -f /proc/net/arp ] && type cat
2023-03-21 19:43:23.484 echo 0
2023-03-21 19:43:23.484 exit
2023-03-21 19:43:23.484 ePresence: wapsalon ====> SSH not connected ... connecting
2023-03-21 19:43:23.484 ePresence: wapsalon ====> SSH start connect on port 22
2023-03-21 19:43:23.634 ePresence: wapsalon ====> SSH returned (decoded):wl is /usr/sbin/wl
2023-03-21 19:43:23.634 iwinfo: not found
2023-03-21 19:43:23.634 wlanconfig: not found
2023-03-21 19:43:23.634 wl_atheros: not found
2023-03-21 19:43:23.634 qcsapi_sockrpc: not found
2023-03-21 19:43:23.634 ip is /usr/sbin/ip
2023-03-21 19:43:23.634 brctl is /usr/sbin/brctl
2023-03-21 19:43:23.634 arp is /sbin/arp
2023-03-21 19:43:23.634 cat is /bin/cat
2023-03-21 19:43:23.634 0
2023-03-21 19:43:23.634
2023-03-21 19:43:23.634 ePresence: wapsalon ====> SSH session took 149 milliseconds.
2023-03-21 19:43:23.636 ePresence: Available commands on wapsalon:{'wl': '/usr/sbin/wl', 'ip': '/usr/sbin/ip', 'brctl': '/usr/sbin/brctl', 'arp': '/sbin/arp', 'cat': '/bin/cat'}
2023-03-21 19:43:23.636 ePresence: wapsalon ====> SSH Fetching data using:
2023-03-21 19:43:23.636 for iface in $(ifconfig | cut -d ' ' -f1| tr ':' '
2023-03-21 19:43:23.636 ' | grep -E '^eth|^wlan|^wl');do
2023-03-21 19:43:23.636 /usr/sbin/wl -i $iface assoclist > /dev/null 2>&1 && printf "~$iface"
2023-03-21 19:43:23.636 done
2023-03-21 19:43:23.636 exit
2023-03-21 19:43:23.832 ePresence: wapsalon ====> SSH returned (decoded):~eth1~eth2
2023-03-21 19:43:23.833 ePresence: wapsalon ====> SSH session took 196 milliseconds.
2023-03-21 19:43:23.835 ePresence: wapsalon Available interfaces for wl: ['eth1', 'eth2']
2023-03-21 19:43:23.835 ePresence: wapsalon Prepared to poll using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:43:23.835 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:43:23.835 exit
2023-03-21 19:43:23.835 ePresence: wapsalon tracker will autodetect ssh cli
2023-03-21 19:43:23.835 ePresence: wapsalon Data will be received and interpreted by <bound method BasePlugin.onDataReceive of <plugin.BasePlugin object at 0x719477c0>>
2023-03-21 19:43:23.835 ePresence: Tracker config:wapsalon, custom port:False, user:admin, type:default and options:{}
2023-03-21 19:43:23.836 ePresence: tracker:wapchambre
2023-03-21 19:43:23.836 ePresence: options:
2023-03-21 19:43:23.837 ePresence: wapchambre Tracker is of the ssh kind
2023-03-21 19:43:23.837 ePresence: wapchambre ====> SSH Fetching data using:
2023-03-21 19:43:23.837 export PATH=/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:$PATH
2023-03-21 19:43:23.837 type wl
2023-03-21 19:43:23.837 type iwinfo
2023-03-21 19:43:23.837 type wlanconfig
2023-03-21 19:43:23.837 type wl_atheros
2023-03-21 19:43:23.837 type qcsapi_sockrpc
2023-03-21 19:43:23.837 type ip
2023-03-21 19:43:23.837 type brctl
2023-03-21 19:43:23.837 type arp
2023-03-21 19:43:23.837 [ -f /proc/net/arp ] && type cat
2023-03-21 19:43:23.837 echo 0
2023-03-21 19:43:23.837 exit
2023-03-21 19:43:23.837 ePresence: wapchambre ====> SSH not connected ... connecting
2023-03-21 19:43:23.837 ePresence: wapchambre ====> SSH start connect on port 22
2023-03-21 19:43:23.484 Status: ePresence: Starting tracker:wapsalon, user:admin, class:ssh_autodetect and poll interval:15
2023-03-21 19:43:23.599 Status: ePresence: wapsalon ====> SSH connection established
2023-03-21 19:43:23.837 Status: ePresence: Starting tracker:wapchambre, user:admin, class:ssh_autodetect and poll interval:15
...
2023-03-21 19:43:28.896 ePresence: wapchambre Could not retreive available commands
2023-03-21 19:43:28.896 ePresence: wapchambre tracker will autodetect ssh cli
2023-03-21 19:43:28.896 ePresence: wapchambre Data will be received and interpreted by <bound method BasePlugin.onDataReceive of <plugin.BasePlugin object at 0x719477c0>>
2023-03-21 19:43:28.896 ePresence: Tracker config:wapchambre, custom port:False, user:admin, type:default and options:{}
2023-03-21 19:43:28.896 ePresence: tracker:wapstudio
2023-03-21 19:43:28.896 ePresence: options:
2023-03-21 19:43:28.897 ePresence: wapstudio Tracker is of the ssh kind
2023-03-21 19:43:28.897 ePresence: wapstudio ====> SSH Fetching data using:
2023-03-21 19:43:28.897 export PATH=/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:$PATH
2023-03-21 19:43:28.897 type wl
2023-03-21 19:43:28.897 type iwinfo
2023-03-21 19:43:28.897 type wlanconfig
2023-03-21 19:43:28.897 type wl_atheros
2023-03-21 19:43:28.897 type qcsapi_sockrpc
2023-03-21 19:43:28.897 type ip
2023-03-21 19:43:28.897 type brctl
2023-03-21 19:43:28.897 type arp
2023-03-21 19:43:28.897 [ -f /proc/net/arp ] && type cat
2023-03-21 19:43:28.897 echo 0
2023-03-21 19:43:28.897 exit
2023-03-21 19:43:28.897 ePresence: wapstudio ====> SSH not connected ... connecting
2023-03-21 19:43:28.897 ePresence: wapstudio ====> SSH start connect on port 22
...
2023-03-21 19:43:28.897 Status: ePresence: Starting tracker:wapstudio, user:admin, class:ssh_autodetect and poll interval:15
2023-03-21 19:43:28.896 Error: ePresence: wapchambre ====> SSH Could not connect (using password). Exception: No existing session
2023-03-21 19:43:29.051 ePresence: wapstudio ====> SSH returned (decoded):wl is /usr/sbin/wl
2023-03-21 19:43:29.051 iwinfo: not found
2023-03-21 19:43:29.051 wlanconfig: not found
2023-03-21 19:43:29.051 wl_atheros: not found
2023-03-21 19:43:29.051 qcsapi_sockrpc: not found
2023-03-21 19:43:29.051 ip is /usr/sbin/ip
2023-03-21 19:43:29.051 brctl is /usr/sbin/brctl
2023-03-21 19:43:29.051 arp is /sbin/arp
2023-03-21 19:43:29.051 cat is /bin/cat
2023-03-21 19:43:29.051 0
2023-03-21 19:43:29.051
2023-03-21 19:43:29.051 ePresence: wapstudio ====> SSH session took 153 milliseconds.
2023-03-21 19:43:29.053 ePresence: Available commands on wapstudio:{'wl': '/usr/sbin/wl', 'ip': '/usr/sbin/ip', 'brctl': '/usr/sbin/brctl', 'arp': '/sbin/arp', 'cat': '/bin/cat'}
2023-03-21 19:43:29.053 ePresence: wapstudio ====> SSH Fetching data using:
2023-03-21 19:43:29.053 for iface in $(ifconfig | cut -d ' ' -f1| tr ':' '
2023-03-21 19:43:29.053 ' | grep -E '^eth|^wlan|^wl');do
2023-03-21 19:43:29.053 /usr/sbin/wl -i $iface assoclist > /dev/null 2>&1 && printf "~$iface"
2023-03-21 19:43:29.053 done
2023-03-21 19:43:29.053 exit
2023-03-21 19:43:29.136 ePresence: wapstudio ====> SSH returned (decoded):~eth1~eth2
2023-03-21 19:43:29.137 ePresence: wapstudio ====> SSH session took 83 milliseconds.
2023-03-21 19:43:29.138 ePresence: wapstudio Available interfaces for wl: ['eth1', 'eth2']
2023-03-21 19:43:29.139 ePresence: wapstudio Prepared to poll using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:43:29.139 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:43:29.139 exit
2023-03-21 19:43:29.139 ePresence: wapstudio tracker will autodetect ssh cli
2023-03-21 19:43:29.139 ePresence: wapstudio Data will be received and interpreted by <bound method BasePlugin.onDataReceive of <plugin.BasePlugin object at 0x719477c0>>
2023-03-21 19:43:29.139 ePresence: Tracker config:wapstudio, custom port:False, user:admin, type:default and options:{}
2023-03-21 19:43:29.139 ePresence: Trackers initialized as:{'wapsalon': <trackers.ssh_autodetect.ssh_autodetect object at 0x68f53ef8>, 'wapchambre': <trackers.ssh_autodetect.ssh_autodetect object at 0x67ef2028>, 'wapstudio': <trackers.ssh_autodetect.ssh_autodetect object at 0x67e0c310>}
2023-03-21 19:43:29.139 ePresence: Plugin initialization done.
2023-03-21 19:43:29.020 Status: ePresence: wapstudio ====> SSH connection established
2023-03-21 19:43:30.096 ePresence: onHeartbeat called
2023-03-21 19:43:30.096 ePresence: 1 devices are present (excluding ignored devices)
...
2023-03-21 19:43:38.484 ePresence: wapsalon Timed poll starting like clockwork
2023-03-21 19:43:38.484 ePresence: wapsalon Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x68f53ef8>>
2023-03-21 19:43:38.484 ePresence: wapsalon ====> SSH Fetching data using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:43:38.484 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:43:38.484 exit
2023-03-21 19:43:38.836 ePresence: wapchambre Not (yet) ready for polling
2023-03-21 19:43:40.061 ePresence: onHeartbeat called
2023-03-21 19:43:40.062 ePresence: 1 devices are present (excluding ignored devices)
...
2023-03-21 19:43:43.498 ePresence: wapsalon Could not be polled
2023-03-21 19:43:43.897 ePresence: wapstudio Timed poll starting like clockwork
2023-03-21 19:43:43.897 ePresence: wapstudio Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x67e0c310>>
2023-03-21 19:43:43.897 ePresence: wapstudio ====> SSH Fetching data using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:43:43.897 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:43:43.897 exit
2023-03-21 19:43:43.498 Status: ePresence: wapsalon ====> SSH resetting connection
2023-03-21 19:43:43.497 Error: ePresence: wapsalon ====> SSH failed with exception: Timeout opening channel.
...
2023-03-21 19:43:48.910 ePresence: wapstudio Could not be polled
2023-03-21 19:43:48.910 Status: ePresence: wapstudio ====> SSH resetting connection
2023-03-21 19:43:48.909 Error: ePresence: wapstudio ====> SSH failed with exception: Timeout opening channel.
2023-03-21 19:43:50.077 ePresence: onHeartbeat called
2023-03-21 19:43:50.077 ePresence: 1 devices are present (excluding ignored devices)
2023-03-21 19:43:53.838 ePresence: wapchambre Not (yet) ready for polling
2023-03-21 19:43:58.499 ePresence: wapsalon Timed poll starting like clockwork
2023-03-21 19:43:58.499 ePresence: wapsalon Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x68f53ef8>>
2023-03-21 19:43:58.500 ePresence: wapsalon ====> SSH Fetching data using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:43:58.500 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:43:58.500 exit
2023-03-21 19:43:58.500 ePresence: wapsalon ====> SSH not connected ... connecting
2023-03-21 19:43:58.500 ePresence: wapsalon ====> SSH start connect on port 22
2023-03-21 19:43:58.658 ePresence: wapsalon ====> SSH returned (decoded):assoclist C4:DD:57:00:D7:61
2023-03-21 19:43:58.658 assoclist E8:68:E7:C1:51:10
2023-03-21 19:43:58.658 assoclist AC:2B:6E:EC:12:D3
2023-03-21 19:43:58.658 assoclist 20:79:18:95:79:64
2023-03-21 19:43:58.658 assoclist 00:0A:F5:44:C0:24
2023-03-21 19:43:58.658 assoclist AC:CF:5C:16:7B:EE
2023-03-21 19:43:58.658
2023-03-21 19:43:58.658 ePresence: wapsalon ====> SSH session took 158 milliseconds.
2023-03-21 19:43:58.659 ePresence: wapsalon Sent RAW:assoclist C4:DD:57:00:D7:61
2023-03-21 19:43:58.659 assoclist E8:68:E7:C1:51:10
2023-03-21 19:43:58.659 assoclist AC:2B:6E:EC:12:D3
2023-03-21 19:43:58.659 assoclist 20:79:18:95:79:64
2023-03-21 19:43:58.659 assoclist 00:0A:F5:44:C0:24
2023-03-21 19:43:58.659 assoclist AC:CF:5C:16:7B:EE
2023-03-21 19:43:58.659
2023-03-21 19:43:58.665 ePresence: Inbound data from: wapsalon containing ['C4:DD:57:00:D7:61', 'E8:68:E7:C1:51:10', 'AC:2B:6E:EC:12:D3', '20:79:18:95:79:64', '00:0A:F5:44:C0:24', 'AC:CF:5C:16:7B:EE']
2023-03-21 19:43:58.666 ePresence: 1 devices are present (excluding ignored devices)
2023-03-21 19:43:58.632 Status: ePresence: wapsalon ====> SSH connection established
2023-03-21 19:44:00.093 ePresence: onHeartbeat called
2023-03-21 19:44:00.093 ePresence: 1 devices are present (excluding ignored devices)
2023-03-21 19:44:03.912 ePresence: wapstudio Timed poll starting like clockwork
2023-03-21 19:44:03.912 ePresence: wapstudio Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x67e0c310>>
2023-03-21 19:44:03.912 ePresence: wapstudio ====> SSH Fetching data using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:44:03.912 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:44:03.912 exit
2023-03-21 19:44:03.912 ePresence: wapstudio ====> SSH not connected ... connecting
2023-03-21 19:44:03.912 ePresence: wapstudio ====> SSH start connect on port 22
2023-03-21 19:44:04.065 ePresence: wapstudio ====> SSH returned (decoded):assoclist 68:C6:3A:A5:F1:3C
2023-03-21 19:44:04.065
2023-03-21 19:44:04.065 ePresence: wapstudio ====> SSH session took 152 milliseconds.
2023-03-21 19:44:04.066 ePresence: wapstudio Sent RAW:assoclist 68:C6:3A:A5:F1:3C
2023-03-21 19:44:04.066
2023-03-21 19:44:04.067 ePresence: Inbound data from: wapstudio containing ['68:C6:3A:A5:F1:3C']
2023-03-21 19:44:04.067 ePresence: 1 devices are present (excluding ignored devices)
2023-03-21 19:44:04.041 Status: ePresence: wapstudio ====> SSH connection established
2023-03-21 19:44:08.839 ePresence: wapchambre Not (yet) ready for polling
2023-03-21 19:44:10.059 ePresence: onHeartbeat called
2023-03-21 19:44:10.059 ePresence: 1 devices are present (excluding ignored devices)
2023-03-21 19:44:13.667 ePresence: wapsalon Timed poll starting like clockwork
2023-03-21 19:44:13.667 ePresence: wapsalon Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x68f53ef8>>
2023-03-21 19:44:13.667 ePresence: wapsalon ====> SSH Fetching data using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:44:13.667 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:44:13.667 exit
2023-03-21 19:44:18.680 ePresence: wapsalon Could not be polled
2023-03-21 19:44:18.680 Status: ePresence: wapsalon ====> SSH resetting connection
2023-03-21 19:44:18.679 Error: ePresence: wapsalon ====> SSH failed with exception: Timeout opening channel.
2023-03-21 19:44:19.068 ePresence: wapstudio Timed poll starting like clockwork
2023-03-21 19:44:19.069 ePresence: wapstudio Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x67e0c310>>
2023-03-21 19:44:19.069 ePresence: wapstudio ====> SSH Fetching data using: /usr/sbin/wl -i eth1 assoclist
2023-03-21 19:44:19.069 /usr/sbin/wl -i eth2 assoclist
2023-03-21 19:44:19.069 exit
2023-03-21 19:44:20.076 ePresence: onHeartbeat called
2023-03-21 19:44:20.076 ePresence: 1 devices are present (excluding ignored devices)
2023-03-21 19:44:23.840 ePresence: wapchambre Not (yet) ready for polling
2023-03-21 19:44:24.086 ePresence: wapstudio Could not be polled
2023-03-21 19:44:24.086 Status: ePresence: wapstudio ====> SSH resetting connection
2023-03-21 19:44:24.085 Error: ePresence: wapstudio ====> SSH failed with exception: Timeout opening channel.
2023-03-21 19:44:30.091 ePresence: onHeartbeat called
2023-03-21 19:44:30.091 ePresence: 1 devices are present (excluding ignored devices) 
DeKraker
Posts: 7
Joined: Tuesday 03 April 2018 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Python plugin: Presence detection from wireless router

Post by DeKraker »

EscApe wrote: Tuesday 21 March 2023 18:01
DeKraker wrote: Tuesday 21 March 2023 16:42 I have got some results when I specified the tracker as followed. '192.168.11.1:433#type=orbi-http'.
Below the log. Connected devices are not yet picked up as being 'at home'.
Could you try 192.168.11.1#type=orbi-http&port=443 instead?
Done. Result/log remains the same however.
EscApe
Posts: 528
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

Post by EscApe »

Hi @hestia,

Could it be the Domoticz host, network or router are so busy that the ssh session is getting a time-out? There are some pretty short hardcoded timeouts in ssh_tracker.py that you could try and change.
EscApe
Posts: 528
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

Post by EscApe »

DeKraker wrote: Tuesday 21 March 2023 20:13 Done. Result/log remains the same however.
Are you sure you are not logged onto the web interface of the router from another pc? The orbi only allows one connection at a time.
If so, can you post a debug log including the part where the plug-in is starting until the first poll.

What type of orbi are you using?
DeKraker
Posts: 7
Joined: Tuesday 03 April 2018 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Python plugin: Presence detection from wireless router

Post by DeKraker »

EscApe wrote: Tuesday 21 March 2023 20:29
DeKraker wrote: Tuesday 21 March 2023 20:13 Done. Result/log remains the same however.
Are you sure you are not logged onto the web interface of the router from another pc? The orbi only allows one connection at a time.
If so, can you post a debug log including the part where the plug-in is starting until the first poll.

What type of orbi are you using?
Netgear Orbi RBR350 running fw. V4.4.1.29_3.10.80

Code: Select all

23-03-21 21:14:12.150 Home detection: Worker thread started.
2023-03-21 21:14:12.150 Status: Home detection: Entering work loop.
2023-03-21 21:14:12.150 Status: Home detection: Started.
2023-03-21 21:14:12.387 Status: Home detection: Initialized version 2.1, author 'ESCape'
2023-03-21 21:14:14.131 Home detection: Debug logging mask set to: PYTHON
2023-03-21 21:14:14.131 Home detection: Operation system is: linux
2023-03-21 21:14:14.176 Home detection: The OS user profile running domoticz is: root
2023-03-21 21:14:14.177 Home detection: Parsing user and optional keyfile from:admin
2023-03-21 21:14:14.177 Home detection: start get or create wireless device
2023-03-21 21:14:14.177 Home detection: phoneSophie monitor tag_id:92:C9:27:FA:0E:66, domoticz unit:2
2023-03-21 21:14:14.178 Home detection: start get or create wireless device
2023-03-21 21:14:14.178 Home detection: phoneSarah monitor tag_id:CA:7F:A8:D8:52:7D, domoticz unit:3
2023-03-21 21:14:14.178 Home detection: start get or create wireless device
2023-03-21 21:14:14.178 Home detection: phoneNathalie monitor tag_id:66:9F:CB:37:D4:8D, domoticz unit:4
2023-03-21 21:14:14.178 Home detection: start get or create wireless device
2023-03-21 21:14:14.178 Home detection: phoneKees monitor tag_id:3A:5F:51:8D:4F:1C, domoticz unit:5
2023-03-21 21:14:14.178 Home detection: Monitoring {'92:C9:27:FA:0E:66': <plugin.tag_device object at 0x656d2370>, 'CA:7F:A8:D8:52:7D': <plugin.tag_device object at 0x656d2030>, '66:9F:CB:37:D4:8D': <plugin.tag_device object at 0x656d2c50>, '3A:5F:51:8D:4F:1C': <plugin.tag_device object at 0x656d2af0>} for presence.
2023-03-21 21:14:14.178 Home detection: Tracker configuration:192.168.11.1#type=orbi-http&port=443
2023-03-21 21:14:14.178 Home detection: tracker:192.168.11.1
2023-03-21 21:14:14.178 Home detection: options:type=orbi-http&port=443
2023-03-21 21:14:14.182 Home detection: 192.168.11.1 Data will be received and interpreted by <bound method BasePlugin.onDataReceive of <plugin.BasePlugin object at 0x644d9cb0>>
2023-03-21 21:14:14.182 Home detection: Tracker config:192.168.11.1, custom port:443, user:admin, type:orbi-http and options:{'type': 'orbi-http', 'port': 443}
2023-03-21 21:14:14.182 Home detection: Trackers initialized as:{'192.168.11.1': <trackers.http_orbi.http_orbi object at 0x656d2750>}
2023-03-21 21:14:14.182 Home detection: Plugin initialization done.
2023-03-21 21:14:14.180 Status: Home detection: Starting tracker:192.168.11.1, user:admin, class:http_orbi and poll interval:15
2023-03-21 21:14:14.182 Status: Home detection: 192.168.11.1 Initialized as Netgear Orbi


EscApe
Posts: 528
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

Post by EscApe »

DeKraker wrote: Tuesday 21 March 2023 21:22 Netgear Orbi RBR350 running fw. V4.4.1.29_3.10.80
The response you where getting in your previous log is very different from the one I'm getting form the rbr50. Maybe it needs another approach. Since I don't have access to a RBR350 I cannot diagnose this any further. Can you experiment on your router?

Tha basic commands in Python3 to get the device list from a rbr50 is:

Code: Select all

import requests
http_session = requests.Session()
http_session.auth = ("admin","<<<<<your password >>>>>")
orbi_url = 'https://{}:{}/DEV_device_info.htm'.format("192.168.11.1", "443")
resp = http_session.get(orbi_url, verify=False, timeout=8)
print(resp.text)

Maybe it needs another url than /DEV_device_info.htm ?

If someone can give me access to a rbr350 (remotely over vpn should work) I would gladly take a look.
Last edited by EscApe on Wednesday 22 March 2023 14:13, edited 1 time in total.
Ray-Man
Posts: 29
Joined: Friday 12 December 2014 19:03
Target OS: Linux
Domoticz version: 2021.1
Location: Zwolle
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Ray-Man »

Hello EscApe,

I did a fresh install of Domoticz (2023.1) and am trying to get iDetect to work. No luck so far, it keeps giving errors:
Spoiler: show
2023-03-22 11:03:00.863 Status: iDetect: Started.
2023-03-22 11:03:00.864 Status: iDetect: Entering work loop.
2023-03-22 11:03:00.981 Status: iDetect: Initialized version 2.1, author 'ESCape'
2023-03-22 11:03:00.663 Error: iDetect: Call to function 'onStop' failed, exception details:
2023-03-22 11:03:00.665 Error: iDetect: Traceback (most recent call last):
2023-03-22 11:03:00.665 Error: iDetect: File "/home/remon/domoticz/plugins/iDetect/plugin.py", line 429, in onStop
2023-03-22 11:03:00.665 Error: iDetect: _plugin.onStop()
2023-03-22 11:03:00.665 Error: iDetect: File "/home/remon/domoticz/plugins/iDetect/plugin.py", line 417, in onStop
2023-03-22 11:03:00.665 Error: iDetect: for r in self.active_trackers:
2023-03-22 11:03:00.665 Error: iDetect: AttributeError: 'BasePlugin' object has no attribute 'active_trackers'
2023-03-22 11:03:01.351 Error: iDetect: Call to function 'onStart' failed, exception details:
2023-03-22 11:03:01.354 Error: iDetect: Traceback (most recent call last):
2023-03-22 11:03:01.354 Error: iDetect: File "/home/remon/domoticz/plugins/iDetect/plugin.py", line 425, in onStart
2023-03-22 11:03:01.354 Error: iDetect: _plugin.onStart()
2023-03-22 11:03:01.354 Error: iDetect: File "/home/remon/domoticz/plugins/iDetect/plugin.py", line 212, in onStart
2023-03-22 11:03:01.354 Error: iDetect: from trackers import poll_methods
2023-03-22 11:03:01.354 Error: iDetect: File "/home/remon/domoticz/plugins/iDetect/trackers/__init__.py", line 30, in <module>
2023-03-22 11:03:01.354 Error: iDetect: from trackers.http_orbi import http_orbi
2023-03-22 11:03:01.354 Error: iDetect: File "/home/remon/domoticz/plugins/iDetect/trackers/http_orbi.py", line 7, in <module>
2023-03-22 11:03:01.354 Error: iDetect: import requests
2023-03-22 11:03:01.354 Error: iDetect: File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
2023-03-22 11:03:01.354 Error: iDetect: from urllib3.contrib import pyopenssl
2023-03-22 11:03:01.354 Error: iDetect: File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
2023-03-22 11:03:01.354 Error: iDetect: import OpenSSL.SSL
2023-03-22 11:03:01.354 Error: iDetect: File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
2023-03-22 11:03:01.354 Error: iDetect: from OpenSSL import crypto, SSL
2023-03-22 11:03:01.354 Error: iDetect: File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
2023-03-22 11:03:01.354 Error: iDetect: class X509StoreFlags(object):
2023-03-22 11:03:01.354 Error: iDetect: File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
2023-03-22 11:03:01.354 Error: iDetect: CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
2023-03-22 11:03:01.354 Error: iDetect: AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-03-22 11:03:10.101 Status: iDetect: Skip this hearbeat ... system is still preparing
Luckily this is just a test system, it is working fine on my 'production' Domoticz, but obviously i want it to work on my test system as well.

Any ideas what might be the problem?
EscApe
Posts: 528
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

Post by EscApe »

Ray-Man wrote: Wednesday 22 March 2023 11:10 Hello EscApe,

I did a fresh install of Domoticz (2023.1) and am trying to get iDetect to work. No luck so far, it keeps giving errors:
Any ideas what might be the problem?
Hi Ray-Man,

My first guess would be that your fresh install does not yet meet al requirements. Especially the paramiko requirements can be tricky. I don't know if you can get a more detailed log, but there might be something in there about a module not loading.
Also make sure that the requirements are met in the python environment that Domoticz is using. Depending on your setup it is not necessarily the same environment you see as a different user.
Ray-Man
Posts: 29
Joined: Friday 12 December 2014 19:03
Target OS: Linux
Domoticz version: 2021.1
Location: Zwolle
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Ray-Man »

Hi EscApe,

I think you're right! Tried to reinstall python3-pip -> no updates as in was intalled correctly
Tried do reinstall requests paramiko -> lots of errors, package won't install.....
Spoiler: show
remon@ourea-v2:~$ sudo pip3 install requests paramiko
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
load_entry_point('pip==20.0.2', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
from pip._internal.exceptions import CommandError
File "/usr/lib/python3/dist-packages/pip/_internal/exceptions.py", line 10, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 65, in <module>
vendored("cachecontrol")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/adapter.py", line 5, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/__init__.py", line 95, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in <module>
File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 12, in <module>
import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
File "/usr/lib/python3/dist-packages/requests_unixsocket/__init__.py", line 1, in <module>
import requests
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/__init__.py", line 95, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in <module>
File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Original exception was:
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
load_entry_point('pip==20.0.2', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
from pip._internal.exceptions import CommandError
File "/usr/lib/python3/dist-packages/pip/_internal/exceptions.py", line 10, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 65, in <module>
vendored("cachecontrol")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/adapter.py", line 5, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/__init__.py", line 95, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in <module>
File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
So paramiko isn't installed at all..... But, how to correct this?
EscApe
Posts: 528
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

Post by EscApe »

Ray-Man wrote: Wednesday 22 March 2023 11:37 Hi EscApe,

Tried do reinstall requests paramiko -> lots of errors, package won't install.....
Can you try installing python3-cryptography before installing paramiko. On Debian run:

Code: Select all

sudo apt install python3-cryptography
Otherwise the pip installer will try to build Cryptography itself, which has a whole additional set of requirements. This used to work for me, but I ran into similar problems in my dockerized setup. Maybe the problem was not specific to my docker environment(?)

Please let me know if it worked, so I can add this to the installation instructions.

EDIT: You could also try sudo apt install python3-paramiko instead of installing paramiko through pip.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest