Thx for the research and solutions provided.
The paramiko solution (changed that in my customstart.sh) worked for me but the alternative solution with alternative SSH client was not. Looks like my router won't accept it any other way. Nevertheless: got it working in test so looking forward to upgrade the production unit.
Python plugin: Presence detection from wireless router
Moderator: leecollings
-
EscApe
- Posts: 539
- 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
Hi ferrosk and skippy771,
I remember also having issues with PyO3. Don't remember exactly what I did and why, but I have Paramiko working on Trixy with Python3.13.5.
My customstart.sh installs cryptography first, not just as a dependancy. Should not make a difference, but I must have had a reason. (it was a while ago
).
Note that a do not use a ssh based detection anymore because I changed routers, but I can load Paramiko in Python from cli without errors (connected to the docker container console). I you want to investigate further, you could try that on an apparently failed setup. Does it load Paramiko from cli? Maybe something else went wrong with version 2.4 of iDetect.
From my customstart.sh (that also installs a lot of other stuff):
Also, I am using version 2.5 of the plugin. I never got around to making it the master branch because of some breaking changes, but you can install it as the "DomoticzEx-based-beta" branch.
I did start out using the ssh shell command, but it will bash your router with new sessions and fill up its logs (that might be in fragile nvram), depending on your configuration. It's also less efficient. I would rather have used the Domoticz plugin frameworks own connection, but I don't have to time to figure out how to use it with ssh. Don't know if it can.
I remember also having issues with PyO3. Don't remember exactly what I did and why, but I have Paramiko working on Trixy with Python3.13.5.
My customstart.sh installs cryptography first, not just as a dependancy. Should not make a difference, but I must have had a reason. (it was a while ago
Note that a do not use a ssh based detection anymore because I changed routers, but I can load Paramiko in Python from cli without errors (connected to the docker container console). I you want to investigate further, you could try that on an apparently failed setup. Does it load Paramiko from cli? Maybe something else went wrong with version 2.4 of iDetect.
From my customstart.sh (that also installs a lot of other stuff):
Code: Select all
pip install --break-system-packages cryptography setuptools requests parallel-ssh chardet paramiko motionblinds python_picnic_api paho-mqtt gTTS pychromecast hwmon fritzconnection tinytuya aioharmony telnetlib3skippy711 wrote: Monday 22 June 2026 21:25 Thx for the research and solutions provided.
The paramiko solution (changed that in my customstart.sh) worked for me but the alternative solution with alternative SSH client was not. Looks like my router won't accept it any other way. Nevertheless: got it working in test so looking forward to upgrade the production unit.
@ferrosk, thanks for taking the time to help!ferrosk wrote: Sunday 21 June 2026 16:10 Alternative solution
This approach is intended for the plugin author, @EscApe, to consider. Instead of using Paramiko, I recommend modifying the plugin to use an alternative SSH client.
I have rewritten ssh_tracker.py to use the system SSH command via subprocess. This eliminates the dependency on bcrypt/PyO3 and works reliably across environments. I am currently testing it, and it appears to be working well. It is available for testing in my fork:
https://github.com/frepkovsky/Domoticz_iDetect.git
I did start out using the ssh shell command, but it will bash your router with new sessions and fill up its logs (that might be in fragile nvram), depending on your configuration. It's also less efficient. I would rather have used the Domoticz plugin frameworks own connection, but I don't have to time to figure out how to use it with ssh. Don't know if it can.