Page 56 of 56
Re: Python plugin: Presence detection from wireless router
Posted: Thursday 27 March 2025 7:12
by EscApe
Great that you got it working!
The default (ssh autodetect) tracker queries the router on a pretty low (chipset) level so you need te query every node in your mesh separately or use another tracker type that queries the mesh on the master router. For Asus the "aimesh_json" tracker type should work (at least it did when I had a Asus mesh).
The PyO3 issue is/was a known problem. You can find some discussion about it on this forum. From memory: it was a change in an underlying Python module for cryptography that in combination with the way Domoticz was loading plugins was causing the problem. Cryptography is used by paramiko and other common modules like requests.
The Domticz/Python version combination had been troublesome before, so I moved Domoticz into a docker container. That way I have more control over the isolated Domoticz environment, without limiting other programs on the host.
Within the docker container I just install all required modules globally on a first run of customstart.sh.
At this moment I am running Domoticz 2025.1 (build 16490) with Python Version: 3.9.2 without any issues. Other combination might also work. I don't remember if it was fixes by changing the python version or Domoticz.
Re: Python plugin: Presence detection from wireless router
Posted: Thursday 27 March 2025 15:22
by Siewert308SW
Don't know if this plug is still supported.
But wanted to try this one and run into an issue.
As far as i can see the plugin runs and don't have any errors.
Setup:
Code: Select all
Version: 2024.7
Build Hash: b317cfab1
Compile Date: 2024-07-13 16:59:31
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]
FritzBox 7590
Installed according your GitHub Readme.
The log says the plug is running and mention the following.
Code: Select all
2025-03-27 15:00:25.338 Status: iDetect: Started.
2025-03-27 15:00:25.433 Status: iDetect: Initialized version 2.4, author 'ESCape'
2025-03-27 15:00:25.756 Status: iDetect: Starting address:192.168.178.100, port:None, user:Me, keyfile:, class:fritzbox and poll interval:30
2025-03-27 15:00:31.065 Status: iDetect: Fritzbox has 3 WLAN services
At the setup page at Trackers i filled in "192.168.178.100#type=fritzbox"
As for the tags part is filled in "Siewert_GSM=XX:XX:XX:XX:XX:XX"
Now for the username and pass word i filled in my FritzBox username and password.
The issue is when i enter a IP for my phone it is detected as ON or Offline
But when i fill in the MAC nothing happens.
Could it be i don't use the WiFi interface of the FritzBox as it's disabled due to using a TP-link Deco mesh network?
If you need more information about my setup please let me know.
thx
Re: Python plugin: Presence detection from wireless router
Posted: Thursday 27 March 2025 16:58
by EscApe
Indeed, the plugin won't be able to detect any wifi presence if you disabled wifi on the router. The ip-address works because it will use ping instead of wifi detection. The ping approach won't even use the router.
Re: Python plugin: Presence detection from wireless router
Posted: Friday 28 March 2025 9:49
by Siewert308SW
thx for the answer...
Re: Python plugin: Presence detection from wireless router
Posted: Wednesday 14 May 2025 12:58
by hjzwiers
Hi! I've been forced to upgrade the system to bookworm and I have iDetect errors again.
I've doe a lot to system wide get rid of errors, most are done.
What I've done so far:
1. Got rid of all iDetect elements, in Devices, everywhere
2. Installed a freash version of iDetect, the beta version (should handel bookworm better): sudo git clone -b DomoticzEx-based-beta
https://github.com/d-EScape/Domoticz_iDetect.git iDetect
3. Made a version of PYTHONPATH for the virtal handling of Python3
4. Ran Paramiko: sudo pip3 install requests paramiko
I'm getting a message that Paramiko isn't installed:Error: iDetect: Required modules for default tracker are not installed:No module named 'paramiko'
I don't know anymore lol, what is going wrong?
Re: Python plugin: Presence detection from wireless router
Posted: Wednesday 14 May 2025 14:59
by EscApe
As long as you are running the same version of the plugin there is no reason to remove any iDetect elements. That step is only needed if you switch between the (still) "beta" and the master version, because the beta uses the DomoitczEx framework and the older version uses the old plugin framework.
Just follow the error message. Paramiko is not installed in the environment that Domoticz is using.
Are you still running a docker container?
Do you have a python virtual environment (VENV)?
I don't know what this means: "Made a version of PYTHONPATH for the virtal handling of Python3". It should not be needed if your python environment is correctly setup.
Are you sure that sudo pip3 install requests paramiko was successful? By default the bookworm versions of pip will refuse to intstall modules this way and it will exit with a message saying so.
Re: Python plugin: Presence detection from wireless router
Posted: Wednesday 14 May 2025 15:28
by hjzwiers
It says:
hjz@debian:~/domoticz/plugins/iDetect$ sudo pip3 install requests paramiko
Requirement already satisfied: requests in /usr/local/lib/python3.10/site-packages (2.32.3)
Requirement already satisfied: paramiko in /usr/local/lib/python3.10/site-packages (3.5.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/site-packages (from requests) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/site-packages (from requests) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/site-packages (from requests) (2.4.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/site-packages (from requests) (2025.4.26)
Requirement already satisfied: bcrypt>=3.2 in /usr/local/lib/python3.10/site-packages (from paramiko) (4.3.0)
Requirement already satisfied: cryptography>=3.3 in /usr/local/lib/python3.10/site-packages (from paramiko) (44.0.3)
Requirement already satisfied: pynacl>=1.5 in /usr/local/lib/python3.10/site-packages (from paramiko) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/site-packages (from cryptography>=3.3->paramiko) (1.15.1)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko) (2.22)
but this refers to python3.10, but i am running 3.11.2?
Re: Python plugin: Presence detection from wireless router
Posted: Wednesday 14 May 2025 16:12
by EscApe
Sorry, can’t really help you. Seems like your python environment is not properly setup.
I would start undoing whatever you tried to do with the python path, but repairing a broken python installation is not my area of expertise.
Re: Python plugin: Presence detection from wireless router
Posted: Wednesday 14 May 2025 19:33
by Gingerpale
Not sure how your setup looks like, but I had the same issue running on Rpi4 with Buster and Python 3.7.
I upgraded to Bookworm and created a venv called venv (you can create a venv with any name) and successfully installed iDetect in the venv. My Python version is 3.11. After I also used/upgraded to DomoticzEx-based-beta but this is not really relevant.
Check also what Python version Domoticz is using: In Domoticz - Setup - About Domoticz the python version should be shown.
iDetect install procedure:
Code: Select all
https://github.com/d-EScape/Domoticz_iDetect
source venv/bin/activate
pip install requests paramiko
cd /home/pi/domoticz/plugins
deactivate
Hope it helps...
Re: Python plugin: Presence detection from wireless router
Posted: Monday 16 June 2025 11:18
by hjzwiers
Updated all my files, running now from within docker (through dockge)
I'm running the Beta version
Successfully installed bcrypt-4.3.0 paramiko-3.5.1 pynacl-1.5.0
I don't think my iDetect get get out of docker:
2025-06-16 11:09:26.073 Error: Detect: 192.168.2.1 ====> SSH Could not connect (using password). Exception: [Errno None] Unable to connect to port 22 on 192.168.2.1
Any idea?
Re: Python plugin: Presence detection from wireless router
Posted: Saturday 02 August 2025 10:44
by capman
I have a problem with the idetect presence detection from my fritzbox 6890 LTE.
See log

- Schermafbeelding 2025-08-02 103333.jpg (277.17 KiB) Viewed 1639 times
This is my idetect setup with fritzbox 3 repeaters , and the fritzbox itself.

- Schermafbeelding 2025-08-02 104620.jpg (79.16 KiB) Viewed 1638 times
If someone know what to do , please let me know it.
Thanks.
Re: Python plugin: Presence detection from wireless router
Posted: Saturday 02 August 2025 13:31
by EscApe
In my mesh setup I only need te query the (Fritz 4060) mesh master
Re: Python plugin: Presence detection from wireless router
Posted: Sunday 03 August 2025 13:13
by capman
EscApe wrote: Saturday 02 August 2025 13:31
In my mesh setup I only need te query the (Fritz 4060) mesh master
Sorry , no luck. I have tried different combinations with the trackers.
Before I had a fritzbox 7590AX and that worked well.
Now I've been looking to gpslogger for presence detection.
Re: Python plugin: Presence detection from wireless router
Posted: Saturday 09 August 2025 20:36
by capman
I did it using node-red.
Thanks.
Re: Python plugin: Presence detection from wireless router
Posted: Thursday 11 December 2025 12:00
by rensbr
Since two days I have a strange problem with the plugin, I get the following error"
Code: Select all
2025-12-11 10:46:46.601 Error: Presence detection: 192.168.0.100 ====> SSH returned error:usage: wlanconfig athX create wlandev wifiX
2025-12-11 10:46:46.601 wlanmode [sta|adhoc|ap|monitor|wrap|p2pgo|p2pcli|p2pdev|specialvap|smart_monitor|lp_iot_mode]
2025-12-11 10:46:46.601 [wlanaddr <mac_addr>] [mataddr <mac_addr>] [bssid|-bssid] [vapid <0-15>] [nosbeacon]
2025-12-11 10:46:46.601 usage: wlanconfig athX destroy
2025-12-11 10:46:46.601 usage: wlanconfig athX nawds mode (0-4)
2025-12-11 10:46:46.601 usage: wlanconfig athX nawds defcaps CAPS
2025-12-11 10:46:46.601 usage: wlanconfig athX nawds override (0-1)
2025-12-11 10:46:46.601 usage: wlanconfig athX nawds add-repeater MAC (0-1)
2025-12-11 10:46:46.601 usage: wlanconfig athX nawds del-repeater MAC
2025-12-11 10:46:46.601 usage: wlanconfig athX nawds list
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm setbssmax <idle period in seconds> [<idle option>]
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm getbssmax
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm tfsreq <filename>
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm deltfs
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm timintvl <Interval>
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm gettimparams
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm timrate <highrateEnable> <lowRateEnable>
2025-12-11 10:46:46.601 usage: wlanconfig athX wnm bssterm <delay in TBTT> [<duration in minutes>]
2025-12-11 10:46:46.601 usage: wlanconfig athX vendorie add len <oui+pcap_data in bytes> oui <eg:xxxxxx> pcap_data <eg:xxxxxxxx> ftype_map <eg:xx>
2025-12-11 10:46:46.601 usage: wlanconfig athX vendorie update len <oui+pcap_data in bytes> oui <eg:xxxxxx> pcap_data <eg:xxxxxxxx> ftype_map <eg:xx>
2025-12-11 10:46:46.601 usage: wlanconfig athX vendorie remove len <oui+pcap_data in bytes> oui <eg:xxxxxx> pcap_data <eg:xx>
2025-12-11 10:46:46.601 usage: wlanconfig athX vendorie list
2025-12-11 10:46:46.601 usage: wlanconfig athX vendorie list len <oui in bytes> oui <eg:xxxxxx>
2025-12-11 10:46:46.601 usage: wlanconfig athX nac add/del bssid <ad1 eg: xx:xx:xx:xx:xx:xx> <ad2> <ad3>
2025-12-11 10:46:46.601 usage: wlanconfig athX nac add/del client <ad1 eg: xx:xx:xx:xx:xx:xx> <ad2> <ad3> <ad4> <ad5> <ad6> <ad7> <ad8>
2025-12-11 10:46:46.601 usage: wlanconfig athX nac list bssid/client
2025-12-11 10:46:46.601 usage: wlanconfig athX rssi_nac add bssid (eg: xx:xx:xx:xx:xx:xx) client (eg: xx:xx:xx:xx:xx:xx) channel (1 -- 255)
2025-12-11 10:46:46.601 usage: wlanconfig athX rssi_nac del bssid (eg: xx:xx:xx:xx:xx:xx) client (eg: xx:xx:xx:xx:xx:xx)
2025-12-11 10:46:46.601 usage: wlanconfig athX rssi_nac show_rssi
2025-12-11 10:46:46.601 wlanmode [sta|adhoc|ap|monitor|wrap|p2pgo|p2pcli|p2pdev|specialvap|mesh|smart_monitor|lp_iot_mode]
2025-12-11 10:46:46.601 [wlanaddr <mac_addr>] [mataddr <mac_addr>] [bssid|-bssid] [vapid <0-15>] [nosbeacon]
2025-12-11 10:46:46.601 usage: wlanconfig athX addie ftype <frame type> len < data len> data <data>
2025-12-11 10:46:46.601 ftype: 0/2/4('0'-Beacon,'2'-Probe Resp,'4'-Assoc Resp)
2025-12-11 10:46:46.601 len: Data length(IE length + 2)
2025-12-11 10:46:46.601 data: Data(in hex)
Whay i tried:
- Updated Domoticz to latest version
- Updated plugin to latest version -> was already at latest version
- Updated the plugin to the 'DomoticzEx-based-beta' version
- Deleted the current plugin and started completly over
I'm using the plugin in colaboation with a Unifi USG. Any thoughs or idea's?
Re: Python plugin: Presence detection from wireless router
Posted: Friday 19 December 2025 10:26
by EscApe
rensbr wrote: Thursday 11 December 2025 12:00
Since two days I have a strange problem with the plugin, I get the following error"
…..
I'm using the plugin in colaboation with a Unifi USG. Any thoughs or idea's?
The message you see after the error is the actual command line response from your router. Seems like the Unifi USG is expecting another cli command syntax. Maybe something has changed in the router firmware, maybe you chose the wrong idetect configuration options. Since you did not include a full debug log from the moment the plugin starts I don’t know what your settings are.
Re: Python plugin: Presence detection from wireless router
Posted: Sunday 04 January 2026 15:27
by svd71
Hi,
little problem: some mobile phones (like iPhone for example) have temporary mac-addresses, how can change on the next connection. I think it possible to use 'device name' for ping, not only mac. Is it possible to switch between ping and ping6(for IP v 6)?
BR
Re: Python plugin: Presence detection from wireless router
Posted: Sunday 04 January 2026 15:39
by EscApe
svd71 wrote: Sunday 04 January 2026 15:27
Hi,
little problem: some mobile phones (like iPhone for example) have temporary mac-addresses, how can change on the next connection. I think it possible to use 'device name' for ping, not only mac. Is it possible to switch between ping and ping6(for IP v 6)?
BR
Hi,
You can disable the temporary (private) Mac-addresses for your local wifi network. Go to settings -> wifi, and click on the blue information icon next to the network your want to use. Set private address to off.