Python plugin: Presence detection from wireless router

Python and python framework

Moderator: leecollings

EscApe
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

Post by EscApe »

hjzwiers wrote: Wednesday 16 August 2023 14:04 Status: iDetect: 192.168.2.1 ====> SSH connection established

After a restart of the complete system, works.
Great! Tanks for the update.
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

Dear EscApe,

I have 2 raspberry pi 3b.
i-Detect works perfectly on 1 raspberry with Debian 10.10 and Domoticz 2022.2.
On the 2nd raspberry to test with Bullseye and Domoticz 2023.2, i-Detect does not work, many errors.
Exactly the same i-Detect setting on both systems.
Both systems have their own IP address and port number
Nothing has changed in the router either.
Can this be solved?

Code: Select all

2023-10-12 11:26:46.064 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-12 11:26:51.603 Status: [web:7XXX] Incoming connection from: 192.168.X.XXX
2023-10-12 11:26:56.083 Status: iDetect: Skip this hearbeat ... system is still preparing


2023-10-13 12:21:03.092 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:21:13.108 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:21:23.075 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:21:33.093 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:21:43.063 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:21:53.079 Status: iDetect: Skip this hearbeat ... system is still preparing

2023-10-13 12:42:28.820 Status: iDetect: 192.168.X.X ====> SSH connection established

2023-10-13 12:42:48.844 iDetect: 192.168.X.X Could not be polled
2023-10-13 12:42:48.844 Status: iDetect: 192.168.X.X  ====> SSH resetting connection

2023-10-13 12:43:35.900 iDetect: Worker thread started.
2023-10-13 12:43:35.699 Status: iDetect: Stop directive received.
2023-10-13 12:43:35.851 Status: iDetect: Exiting work loop.
2023-10-13 12:43:35.899 Status: iDetect: Stopping threads.
2023-10-13 12:43:35.899 Status: iDetect: Stopped.
2023-10-13 12:43:35.900 Status: iDetect: Started.
2023-10-13 12:43:35.900 Status: iDetect: Entering work loop.
2023-10-13 12:43:36.294 Status: iDetect: Initialized version 2.4, author 'ESCape'
2023-10-13 12:43:45.072 Status: iDetect: Skip this hearbeat ... system is still preparing

2023-10-13 12:44:15.067 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:44:25.090 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-13 12:44:35.107 Status: iDetect: Skip this hearbeat ... system is still preparing
Attachments
DeepinSchermafdruk_Gebied selecteren_20231013120709.png
DeepinSchermafdruk_Gebied selecteren_20231013120709.png (36.21 KiB) Viewed 8821 times
DeepinSchermafdruk_Gebied selecteren_20231012112639.png
DeepinSchermafdruk_Gebied selecteren_20231012112639.png (39.34 KiB) Viewed 8821 times
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

Hi Fred,

The most likely reason is a required module that is not installed on the 2nd rpi. I cant't tell much from the limited log. If you need more help then please enable debugging and share a log from the moment the plugin is started for the first time.
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Friday 13 October 2023 17:02 Hi Fred,

The most likely reason is a required module that is not installed on the 2nd rpi. I cant't tell much from the limited log. If you need more help then please enable debugging and share a log from the moment the plugin is started for the first time.
Hi EscApe,
Thanks for the quick reply.
I enabled the debug and restarted the system.
After 15 minutes I restarted Domoticz again. In both cases there is nothing in the Domoticz log. I hope that the information from 'All' and 'Status' is sufficient for the diagnosis

Allemaal

Code: Select all

2023-10-13 19:51:26.657 Status: Domoticz V2023.2 (c)2012-2023 GizMoCuz
2023-10-13 19:51:26.657 Status: Build Hash: 19efd039c, Date: 2023-07-21 17:23:44
2023-10-13 19:51:26.657 Status: Startup Path: /home/fredom/domoticz/
2023-10-13 19:51:27.730 Status: PluginSystem: Started, Python version '3.9.2', 4 plugin definitions loaded.
2023-10-13 19:51:28.191 Status: WebServer(HTTP) started on address: :: with port 7575
2023-10-13 19:51:28.252 Status: WebServer(SSL) started on address: :: with port 443
2023-10-13 19:51:28.262 Status: TCPServer: shared server started...
2023-10-13 19:51:28.263 Status: RxQueue: queue worker started...
2023-10-13 19:51:30.263 Status: iDetect: Entering work loop.
2023-10-13 19:51:30.263 Status: iDetect: Started.
2023-10-13 19:51:30.264 Status: L 360 P: Started.
2023-10-13 19:51:30.264 Status: L 360 P: Entering work loop.
2023-10-13 19:51:30.264 Status: RFXCom: Worker started...
2023-10-13 19:51:30.264 Status: Honeywell: Worker started...
2023-10-13 19:51:30.265 Status: Buienradar: using Domoticz location settings (51.92273,4.605)
2023-10-13 19:51:30.265 Status: Buienradar: Worker started...
2023-10-13 19:51:30.265 Status: Zonnepanelen: Worker started...
2023-10-13 19:51:30.265 Status: NotificationSystem: thread started...
2023-10-13 19:51:30.275 Status: EventSystem: reset all events...
2023-10-13 19:51:30.294 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/isDonker.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Mobiel binnen Tuis aan.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Deuren open of gesloten.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Deur open melding Telegram.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Ramen open of gesloten.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Wan IP checker.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Screens logeerkamer.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Screens slaapkamer.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Stook alarm.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/WCD garage buiten.lua
2023-10-13 19:51:30.297 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/DB Check.lua
2023-10-13 19:51:30.297 Status: EventSystem: reset all device statuses...
2023-10-13 19:51:30.474 Status: PluginSystem: 2 plugins started.
2023-10-13 19:51:30.600 Status: iDetect: Initialized version 2.4, author 'ESCape'
2023-10-13 19:51:31.061 Status: Python EventSystem: Initializing event module.
2023-10-13 19:51:31.061 Status: EventSystem: Started
2023-10-13 19:51:31.061 Status: EventSystem: Queue thread started...
2023-10-13 19:51:31.267 Status: RFXCom: Using serial port: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1YI4QDJ-if00-port0
2023-10-13 19:51:32.694 Status: L 360 P: Initialized version 2.3.1, author 'febalci'
2023-10-13 19:51:34.650 Status: Zonnepanelen: Connected, serial: 122219063224, software: D7.6.175
2023-10-13 19:51:35.346 Status: iDetect: Starting address:192.168.1.1, port:None, user:admin, keyfile:, class:ssh_autodetect and poll interval:15
2023-10-13 19:51:35.496 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:51:35.641 Status: iDetect: 192.168.1.1 Tracker initialized
2023-10-13 19:51:38.122 Status: Buienradar: Nearest Station: Meetstation Rotterdam (Rotterdam), Distance: 11.1 km, ID: 6344, Lat/Lon: 51.95,4.45
2023-10-13 19:51:55.367 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:52:00.175 Status: dzVents: Info: ------ Start external script: script_time_garbagecalendar.lua:, trigger: "Every 1 minutes"
2023-10-13 19:52:00.402 Status: dzVents: Info: ------ Finished script_time_garbagecalendar.lua
2023-10-13 19:52:00.411 Status: LUA: ***************** start pingen *******************
2023-10-13 19:52:01.476 Status: LUA: ping fail Mobiel Fred
2023-10-13 19:52:02.711 Status: LUA: ping fail Mobiel Hanny
2023-10-13 19:52:02.711 Status: LUA: ***************** end pingen *******************
2023-10-13 19:52:02.716 Status: EventSystem: Script event triggered: Ping script Lua
2023-10-13 19:52:10.479 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:52:30.506 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:52:45.723 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:53:00.177 Status: dzVents: Info: ------ Start external script: script_time_garbagecalendar.lua:, trigger: "Every 1 minutes"
2023-10-13 19:53:00.199 Status: dzVents: Info: ------ Finished script_time_garbagecalendar.lua
2023-10-13 19:53:00.211 Status: LUA: ***************** start pingen *******************
2023-10-13 19:53:01.236 Status: LUA: ping fail Mobiel Fred
2023-10-13 19:53:02.243 Status: LUA: ping fail Mobiel Hanny
2023-10-13 19:53:02.243 Status: LUA: ***************** end pingen *******************
2023-10-13 19:53:05.759 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:53:20.912 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:53:40.930 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:53:56.043 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:54:00.240 Status: dzVents: Info: ------ Start external script: script_time_garbagecalendar.lua:, trigger: "Every 1 minutes"
2023-10-13 19:54:00.255 Status: dzVents: Info: ------ Finished script_time_garbagecalendar.lua
2023-10-13 19:54:00.268 Status: LUA: ***************** start pingen *******************
2023-10-13 19:54:01.283 Status: LUA: ping fail Mobiel Fred
2023-10-13 19:54:01.748 Status: LUA: ping success Mobiel Hanny
2023-10-13 19:54:01.748 Status: LUA: ***************** end pingen *******************
2023-10-13 19:54:01.756 Status: EventSystem: Script event triggered: Ping script Lua
2023-10-13 19:54:11.044 iDetect: 192.168.1.1 Timed poll starting like clockwork
2023-10-13 19:54:11.044 iDetect: 192.168.1.1 Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x676cf8f8>>
2023-10-13 19:54:11.044 iDetect: 192.168.1.1 ====> SSH Fetching data using: /usr/sbin/wl -i eth6 assoclist
2023-10-13 19:54:11.044 /usr/sbin/wl -i eth7 assoclist
2023-10-13 19:54:11.044 /usr/sbin/wl -i wl0.1 assoclist
2023-10-13 19:54:11.044 /usr/sbin/wl -i wl1.1 assoclist
2023-10-13 19:54:11.044 exit
2023-10-13 19:54:16.058 iDetect: 192.168.1.1 ====> SSH tried for 13 milliseconds.
2023-10-13 19:54:16.058 iDetect: 192.168.1.1 Could not be polled
2023-10-13 19:54:16.058 iDetect: 192.168.1.1 keep the clockwork ticking
2023-10-13 19:54:16.058 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:54:20.062 iDetect: onHeartbeat called
2023-10-13 19:54:20.063 iDetect: 0 devices are present (excluding ignored devices)
2023-10-13 19:54:30.083 iDetect: onHeartbeat called
2023-10-13 19:54:30.084 iDetect: 0 devices are present (excluding ignored devices)
2023-10-13 19:54:31.059 iDetect: 192.168.1.1 Timed poll starting like clockwork
2023-10-13 19:54:31.059 iDetect: 192.168.1.1 Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x676cf8f8>>
2023-10-13 19:54:31.059 iDetect: 192.168.1.1 ====> SSH Fetching data using: /usr/sbin/wl -i eth6 assoclist
2023-10-13 19:54:31.059 /usr/sbin/wl -i eth7 assoclist
2023-10-13 19:54:31.059 /usr/sbin/wl -i wl0.1 assoclist
2023-10-13 19:54:31.059 /usr/sbin/wl -i wl1.1 assoclist
2023-10-13 19:54:31.059 exit
2023-10-13 19:54:31.059 iDetect: 192.168.1.1 ====> SSH not connected ... connecting
2023-10-13 19:54:31.059 iDetect: 192.168.1.1 ====> SSH start connect on port 22
2023-10-13 19:54:31.215 iDetect: 192.168.1.1 Could not be polled
2023-10-13 19:54:31.215 iDetect: 192.168.1.1 keep the clockwork ticking
2023-10-13 19:54:31.215 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:54:40.058 iDetect: onHeartbeat called
2023-10-13 19:54:40.059 iDetect: 0 devices are present (excluding ignored devices)
2023-10-13 19:54:46.216 iDetect: 192.168.1.1 Timed poll starting like clockwork
2023-10-13 19:54:46.216 iDetect: 192.168.1.1 Start poll and return results to <bound method tracker.receiver_callback of <trackers.ssh_autodetect.ssh_autodetect object at 0x676cf8f8>>
2023-10-13 19:54:46.216 iDetect: 192.168.1.1 ====> SSH Fetching data using: /usr/sbin/wl -i eth6 assoclist
2023-10-13 19:54:46.216 /usr/sbin/wl -i eth7 assoclist
2023-10-13 19:54:46.216 /usr/sbin/wl -i wl0.1 assoclist
2023-10-13 19:54:46.216 /usr/sbin/wl -i wl1.1 assoclist
2023-10-13 19:54:46.216 exit
2023-10-13 19:54:50.076 iDetect: onHeartbeat called
2023-10-13 19:54:50.077 iDetect: 0 devices are present (excluding ignored devices)
2023-10-13 19:54:51.232 iDetect: 192.168.1.1 ====> SSH tried for 16 milliseconds.
2023-10-13 19:54:51.233 iDetect: 192.168.1.1 Could not be polled
2023-10-13 19:54:51.233 iDetect: 192.168.1.1 keep the clockwork ticking
2023-10-13 19:54:51.232 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:55:00.023 RFXCom: Temp (Unknown)
2023-10-13 19:55:00.099 iDetect: onHeartbeat called
2023-10-13 19:55:00.100 iDetect: 0 devices are present (excluding ignored devices)
Status

Code: Select all

2023-10-13 19:51:26.657 Status: Domoticz V2023.2 (c)2012-2023 GizMoCuz
2023-10-13 19:51:26.657 Status: Build Hash: 19efd039c, Date: 2023-07-21 17:23:44
2023-10-13 19:51:26.657 Status: Startup Path: /home/fredom/domoticz/
2023-10-13 19:51:27.730 Status: PluginSystem: Started, Python version '3.9.2', 4 plugin definitions loaded.
2023-10-13 19:51:28.191 Status: WebServer(HTTP) started on address: :: with port 7575
2023-10-13 19:51:28.252 Status: WebServer(SSL) started on address: :: with port 443
2023-10-13 19:51:28.262 Status: TCPServer: shared server started...
2023-10-13 19:51:28.263 Status: RxQueue: queue worker started...
2023-10-13 19:51:30.263 Status: iDetect: Entering work loop.
2023-10-13 19:51:30.263 Status: iDetect: Started.
2023-10-13 19:51:30.264 Status: L 360 P: Started.
2023-10-13 19:51:30.264 Status: L 360 P: Entering work loop.
2023-10-13 19:51:30.264 Status: RFXCom: Worker started...
2023-10-13 19:51:30.264 Status: Honeywell: Worker started...
2023-10-13 19:51:30.265 Status: Buienradar: using Domoticz location settings (51.92273,4.605)
2023-10-13 19:51:30.265 Status: Buienradar: Worker started...
2023-10-13 19:51:30.265 Status: Zonnepanelen: Worker started...
2023-10-13 19:51:30.265 Status: NotificationSystem: thread started...
2023-10-13 19:51:30.275 Status: EventSystem: reset all events...
2023-10-13 19:51:30.294 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/isDonker.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Mobiel binnen Tuis aan.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Deuren open of gesloten.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Deur open melding Telegram.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Ramen open of gesloten.lua
2023-10-13 19:51:30.295 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Wan IP checker.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Screens logeerkamer.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Screens slaapkamer.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Stook alarm.lua
2023-10-13 19:51:30.296 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/WCD garage buiten.lua
2023-10-13 19:51:30.297 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/DB Check.lua
2023-10-13 19:51:30.297 Status: EventSystem: reset all device statuses...
2023-10-13 19:51:30.474 Status: PluginSystem: 2 plugins started.
2023-10-13 19:51:30.600 Status: iDetect: Initialized version 2.4, author 'ESCape'
2023-10-13 19:51:31.061 Status: Python EventSystem: Initializing event module.
2023-10-13 19:51:31.061 Status: EventSystem: Started
2023-10-13 19:51:31.061 Status: EventSystem: Queue thread started...
2023-10-13 19:51:31.267 Status: RFXCom: Using serial port: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1YI4QDJ-if00-port0
2023-10-13 19:51:32.694 Status: L 360 P: Initialized version 2.3.1, author 'febalci'
2023-10-13 19:51:34.650 Status: Zonnepanelen: Connected, serial: 122219063224, software: D7.6.175
2023-10-13 19:51:35.346 Status: iDetect: Starting address:192.168.1.1, port:None, user:admin, keyfile:, class:ssh_autodetect and poll interval:15
2023-10-13 19:51:35.496 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:51:35.641 Status: iDetect: 192.168.1.1 Tracker initialized
2023-10-13 19:51:38.122 Status: Buienradar: Nearest Station: Meetstation Rotterdam (Rotterdam), Distance: 11.1 km, ID: 6344, Lat/Lon: 51.95,4.45
2023-10-13 19:51:55.367 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:52:00.175 Status: dzVents: Info: ------ Start external script: script_time_garbagecalendar.lua:, trigger: "Every 1 minutes"
2023-10-13 19:52:00.402 Status: dzVents: Info: ------ Finished script_time_garbagecalendar.lua
2023-10-13 19:52:00.411 Status: LUA: ***************** start pingen *******************
2023-10-13 19:52:01.476 Status: LUA: ping fail Mobiel Fred
2023-10-13 19:52:02.711 Status: LUA: ping fail Mobiel Hanny
2023-10-13 19:52:02.711 Status: LUA: ***************** end pingen *******************
2023-10-13 19:52:02.716 Status: EventSystem: Script event triggered: Ping script Lua
2023-10-13 19:52:10.479 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:52:30.506 Status: iDetect: 192.168.1.1 ====> SSH resetting connection
2023-10-13 19:52:45.723 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 19:53:00.177 Status: dzVents: Info: ------ Start external script: script_time_garbagecalendar.lua:, trigger: "Every 1 minutes"
2023-10-13 19:53:00.199 Status: dzVents: Info: ------ Finished script_time_garbagecalendar.lua
After restart Domoticz

Code: Select all

2023-10-13 20:05:09.424 Status: TCPServer: shared server started...
2023-10-13 20:05:09.425 Status: RxQueue: queue worker started...
2023-10-13 20:05:11.425 Status: iDetect: Entering work loop.
2023-10-13 20:05:11.426 Status: iDetect: Started.
2023-10-13 20:05:11.426 Status: L 360 P: Started.
2023-10-13 20:05:11.426 Status: L 360 P: Entering work loop.
2023-10-13 20:05:11.426 Status: RFXCom: Worker started...
2023-10-13 20:05:11.426 Status: Honeywell: Worker started...
2023-10-13 20:05:11.427 Status: Buienradar: using Domoticz location settings (51.92273,4.605)
2023-10-13 20:05:11.427 Status: Buienradar: Worker started...
2023-10-13 20:05:11.428 Status: Zonnepanelen: Worker started...
2023-10-13 20:05:11.428 Status: NotificationSystem: thread started...
2023-10-13 20:05:11.429 Status: EventSystem: reset all events...
2023-10-13 20:05:11.447 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/isDonker.lua
2023-10-13 20:05:11.447 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Mobiel binnen Tuis aan.lua
2023-10-13 20:05:11.447 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Deuren open of gesloten.lua
2023-10-13 20:05:11.448 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Deur open melding Telegram.lua
2023-10-13 20:05:11.448 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Ramen open of gesloten.lua
2023-10-13 20:05:11.448 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Wan IP checker.lua
2023-10-13 20:05:11.448 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Screens logeerkamer.lua
2023-10-13 20:05:11.448 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Screens slaapkamer.lua
2023-10-13 20:05:11.449 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/Stook alarm.lua
2023-10-13 20:05:11.449 Status: dzVents: Write file: /home/fredom/domoticz/scripts/dzVents/generated_scripts/WCD garage buiten.lua
2023-10-13 20:05:11.449 Status: EventSystem: reset all device statuses...
2023-10-13 20:05:11.615 Status: PluginSystem: 2 plugins started.
2023-10-13 20:05:11.921 Status: iDetect: Initialized version 2.4, author 'ESCape'
2023-10-13 20:05:12.215 Status: Python EventSystem: Initializing event module.
2023-10-13 20:05:12.219 Status: EventSystem: Started
2023-10-13 20:05:12.219 Status: EventSystem: Queue thread started...
2023-10-13 20:05:12.429 Status: RFXCom: Using serial port: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1YI4QDJ-if00-port0
2023-10-13 20:05:12.521 Status: L 360 P: Initialized version 2.3.1, author 'febalci'
2023-10-13 20:05:14.013 iDetect: Laptop HP Hanny monitor tag_id:38:00:25:1E:3D:2C, domoticz unit:17
2023-10-13 20:05:14.013 iDetect: start get or create wireless device
2023-10-13 20:05:14.013 iDetect: envoy monitor tag_id:30:E2:83:AA:47:99, domoticz unit:3
2023-10-13 20:05:14.013 iDetect: start get or create wireless device
2023-10-13 20:05:14.013 iDetect: Mobiel Mandy monitor tag_id:D6:C1:92:DF:6A:72, domoticz unit:13
2023-10-13 20:05:14.013 iDetect: start get or create wireless device
2023-10-13 20:05:14.013 iDetect: Mobiel Mariska monitor tag_id:FE:6B:5E:6A:47:1D, domoticz unit:14
2023-10-13 20:05:14.013 iDetect: start get or create wireless device
2023-10-13 20:05:14.013 iDetect: Mobiel Nils monitor tag_id:02:42:D8:E1:77:D2, domoticz unit:15
2023-10-13 20:05:14.013 iDetect: start get or create wireless device
2023-10-13 20:05:14.013 iDetect: Mobiel Barney monitor tag_id:BE:EA:C6:7D:26:78, domoticz unit:16
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: Sony Bravia TV monitor tag_id:00:A0:96:9D:1A:E6, domoticz unit:2
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: HP Printer monitor tag_id:EC:8E:B5:1A:8D:16, domoticz unit:12
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: Laptop Fred monitor tag_id:80:A5:89:9D:93:D1, domoticz unit:4
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: Synology monitor tag_id:00:11:32:64:0F:ED, domoticz unit:6
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: Laptop (Netflix) monitor tag_id:48:D2:24:69:0E:95, domoticz unit:7
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: Sony playstation monitor tag_id:FC:0F:E6:B8:27:CC, domoticz unit:8
2023-10-13 20:05:14.014 iDetect: start get or create wireless device
2023-10-13 20:05:14.014 iDetect: Camara voortuin monitor tag_id:30:FF:F6:53:C8:1A, domoticz unit:9
2023-10-13 20:05:14.015 iDetect: start get or create wireless device
2023-10-13 20:05:14.015 iDetect: Camera achtertuin monitor tag_id:30:FF:F6:53:C8:4B, domoticz unit:10
2023-10-13 20:05:14.015 iDetect: start get or create wireless device
2023-10-13 20:05:14.015 iDetect: Binnen camera monitor tag_id:30:FF:F6:53:D0:F9, domoticz unit:11
2023-10-13 20:05:14.015 iDetect: Monitoring {'9E:3F:87:C7:6A:B3': <plugin.tag_device object at 0x6e28dee0>, '1A:20:F4:03:F9:75': <plugin.tag_device object at 0x6e2ec370>, '58:A0:23:F3:73:FC': <plugin.tag_device object at 0x6e2ec418>, '38:00:25:1E:3D:2C': <plugin.tag_device object at 0x678a5598>, '30:E2:83:AA:47:99': <plugin.tag_device object at 0x678a5490>, 'D6:C1:92:DF:6A:72': <plugin.tag_device object at 0x678a5580>, 'FE:6B:5E:6A:47:1D': <plugin.tag_device object at 0x678a5478>, '02:42:D8:E1:77:D2': <plugin.tag_device object at 0x678a5640>, 'BE:EA:C6:7D:26:78': <plugin.tag_device object at 0x678a5700>, '00:A0:96:9D:1A:E6': <plugin.tag_device object at 0x678a5730>, 'EC:8E:B5:1A:8D:16': <plugin.tag_device object at 0x678a5778>, '80:A5:89:9D:93:D1': <plugin.tag_device object at 0x678a57a8>, '00:11:32:64:0F:ED': <plugin.tag_device object at 0x678a57d8>, '48:D2:24:69:0E:95': <plugin.tag_device object at 0x678a5808>, 'FC:0F:E6:B8:27:CC': <plugin.tag_device object at 0x678a5838>, '30:FF:F6:53:C8:1A': <plugin.tag_device object at 0x678a5868>, '30:FF:F6:53:C8:4B': <plugin.tag_device object at 0x678a5898>, '30:FF:F6:53:D0:F9': <plugin.tag_device object at 0x678a58c8>} for presence.
2023-10-13 20:05:14.015 iDetect: Tracker configuration:192.168.1.1
2023-10-13 20:05:14.015 iDetect: Configuring tracker:192.168.1.1
2023-10-13 20:05:14.015 iDetect: options:
2023-10-13 20:05:14.015 iDetect: loaded module is:ssh_autodetect for type:default
2023-10-13 20:05:14.017 iDetect: 192.168.1.1 Tracker is of the ssh kind
2023-10-13 20:05:14.017 iDetect: 192.168.1.1 ====> SSH start connect on port 22
2023-10-13 20:05:14.173 iDetect: 192.168.1.1 ====> SSH Fetching data using:
2023-10-13 20:05:14.173 export PATH=/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:$PATH
2023-10-13 20:05:14.173 type wl
2023-10-13 20:05:14.173 type iwinfo
2023-10-13 20:05:14.173 type wlanconfig
2023-10-13 20:05:14.173 type wl_atheros
2023-10-13 20:05:14.173 type qcsapi_sockrpc
2023-10-13 20:05:14.173 type ip
2023-10-13 20:05:14.173 type brctl
2023-10-13 20:05:14.173 type arp
2023-10-13 20:05:14.173 [ -f /proc/net/arp ] && type cat
2023-10-13 20:05:14.173 echo 0
2023-10-13 20:05:14.173 exit
2023-10-13 20:05:14.189 iDetect: 192.168.1.1 ====> SSH returned (decoded):wl is /usr/sbin/wl
2023-10-13 20:05:14.189 iwinfo: not found
2023-10-13 20:05:14.189 wlanconfig: not found
2023-10-13 20:05:14.189 wl_atheros: not found
2023-10-13 20:05:14.189 qcsapi_sockrpc: not found
2023-10-13 20:05:14.189 ip is /usr/sbin/ip
2023-10-13 20:05:14.189 brctl is /bin/brctl
2023-10-13 20:05:14.189 arp is /sbin/arp
2023-10-13 20:05:14.189 cat is /bin/cat
2023-10-13 20:05:14.189 0
2023-10-13 20:05:14.189
2023-10-13 20:05:14.190 iDetect: 192.168.1.1 ====> SSH session took 16 milliseconds.
2023-10-13 20:05:14.191 iDetect: Available commands on 192.168.1.1:{'wl': '/usr/sbin/wl', 'ip': '/usr/sbin/ip', 'brctl': '/bin/brctl', 'arp': '/sbin/arp', 'cat': '/bin/cat'}
2023-10-13 20:05:14.191 iDetect: 192.168.1.1 ====> SSH Fetching data using:
2023-10-13 20:05:14.191 for iface in $(ifconfig | cut -d ' ' -f1| tr ':' '
2023-10-13 20:05:14.191 ' | grep -E '^eth|^wlan|^wl');do
2023-10-13 20:05:14.191 /usr/sbin/wl -i $iface assoclist > /dev/null 2>&1 && printf "~$iface"
2023-10-13 20:05:14.191 done
2023-10-13 20:05:14.191 exit
2023-10-13 20:05:14.301 iDetect: 192.168.1.1 ====> SSH returned (decoded):~eth6~eth7~wl0.1~wl1.1
2023-10-13 20:05:14.301 iDetect: 192.168.1.1 ====> SSH session took 109 milliseconds.
2023-10-13 20:05:14.302 iDetect: 192.168.1.1 Available interfaces for wl: ['eth6', 'eth7', 'wl0.1', 'wl1.1']
2023-10-13 20:05:14.302 iDetect: 192.168.1.1 Prepared to poll using: /usr/sbin/wl -i eth6 assoclist
2023-10-13 20:05:14.302 /usr/sbin/wl -i eth7 assoclist
2023-10-13 20:05:14.302 /usr/sbin/wl -i wl0.1 assoclist
2023-10-13 20:05:14.302 /usr/sbin/wl -i wl1.1 assoclist
2023-10-13 20:05:14.302 exit
2023-10-13 20:05:14.302 iDetect: 192.168.1.1 tracker will autodetect ssh cli
2023-10-13 20:05:14.302 iDetect: 192.168.1.1 Data will be received and interpreted by <bound method BasePlugin.onDataReceive of <plugin.BasePlugin object at 0x6e2d0718>>
2023-10-13 20:05:14.302 iDetect: Tracker config:192.168.1.1, custom host:192.168.1.1, port:None, user:admin, type:default and options:{}
2023-10-13 20:05:14.302 iDetect: Trackers initialized as:{'192.168.1.1': <trackers.ssh_autodetect.ssh_autodetect object at 0x678a58f8>}
2023-10-13 20:05:14.302 iDetect: Heartbeat interval set to: 10.
2023-10-13 20:05:14.016 Status: iDetect: Starting address:192.168.1.1, port:None, user:admin, keyfile:, class:ssh_autodetect and poll interval:15
2023-10-13 20:05:14.173 Status: iDetect: 192.168.1.1 ====> SSH connection established
2023-10-13 20:05:14.302 Status: iDetect: 192.168.1.1 Tracker initialized
2023-10-13 20:05:15.634 Status: Zonnepanelen: Connected, serial: 122219063224, software: D7.6.175
2023-10-13 20:05:18.132 Zonnepanelen: General/kWh (Inv 482220056884)
2023-10-13 20:05:18.145 Zonnepanelen: General/kWh (Inv 482220068278)
2023-10-13 20:05:18.155 Zonnepanelen: General/kWh (Inv 482220068479)
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

Can you ssh into the router, run the code below on it and share the output?

Code: Select all

/usr/sbin/wl -i eth6 assoclist
/usr/sbin/wl -i eth7 assoclist
/usr/sbin/wl -i wl0.1 assoclist
/usr/sbin/wl -i wl1.1 assoclist
exit
EscApe
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

Post by EscApe »

Never mind the previous request. It worked on the other rpi, so the router should not be the problem. Maybe it is a compatibility issue with the paramiko version. I do have an alternative version that does not use paramiko, but that is a work in progress. Will see if I can share that version this weekend.
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Friday 13 October 2023 21:30 Never mind the previous request. It worked on the other rpi, so the router should not be the problem. Maybe it is a compatibility issue with the paramiko version. I do have an alternative version that does not use paramiko, but that is a work in progress. Will see if I can share that version this weekend.
Hoi EscApe,
That would be great
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

Fredom wrote: Friday 13 October 2023 23:21
EscApe wrote: Friday 13 October 2023 21:30 Never mind the previous request. It worked on the other rpi, so the router should not be the problem. Maybe it is a compatibility issue with the paramiko version. I do have an alternative version that does not use paramiko, but that is a work in progress. Will see if I can share that version this weekend.
Hoi EscApe,
That would be great
I could not find my previous work in progress, so I'm afraid I just did not keep that experiment. For further troubleshooting I can share some info on my setup. I am also running bullseye with the following python modules (and versions!). I do not use the ssh tracker anymore, but have tested it on an Asus ac68u. The Domoticz setup is running in a docker container. That is not a requirement, but that way linux or python updates that I need on the host will not influence Domoticz.

Code: Select all

Package            Version
------------------ ---------
async-timeout      4.0.2
bcrypt             4.0.1
casttube           0.2.1
certifi            2023.7.22
cffi               1.15.1
charset-normalizer 3.2.0
click              8.1.6
cryptography       41.0.2
fritzconnection    1.12.2
gTTS               2.3.2
hwmon              1.0
idna               3.4
ifaddr             0.2.0
motionblinds       0.6.18
paho-mqtt          1.6.1
paramiko           3.2.0
pip                23.2.1
protobuf           4.23.4
PyChromecast       13.0.7
pycparser          2.21
pycryptodomex      3.18.0
PyNaCl             1.5.0
python-picnic-api  1.1.0
requests           2.31.0
setuptools         52.0.0
urllib3            2.0.4
wheel              0.34.2
zeroconf           0.71.0
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Wednesday 18 October 2023 7:33
Fredom wrote: Friday 13 October 2023 23:21
EscApe wrote: Friday 13 October 2023 21:30 Never mind the previous request. It worked on the other rpi, so the router should not be the problem. Maybe it is a compatibility issue with the paramiko version. I do have an alternative version that does not use paramiko, but that is a work in progress. Will see if I can share that version this weekend.
Hoi EscApe,
That would be great
I could not find my previous work in progress, so I'm afraid I just did not keep that experiment. For further troubleshooting I can share some info on my setup. I am also running bullseye with the following python modules (and versions!). I do not use the ssh tracker anymore, but have tested it on an Asus ac68u. The Domoticz setup is running in a docker container. That is not a requirement, but that way linux or python updates that I need on the host will not influence Domoticz.

Code: Select all

Package            Version
------------------ ---------
async-timeout      4.0.2
bcrypt             4.0.1
casttube           0.2.1
certifi            2023.7.22
cffi               1.15.1
charset-normalizer 3.2.0
click              8.1.6
cryptography       41.0.2
fritzconnection    1.12.2
gTTS               2.3.2
hwmon              1.0
idna               3.4
ifaddr             0.2.0
motionblinds       0.6.18
paho-mqtt          1.6.1
paramiko           3.2.0
pip                23.2.1
protobuf           4.23.4
PyChromecast       13.0.7
pycparser          2.21
pycryptodomex      3.18.0
PyNaCl             1.5.0
python-picnic-api  1.1.0
requests           2.31.0
setuptools         52.0.0
urllib3            2.0.4
wheel              0.34.2
zeroconf           0.71.0
Hi EscApe,
My knowledge is not great enough to see my setup, I have no idea how to do that. I now use a ping script for my cell phones as an emergency.
Almost all other devices that go via my Asus RT-AX 88U use the MAC address, so that unfortunately no longer works.
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

Fredom wrote: Thursday 19 October 2023 15:50 Hi EscApe,
My knowledge is not great enough to see my setup, I have no idea how to do that. I now use a ping script for my cell phones as an emergency.
Almost all other devices that go via my Asus RT-AX 88U use the MAC address, so that unfortunately no longer works.
I just pushed a new (beta) version that uses pssh instead of Paramiko. You could give that a try.
It is the 'DomoticzEx-based-beta' branch in my GitHub repo and you need to install the required parallel-ssh python module (see below).

The beta has lots of other changes, so please share any findings.

To install it run:

Code: Select all

pip install parallel-ssh
git clone -b DomoticzEx-based-beta https://github.com/d-EScape/Domoticz_iDetect.git iDetect
(the last 'iDetect' being the subfolder where it will be installed, so make sure you are running the command inside the mijn plugin folder)
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Monday 23 October 2023 9:33
Fredom wrote: Thursday 19 October 2023 15:50 Hi EscApe,
My knowledge is not great enough to see my setup, I have no idea how to do that. I now use a ping script for my cell phones as an emergency.
Almost all other devices that go via my Asus RT-AX 88U use the MAC address, so that unfortunately no longer works.
I just pushed a new (beta) version that uses pssh instead of Paramiko. You could give that a try.
It is the 'DomoticzEx-based-beta' branch in my GitHub repo and you need to install the required parallel-ssh python module (see below).

The beta has lots of other changes, so please share any findings.

To install it run:

Code: Select all

pip install parallel-ssh
git clone -b DomoticzEx-based-beta https://github.com/d-EScape/Domoticz_iDetect.git iDetect
(the last 'iDetect' being the subfolder where it will be installed, so make sure you are running the command inside the mijn plugin folder)
Hi EscApe,
I'm on holiday this week, but I'll get started on this next weekend.
Of course i let you no if it works or not
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Monday 23 October 2023 9:33
Fredom wrote: Thursday 19 October 2023 15:50 Hi EscApe,
My knowledge is not great enough to see my setup, I have no idea how to do that. I now use a ping script for my cell phones as an emergency.
Almost all other devices that go via my Asus RT-AX 88U use the MAC address, so that unfortunately no longer works.
I just pushed a new (beta) version that uses pssh instead of Paramiko. You could give that a try.
It is the 'DomoticzEx-based-beta' branch in my GitHub repo and you need to install the required parallel-ssh python module (see below).

The beta has lots of other changes, so please share any findings.

To install it run:

Code: Select all

pip install parallel-ssh
git clone -b DomoticzEx-based-beta https://github.com/d-EScape/Domoticz_iDetect.git iDetect
(the last 'iDetect' being the subfolder where it will be installed, so make sure you are running the command inside the mijn plugin folder)
Hi EscApe,
I'm leaving 2 days later so I could give your suggestion a try.
Unfortunately after installation and a restart it does not work and I get the error below.
I have not deleted the old installation. So I just installed over it. The error message only appeared during the restart and after that no more messages.

Code: Select all

2023-10-23 17:10:56.607 Error: iDetect: Call to function 'onStart' failed, exception details:
2023-10-23 17:10:56.636 Error: iDetect: Traceback (most recent call last):
2023-10-23 17:10:56.636 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 431, in onStart
2023-10-23 17:10:56.636 Error: iDetect: _plugin.onStart()
2023-10-23 17:10:56.636 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 212, in onStart
2023-10-23 17:10:56.636 Error: iDetect: from trackers import poll_methods
2023-10-23 17:10:56.637 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/trackers/__init__.py", line 6, in <module>
2023-10-23 17:10:56.637 Error: iDetect: from trackers.ssh_tracker import ssh_tracker
2023-10-23 17:10:56.637 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/trackers/ssh_tracker.py", line 8, in <module>
2023-10-23 17:10:56.637 Error: iDetect: import paramiko
2023-10-23 17:10:56.637 Error: iDetect: File "/usr/local/lib/python3.9/dist-packages/paramiko/__init__.py", line 22, in <module>
2023-10-23 17:10:56.637 Error: iDetect: from paramiko.transport import SecurityOptions, Transport
2023-10-23 17:10:56.637 Error: iDetect: File "/usr/local/lib/python3.9/dist-packages/paramiko/transport.py", line 33, in <module>
2023-10-23 17:10:56.637 Error: iDetect: from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
2023-10-23 17:10:56.637 Error: iDetect: File "/usr/local/lib/python3.9/dist-packages/cryptography/hazmat/primitives/ciphers/__init__.py", line 11, in <module>
2023-10-23 17:10:56.637 Error: iDetect: from cryptography.hazmat.primitives.ciphers.base import (
2023-10-23 17:10:56.637 Error: iDetect: File "/usr/local/lib/python3.9/dist-packages/cryptography/hazmat/primitives/ciphers/base.py", line 10, in <module>
2023-10-23 17:10:56.637 Error: iDetect: from cryptography.exceptions import (
2023-10-23 17:10:56.637 Error: iDetect: File "/usr/local/lib/python3.9/dist-packages/cryptography/exceptions.py", line 9, in <module>
2023-10-23 17:10:56.637 Error: iDetect: from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
2023-10-23 17:10:56.637 Error: iDetect: ImportError: PyO3 modules may only be initialized once per interpreter process
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

Looks like it is not using the new (beta) plugin, since the new plugin would not try to import Paramiko. Ik will import pssh instead.
What do you mean by 'installed over it'? Is it in the same folder or next to the existing folder?
You need to remove the old plugin folder. Otherwise Domoticz will have two folders containing a plugin with the same name and key.

Are you sure you installed the correct branch?
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Tuesday 24 October 2023 12:21 Looks like it is not using the new (beta) plugin, since the new plugin would not try to import Paramiko. Ik will import pssh instead.
What do you mean by 'installed over it'? Is it in the same folder or next to the existing folder?
You need to remove the old plugin folder. Otherwise Domoticz will have two folders containing a plugin with the same name and key.

Are you sure you installed the correct branch?
Hi EscApe,
Indeed, I did not delete the old folder. I will do this and redo the installation.
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Tuesday 24 October 2023 12:21 Looks like it is not using the new (beta) plugin, since the new plugin would not try to import Paramiko. Ik will import pssh instead.
What do you mean by 'installed over it'? Is it in the same folder or next to the existing folder?
You need to remove the old plugin folder. Otherwise Domoticz will have two folders containing a plugin with the same name and key.

Are you sure you installed the correct branch?
Hi EscApe,
I deleted all idetect folders and the hardware plugin.
Restarted and then entered your code in the domoticz plugin folder via the terminal.
Then I restarted again, now no errors, but it didn't work either. Then installed the hardware plugin and restarted.
It doesn't work yet, but there is another error.

Code: Select all

2023-10-24 13:21:17.622 Error: iDetect: Call to function 'onStart' failed, exception details:
2023-10-24 13:21:17.680 Error: iDetect: Traceback (most recent call last):
2023-10-24 13:21:17.680 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 442, in onStart
2023-10-24 13:21:17.680 Error: iDetect: _plugin.onStart()
2023-10-24 13:21:17.680 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 315, in onStart
2023-10-24 13:21:17.680 Error: iDetect: handle_unused_unit(d)
2023-10-24 13:21:17.680 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 177, in handle_unused_unit
2023-10-24 13:21:17.680 Error: iDetect: Devices[device].Units[unit].TimedOut=1
2023-10-24 13:21:17.680 Error: iDetect: AttributeError: 'DomoticzEx.Unit' object has no attribute 'TimedOut'
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

There should also be an (red) error message telling to delete the existing iDetect devices from Domoticz. The newer plugin framework handles device units differently. It should word after you deleted them (including the Override and Anyone devices). They will be recreated automatically.

Even so, the error message you're getting is a bug and I will fix that. (that piece of code will not be executed after you deleted the old devices)
Last edited by EscApe on Tuesday 24 October 2023 15:08, edited 3 times in total.
EscApe
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

Post by EscApe »

The error message is fixed in the beta repo.
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Tuesday 24 October 2023 15:06 The error message is fixed in the beta repo.
Hi EscApe,
I did a reboot and below is the outcome.
Unfortunately it doesn't work yet.
What should I do, delete everything and start over?
I'm using the stable versions

Code: Select all

2023-10-24 16:47:21.677 Error: iDetect: Call to function 'onStart' failed, exception details:
2023-10-24 16:47:21.816 Error: iDetect: Traceback (most recent call last):
2023-10-24 16:47:21.816 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 442, in onStart
2023-10-24 16:47:21.816 Error: iDetect: _plugin.onStart()
2023-10-24 16:47:21.816 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 315, in onStart
2023-10-24 16:47:21.816 Error: iDetect: handle_unused_unit(d)
2023-10-24 16:47:21.816 Error: iDetect: File "/home/fredom/domoticz/plugins/iDetect/plugin.py", line 177, in handle_unused_unit
2023-10-24 16:47:21.816 Error: iDetect: Devices[device].Units[unit].TimedOut=1
2023-10-24 16:47:21.817 Error: iDetect: AttributeError: 'DomoticzEx.Unit' object has no attribute 'TimedOut'
[code2023-10-24 16:48:21.095 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-24 16:48:31.080 Status: iDetect: Skip this hearbeat ... system is still preparing
2023-10-24 16:48:41.097 Status: iDetect: Skip this hearbeat ... system is still preparing][/code]
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
EscApe
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

Post by EscApe »

The log still mentions the bug a have already fixed. Looks like the plug-in was not updated to my latest changes (git pull)
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python plugin: Presence detection from wireless router

Post by Fredom »

EscApe wrote: Tuesday 24 October 2023 18:31 The log still mentions the bug a have already fixed. Looks like the plug-in was not updated to my latest changes (git pull)
Hi,
Okay, I have now done a gitt pull and now only 1 error

Code: Select all

2023-10-24 21:44:19.040 Error: iDetect: Required modules for default tracker are not installed:No module named 'pssh'
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest