Python Plugin : Broadlink

Python and python framework

Moderator: leecollings

kollemt
Posts: 29
Joined: Monday 18 February 2019 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Python Plugin : Broadlink

Post by kollemt »

192.168.178.*
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

ok, you need also 127.0.0.*
kollemt
Posts: 29
Joined: Monday 18 February 2019 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Python Plugin : Broadlink

Post by kollemt »

Added and rebooted
Same problem Failed to load plugin.py
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

ok, normal, but now the installation sould be ok and you should be able to see log file, hope no more error HTTP 401.

please confirm.

After, another test you can do:
disable hardware IDX 16 (woonkamer)
add another 'Broadlink with Kodi remote' hardware ( non existing IP address and non used Listener Port )
add another 'Broadlink with Kodi remote' hardware ( with same data as woonkamer )

lets see what happend ....
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

Hummm... just a warning... if you do that on your production system, hope you have a backup... we don't know what could happened !!!!
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

and if still ptoblem, maybe check the 'rights' on your Broadlink folder.
My advice will be to put 777 ( in recursive way ).
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

ok, after some reboot and deep testing, have been able to see this error on my windows system:
Spoiler: show
2022-02-07 13:45:28.560 Error: rm2: (Broadlink) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Broadlink\;C:\Program Files (x86)\Python37-32\python37.zip;C:\Program Files (x86)\Python37-32\Lib\;C:\Program Files (x86)\Python37-32\DLLs\;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python37-32;C:\Program Files (x86)\Python37-32\lib\site-packages'.
2022-02-07 13:45:28.560 Error: rm2: Module Import failed, exception: 'InternalError'
2022-02-07 13:45:28.560 Error: rm2: Error Line details not available.
2022-02-07 13:45:28.560 Error: rm2: Exception traceback:
2022-02-07 13:45:28.560 Error: rm2: ----> Line 168 in 'C:\Program Files (x86)\Domoticz\plugins\Broadlink\plugin.py'
2022-02-07 13:45:28.560 Error: rm2: ----> Line 622 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 229 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 233 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 15 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\backends\__init__.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 7 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\backends\openssl\__init__.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 75 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 203 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 152 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 135 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 121 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py'
2022-02-07 13:45:28.561 Error: rm2: ----> Line 79 in 'C:\Program Files (x86)\Python37-32\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py'
2022-02-07 13:45:39.715 Error: rm3: Traceback (most recent call last):
2022-02-07 13:45:39.715 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 369, in send_packet
2022-02-07 13:45:39.715 response = cs.recvfrom(2048)
2022-02-07 13:45:39.715 socket.timeout: timed out
2022-02-07 13:45:39.715
2022-02-07 13:45:39.715 During handling of the above exception, another exception occurred:
this is my test system:
Version: 2021.1 (build 13954)
Build Hash: 43ee2af49
Compile Date: 2021-12-23 23:07:32
dzVents Version: 3.1.8
Python Version: 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 14 2019, 23:09:19) [MSC v.1916 32 bit (Intel)]
OS : windows 10

Have tried the same on another one (production), no error until now.
this is the version:
Version: 2020.2 (build 13065)
Build Hash: e31c70c24
Compile Date: 2021-03-11 09:49:29
dzVents Version: 3.1.6
Python Version: 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 18 2019, 23:46:00) [MSC v.1916 32 bit (Intel)]
OS: windows 10


I had also put debug mode to 'All' on both.
On production, when restart the plugin, never receive error , but on test always:
2022-02-07 13:55:04.290 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 13:55:04.291 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
see this topic:
viewtopic.php?t=37043

this happend during the onStop() call:
Spoiler: show
2022-02-07 13:58:00.899 rm2: onDisconnect called for connection BROWebServer
2022-02-07 13:58:00.899 rm2: Server Connections:
2022-02-07 13:58:00.900 rm2: onStop called
2022-02-07 13:58:00.898 Status: rm2: Stop directive received.
2022-02-07 13:58:00.934 Status: rm2: Exiting work loop.
2022-02-07 13:58:00.916 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 13:58:00.916 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 13:58:01.014 rm2: Worker thread started.
2022-02-07 13:58:01.345 rm2: Debug logging mask set to: PYTHON
2022-02-07 13:58:01.345 rm2: 'HardwareID':'10'
2022-02-07 13:58:01.345 rm2: 'HomeFolder':'C:\Program Files (x86)\Domoticz\plugins\Broadlink\'
2022-02-07 13:58:01.345 rm2: 'StartupFolder':'C:\Program Files (x86)\Domoticz\'
2022-02-07 13:58:01.346 rm2: 'UserDataFolder':'C:\Program Files (x86)\Domoticz\'
2022-02-07 13:58:01.346 rm2: 'Database':'C:\Program Files (x86)\Domoticz\domoticz.db'
2022-02-07 13:58:01.346 rm2: 'Language':'en'
2022-02-07 13:58:01.346 rm2: 'Version':'1.6.3'
2022-02-07 13:58:01.347 rm2: 'Author':'zak45'
2022-02-07 13:58:01.347 rm2: 'Name':'rm2'
2022-02-07 13:58:01.347 rm2: 'Address':'192.168.1.17'
2022-02-07 13:58:01.347 rm2: 'Port':'8080'
2022-02-07 13:58:01.347 rm2: 'Key':'Broadlink'
2022-02-07 13:58:01.347 rm2: 'Mode1':'b4430dda260b'
2022-02-07 13:58:01.347 rm2: 'Mode2':'C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/'
2022-02-07 13:58:01.347 rm2: 'Mode3':'RM2'
2022-02-07 13:58:01.347 rm2: 'Mode4':'192.168.1.33'
2022-02-07 13:58:01.347 rm2: 'Mode5':'9000'
2022-02-07 13:58:01.347 rm2: 'Mode6':'2'
2022-02-07 13:58:01.347 rm2: 'DomoticzVersion':'2021.1 (build 13954)'
2022-02-07 13:58:01.347 rm2: 'DomoticzHash':'43ee2af49'
2022-02-07 13:58:01.347 rm2: 'DomoticzBuildTime':'2021-12-23 23:07:32'
2022-02-07 13:58:01.347 rm2: Device count: 3
2022-02-07 13:58:01.347 rm2: Device: 1 - ID: 58, Name: 'rm2 - RM2-Status', nValue: 1, sValue: 'On'
2022-02-07 13:58:01.347 rm2: Device ID: '58'
2022-02-07 13:58:01.347 rm2: Device Name: 'rm2 - RM2-Status'
2022-02-07 13:58:01.347 rm2: Device nValue: 1
2022-02-07 13:58:01.347 rm2: Device sValue: 'On'
2022-02-07 13:58:01.347 rm2: Device LastLevel: 0
2022-02-07 13:58:01.347 rm2: Device: 2 - ID: 59, Name: 'rm2 - IR Commands', nValue: 0, sValue: 'Off'
2022-02-07 13:58:01.347 rm2: Device ID: '59'
2022-02-07 13:58:01.347 rm2: Device Name: 'rm2 - IR Commands'
2022-02-07 13:58:01.347 rm2: Device nValue: 0
2022-02-07 13:58:01.347 rm2: Device sValue: 'Off'
2022-02-07 13:58:01.348 rm2: Device LastLevel: 10
2022-02-07 13:58:01.348 rm2: Device: 3 - ID: 60, Name: 'rm2 - RF Commands', nValue: 0, sValue: 'Off'
2022-02-07 13:58:01.348 rm2: Device ID: '60'
2022-02-07 13:58:01.348 rm2: Device Name: 'rm2 - RF Commands'
2022-02-07 13:58:01.348 rm2: Device nValue: 0
2022-02-07 13:58:01.348 rm2: Device sValue: 'Off'
2022-02-07 13:58:01.348 rm2: Device LastLevel: 50
2022-02-07 13:58:01.349 rm2: lang file : C:\Program Files (x86)\Domoticz\plugins\Broadlink\lng/en_en.lng
2022-02-07 13:58:01.349 rm2: Language loaded for : en
2022-02-07 13:58:01.013 Status: rm2: Stopping threads.
2022-02-07 13:58:01.013 Status: rm2: Stopped.
2022-02-07 13:58:01.014 Status: rm2: Entering work loop.
2022-02-07 13:58:01.014 Status: rm2: Started.
2022-02-07 13:58:01.344 Status: rm2: Initialized version 1.6.3, author 'zak45'
2022-02-07 13:58:02.357 rm2: Listen on BROWebServer - Port: 9000
2022-02-07 13:58:02.357 rm2: Hardware ID: 10
2022-02-07 13:58:02.357 rm2: 'HardwareID':'10'
2022-02-07 13:58:02.357 rm2: 'HomeFolder':'C:\Program Files (x86)\Domoticz\plugins\Broadlink\'
2022-02-07 13:58:02.357 rm2: 'StartupFolder':'C:\Program Files (x86)\Domoticz\'
2022-02-07 13:58:02.358 rm2: 'UserDataFolder':'C:\Program Files (x86)\Domoticz\'
2022-02-07 13:58:02.358 rm2: 'Database':'C:\Program Files (x86)\Domoticz\domoticz.db'
2022-02-07 13:58:02.358 rm2: 'Language':'en'
2022-02-07 13:58:02.359 rm2: 'Version':'1.6.3'
2022-02-07 13:58:02.359 rm2: 'Author':'zak45'
2022-02-07 13:58:02.359 rm2: 'Name':'rm2'
2022-02-07 13:58:02.359 rm2: 'Address':'192.168.1.17'
2022-02-07 13:58:02.359 rm2: 'Port':'8080'
2022-02-07 13:58:02.359 rm2: 'Key':'Broadlink'
2022-02-07 13:58:02.360 rm2: 'Mode1':'b4430dda260b'
2022-02-07 13:58:02.360 rm2: 'Mode2':'C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/'
2022-02-07 13:58:02.360 rm2: 'Mode3':'RM2'
2022-02-07 13:58:02.360 rm2: 'Mode4':'192.168.1.33'
2022-02-07 13:58:02.360 rm2: 'Mode5':'9000'
2022-02-07 13:58:02.360 rm2: 'Mode6':'2'
2022-02-07 13:58:02.360 rm2: 'DomoticzVersion':'2021.1 (build 13954)'
2022-02-07 13:58:02.360 rm2: 'DomoticzHash':'43ee2af49'
2022-02-07 13:58:02.360 rm2: 'DomoticzBuildTime':'2021-12-23 23:07:32'
2022-02-07 13:58:02.360 rm2: Device count: 3
2022-02-07 13:58:02.360 rm2: Device: 1 - ID: 58, Name: 'rm2 - RM2-Status', nValue: 1, sValue: 'On'
2022-02-07 13:58:02.360 rm2: Device ID: '58'
2022-02-07 13:58:02.360 rm2: Device Name: 'rm2 - RM2-Status'
2022-02-07 13:58:02.361 rm2: Device nValue: 1
2022-02-07 13:58:02.361 rm2: Device sValue: 'On'
2022-02-07 13:58:02.361 rm2: Device LastLevel: 0
2022-02-07 13:58:02.361 rm2: Device: 2 - ID: 59, Name: 'rm2 - IR Commands', nValue: 0, sValue: 'Off'
2022-02-07 13:58:02.361 rm2: Device ID: '59'
2022-02-07 13:58:02.361 rm2: Device Name: 'rm2 - IR Commands'
2022-02-07 13:58:02.361 rm2: Device nValue: 0
2022-02-07 13:58:02.361 rm2: Device sValue: 'Off'
2022-02-07 13:58:02.361 rm2: Device LastLevel: 10
2022-02-07 13:58:02.361 rm2: Device: 3 - ID: 60, Name: 'rm2 - RF Commands', nValue: 0, sValue: 'Off'
2022-02-07 13:58:02.361 rm2: Device ID: '60'
2022-02-07 13:58:02.361 rm2: Device Name: 'rm2 - RF Commands'
2022-02-07 13:58:02.361 rm2: Device nValue: 0
2022-02-07 13:58:02.361 rm2: Device sValue: 'Off'
2022-02-07 13:58:02.361 rm2: Device LastLevel: 50
2022-02-07 13:58:02.362 rm2: ini file read....C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/remote/Broadlink-10-001.ini
2022-02-07 13:58:02.362 rm2: Custom Commands: 0,
2022-02-07 13:58:02.364 rm2: Update 0:'Off' (rm2 - IR Commands)
2022-02-07 13:58:02.368 rm2: Update 0:'Off' (rm2 - RF Commands)
2022-02-07 13:58:02.368 rm2: Plugin Device count start on : 9
2022-02-07 13:58:02.371 rm2: Command line file updated: C:\Program Files (x86)\Domoticz\plugins\Broadlink\log/10RM2.txt
2022-02-07 13:58:02.371 rm2: Connecting to: 192.168.1.33 : b4430dda260b
2022-02-07 13:58:02.640 rm2: Connected to Broadlink device: 192.168.1.33 RM2
2022-02-07 13:58:02.646 rm2: Admin html file created: C:\Program Files (x86)\Domoticz\www/templates/Broadlink-RM2-10.html
2022-02-07 13:58:02.646 rm2: command to execute : "C:\Program Files (x86)\Domoticz\plugins\Broadlink\scr/dombr.cmd" "C:\Program Files (x86)\Domoticz\plugins\Broadlink\Dombroadlink.py" "192.168.1.17;8080;b4430dda260b;C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/;RM2;192.168.1.33;9000;2;10;C:\Program Files (x86)\Domoticz\plugins\Broadlink\;9;en;remotePlugin" no
2022-02-07 13:58:03.738 rm2: Connected successfully to 127.0.0.1:54332
2022-02-07 13:58:03.738 rm2: onMessage called for connection: 127.0.0.1:54332
2022-02-07 13:58:03.738 rm2: We bypass URL check
2022-02-07 13:58:03.738 rm2: data:b'{"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}'
2022-02-07 13:58:03.738 rm2: {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 13:58:03.739 rm2: processing data : {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 13:58:03.739 rm2: data process OK
2022-02-07 13:58:03.800 rm2: onDisconnect called for connection 127.0.0.1:54332
2022-02-07 13:58:03.800 rm2: Server Connections:
2022-02-07 13:58:03.801 rm2: --> 127.0.0.1:54332'.
2022-02-07 13:58:05.796 rm2: Connected successfully to 127.0.0.1:54340
2022-02-07 13:58:05.796 rm2: onMessage called for connection: 127.0.0.1:54340
2022-02-07 13:58:05.797 rm2: We bypass URL check
2022-02-07 13:58:05.797 rm2: data:b'{"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}'
2022-02-07 13:58:05.797 rm2: {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 13:58:05.798 rm2: processing data : {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 13:58:05.804 rm2: Update 1:'END of remotePlugin' (rm2 - RM2-Status)
2022-02-07 13:58:05.810 rm2: Update 1:'On' (rm2 - RM2-Status)
2022-02-07 13:58:05.811 rm2: data process OK
2022-02-07 13:58:05.875 rm2: onDisconnect called for connection 127.0.0.1:54340
2022-02-07 13:58:05.875 rm2: Server Connections:
2022-02-07 13:58:05.875 rm2: --> 127.0.0.1:54340'.
on the test system, we can see also another log entry not present on the production one :
Spoiler: show
22-02-07 13:58:00.898 Status: rm2: Stop directive received.
2022-02-07 13:58:00.934 Status: rm2: Exiting work loop.
2022-02-07 13:58:00.916 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 13:58:00.916 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 13:58:01.013 Status: rm2: Stopping threads.
2022-02-07 13:58:01.013 Status: rm2: Stopped.
2022-02-07 13:58:01.014 Status: rm2: Entering work loop.
2022-02-07 13:58:01.014 Status: rm2: Started.
2022-02-07 13:58:01.344 Status: rm2: Initialized version 1.6.3, author 'zak45'
2022-02-07 14:00:35.224 Error: rm3: Traceback (most recent call last):
2022-02-07 14:00:35.224 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 369, in send_packet
2022-02-07 14:00:35.224 response = cs.recvfrom(2048)
2022-02-07 14:00:35.224 socket.timeout: timed out
2022-02-07 14:00:35.224
2022-02-07 14:00:35.224 During handling of the above exception, another exception occurred:
2022-02-07 14:00:35.224
2022-02-07 14:00:35.224 Traceback (most recent call last):
2022-02-07 14:00:35.224 File "C:\Program Files (x86)\Domoticz\plugins\Broadlink\plugin.py", line 1803, in broadlink_connect
2022-02-07 14:00:35.224 DEVICE.auth()
2022-02-07 14:00:35.224 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 270, in auth
2022-02-07 14:00:35.224 response = self.send_packet(0x65, payload)
2022-02-07 14:00:35.224 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 374, in send_packet
2022-02-07 14:00:35.224 raise exception(0xfffd)
2022-02-07 14:00:35.224 broadlink.exceptions.DeviceOfflineError: The device is offline
2022-02-07 14:00:35.224
2022-02-07 14:00:35.224 Error: rm3: Error to connect to Broadlink device: 192.168.1.34
2022-02-07 14:01:11.447 Status: rm2: Stop directive received.
2022-02-07 14:01:11.501 Status: rm2: Exiting work loop.
2022-02-07 14:01:11.549 Status: rm2: Stopping threads.
2022-02-07 14:01:11.549 Status: rm2: Stopped.
2022-02-07 14:01:11.550 Status: rm2: Started.
2022-02-07 14:01:11.550 Status: rm2: Entering work loop.
2022-02-07 14:01:11.472 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 14:01:11.473 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 14:01:12.080 Status: rm2: Initialized version 1.6.3, author 'zak45'
2022-02-07 14:01:13.093 rm2: 'Mode4':'192.168.1.33'
2022-02-07 14:01:13.093 rm2: 'Mode5':'9000'
2022-02-07 14:01:13.093 rm2: 'Mode6':'-1'
2022-02-07 14:01:13.093 rm2: 'DomoticzVersion':'2021.1 (build 13954)'
2022-02-07 14:01:13.093 rm2: 'DomoticzHash':'43ee2af49'
2022-02-07 14:01:13.094 rm2: 'DomoticzBuildTime':'2021-12-23 23:07:32'
2022-02-07 14:01:13.094 rm2: Device count: 3
2022-02-07 14:01:13.094 rm2: Device: 1 - ID: 58, Name: 'rm2 - RM2-Status', nValue: 1, sValue: 'On'
2022-02-07 14:01:13.094 rm2: Device ID: '58'
2022-02-07 14:01:13.094 rm2: Device Name: 'rm2 - RM2-Status'
2022-02-07 14:01:13.094 rm2: Device nValue: 1
2022-02-07 14:01:13.094 rm2: Device sValue: 'On'
2022-02-07 14:01:13.095 rm2: Device LastLevel: 0
2022-02-07 14:01:13.095 rm2: Device: 2 - ID: 59, Name: 'rm2 - IR Commands', nValue: 0, sValue: 'Off'
2022-02-07 14:01:13.095 rm2: Device ID: '59'
2022-02-07 14:01:13.095 rm2: Device Name: 'rm2 - IR Commands'
2022-02-07 14:01:13.095 rm2: Device nValue: 0
2022-02-07 14:01:13.095 rm2: Device sValue: 'Off'
2022-02-07 14:01:13.095 rm2: Device LastLevel: 10
2022-02-07 14:01:13.096 rm2: Device: 3 - ID: 60, Name: 'rm2 - RF Commands', nValue: 0, sValue: 'Off'
2022-02-07 14:01:13.096 rm2: Device ID: '60'
2022-02-07 14:01:13.096 rm2: Device Name: 'rm2 - RF Commands'
2022-02-07 14:01:13.096 rm2: Device nValue: 0
2022-02-07 14:01:13.096 rm2: Device sValue: 'Off'
2022-02-07 14:01:13.096 rm2: Device LastLevel: 50
2022-02-07 14:01:13.096 rm2: Pushing 'PollIntervalDirective' on to queue
2022-02-07 14:01:13.098 rm2: ini file read....C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/remote/Broadlink-10-001.ini
2022-02-07 14:01:13.099 rm2: Custom Commands: 0,
2022-02-07 14:01:13.099 (rm2 - IR Commands) Updating device from 0:'Off' to have values 0:'Off'.
2022-02-07 14:01:13.103 rm2: Update 0:'Off' (rm2 - IR Commands)
2022-02-07 14:01:13.103 (rm2 - RF Commands) Updating device from 0:'Off' to have values 0:'Off'.
2022-02-07 14:01:13.108 rm2: Update 0:'Off' (rm2 - RF Commands)
2022-02-07 14:01:13.108 rm2: Plugin Device count start on : 9
2022-02-07 14:01:13.112 rm2: Command line file updated: C:\Program Files (x86)\Domoticz\plugins\Broadlink\log/10RM2.txt
2022-02-07 14:01:13.112 rm2: Connecting to: 192.168.1.33 : b4430dda260b
2022-02-07 14:01:13.148 rm2: Connected to Broadlink device: 192.168.1.33 RM2
2022-02-07 14:01:13.152 rm2: Admin html file created: C:\Program Files (x86)\Domoticz\www/templates/Broadlink-RM2-10.html
2022-02-07 14:01:13.152 rm2: command to execute : "C:\Program Files (x86)\Domoticz\plugins\Broadlink\scr/dombr.cmd" "C:\Program Files (x86)\Domoticz\plugins\Broadlink\Dombroadlink.py" "192.168.1.17;8080;b4430dda260b;C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/;RM2;192.168.1.33;9000;-1;10;C:\Program Files (x86)\Domoticz\plugins\Broadlink\;9;en;remotePlugin" no
2022-02-07 14:01:13.202 (rm2) Releasing lock for 'onStartCallback'
2022-02-07 14:01:13.203 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.203 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.203 rm2: (rm2) Processing 'ListenDirective' message
2022-02-07 14:01:13.203 (rm2) Acquiring lock for 'ListenDirective'
2022-02-07 14:01:13.203 rm2: Protocol for 'BROWebServer' not specified, 'None' assumed.
2022-02-07 14:01:13.203 rm2: Transport set to: 'TCP/IP', :9000.
2022-02-07 14:01:13.204 rm2: Listen directive received, action initiated successfully.
2022-02-07 14:01:13.204 (rm2) Releasing lock for 'ListenDirective'
2022-02-07 14:01:13.204 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.204 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.204 rm2: (rm2) Processing 'PollIntervalDirective' message
2022-02-07 14:01:13.204 (rm2) Acquiring lock for 'PollIntervalDirective'
2022-02-07 14:01:13.204 rm2: Heartbeat interval set to: 30.
2022-02-07 14:01:13.204 (rm2) Releasing lock for 'PollIntervalDirective'
2022-02-07 14:01:13.204 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.204 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.204 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.204 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.261 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.261 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.324 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.324 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.388 (rm2) Requesting lock for 'rm2', waiting...
2022-02-07 14:01:13.388 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.388 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.452 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.452 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.516 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.516 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.579 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.579 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.643 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.643 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.707 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.707 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.770 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.770 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.833 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.833 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.897 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.897 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:13.961 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:13.961 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.025 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.025 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.089 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.089 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.153 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.153 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.217 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.217 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.279 (rm2) Requesting lock for 'rm2', waiting...
2022-02-07 14:01:14.279 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.279 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.342 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.342 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.405 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.405 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:14.467 (rm2) Requesting lock for 'rm2', waiting...
2022-02-07 14:01:14.467 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:14.467 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.539 rm2: 70 74 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 62 6f pt>.............</bo
2022-02-07 14:01:17.539 rm2: 64 79 3e 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 20 20 20 dy>.................
2022-02-07 14:01:17.540 rm2: 20 20 20 20 20 20 20 20 3c 2f 68 74 6d 6c 3e 0a 20 20 20 20 ........</html>.....
2022-02-07 14:01:17.540 rm2: 20 20 20 20 20 20 20 20 .. .. .. .. .. .. .. .. .. .. .. .. ........
2022-02-07 14:01:17.540 (rm2) Releasing lock for 'WriteDirective'
2022-02-07 14:01:17.540 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.540 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.540 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.540 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.541 (rm2) Acquiring lock for 'CPluginTransportTCP::handleRead'
2022-02-07 14:01:17.541 Queued asynchronous read aborted (127.0.0.1:55048), [2] End of file.
2022-02-07 14:01:17.541 rm2: Pushing 'DisconnectedEvent' on to queue
2022-02-07 14:01:17.541 (rm2) Releasing lock for 'CPluginTransportTCP::handleRead'
2022-02-07 14:01:17.592 rm2: (rm2) Processing 'DisconnectedEvent' message
2022-02-07 14:01:17.592 (rm2) Acquiring lock for 'DisconnectedEvent'
2022-02-07 14:01:17.592 rm2: Disconnect event received for '127.0.0.1:55048'.
2022-02-07 14:01:17.592 rm2: Pushing 'onDisconnectCallback' on to queue
2022-02-07 14:01:17.593 (rm2) Releasing lock for 'DisconnectedEvent'
2022-02-07 14:01:17.593 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.593 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.593 rm2: (rm2) Processing 'onDisconnectCallback' message
2022-02-07 14:01:17.593 (rm2) Acquiring lock for 'onDisconnectCallback'
2022-02-07 14:01:17.594 rm2: Calling message handler 'onDisconnect' on 'module' type object.
2022-02-07 14:01:17.594 rm2: onDisconnect called for connection 127.0.0.1:55048
2022-02-07 14:01:17.594 rm2: Server Connections:
2022-02-07 14:01:17.594 rm2: --> 127.0.0.1:55048'.
2022-02-07 14:01:17.594 (rm2) Releasing lock for 'onDisconnectCallback'
2022-02-07 14:01:17.594 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.595 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.595 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.595 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.655 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.655 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.718 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.718 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.780 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.780 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.843 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.843 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.905 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.905 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:17.967 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:17.967 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.030 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.030 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.092 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.092 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.155 (rm2) Requesting lock for 'rm2', waiting...
2022-02-07 14:01:18.155 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.155 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.217 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.217 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.279 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.279 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.341 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.341 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.404 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.404 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.466 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.466 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.528 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.528 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.589 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.589 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.653 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.653 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.714 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.714 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.778 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.778 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.839 (rm2) Requesting lock for 'rm2', waiting...
2022-02-07 14:01:18.839 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.839 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.901 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.901 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:18.962 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:18.962 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.026 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.026 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.088 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.088 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.151 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.151 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.215 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.215 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.277 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.277 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.339 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.339 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.402 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.402 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.465 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.465 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.527 (rm2) Requesting lock for 'rm2', waiting...
2022-02-07 14:01:19.527 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.527 (rm2) Releasing lock for 'rm2'
2022-02-07 14:01:19.550 (rm2) Acquiring lock for 'CPluginTransportTCP::handleAsyncAccept'
2022-02-07 14:01:19.550 rm2: Pushing 'ProtocolDirective' on to queue
2022-02-07 14:01:19.550 rm2: Pushing 'onConnectCallback' on to queue
2022-02-07 14:01:19.551 (rm2) Releasing lock for 'CPluginTransportTCP::handleAsyncAccept'
As we can see, there is 'millions of ' :
2022-02-07 14:01:19.151 (rm2) Acquiring lock for 'rm2'
2022-02-07 14:01:19.151 (rm2) Releasing lock for 'rm2'

Maybe I'm wrong, but looks like this has been introduced during this update :
https://github.com/domoticz/domoticz/issues/5046
according this topic:
viewtopic.php?p=285420#p285420

@dnpwwo,

any thoughts about that ?????

thanks
kollemt
Posts: 29
Joined: Monday 18 February 2019 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Python Plugin : Broadlink

Post by kollemt »

I am currently on the latest version 2022.1

I tried the following:
Deactivate the Slaapkamer hardware
Activate the Woonkamer hardware
Reboot
Activate the Slaapkamer hardware
Then all works fine and no problems at all.
Does not matter which of the two I do deactivate.

I agree with you that the problem could be caused by a Domoticz update. The plugin startup process is problably changed as I read in your messages.
I have ordered a new sd card to test with an older domoticz version of my backups in a couple of days as i do not want to overwrite my production sd card.
kollemt
Posts: 29
Joined: Monday 18 February 2019 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Python Plugin : Broadlink

Post by kollemt »

I installed Domoticz version 2021.1. No problems.
When back to my production Domoticz version 2022.1. Again the same problems.
Looks indeed that the problem was introduced with a later Domoticz version:

2020.2 build 2021-03-11 OK
2021.1 build 2021-04-17 OK
2021.1 build 2021-12-23 NOT OK
2022.1 build 2022-01-31 NOT OK
Attachments
2022.JPG
2022.JPG (29.08 KiB) Viewed 1629 times
2021.JPG
2021.JPG (21.45 KiB) Viewed 1629 times
User avatar
psubiaco
Posts: 194
Joined: Monday 20 August 2018 9:38
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Italy
Contact:

Re: Python Plugin : Broadlink

Post by psubiaco »

I have the same problem with Domoticz beta and Kia - Hyundai plugin:
CPU goes to 30% and I can see a lot of the following lines in the log.
Should we change something on the python plugin, or wait for a domoticz update?

2022-02-11 15:28:18.413 (Kia eNiro) Releasing lock for 'Kia eNiro'
2022-02-11 15:28:18.463 (Kia eNiro) Acquiring lock for 'Kia eNiro'
2022-02-11 15:28:18.463 (Kia eNiro) Releasing lock for 'Kia eNiro'
2022-02-11 15:28:18.514 (Kia eNiro) Acquiring lock for 'Kia eNiro'
2022-02-11 15:28:18.514 (Kia eNiro) Releasing lock for 'Kia eNiro'
2022-02-11 15:28:18.564 (Kia eNiro) Acquiring lock for 'Kia eNiro'
2022-02-11 15:28:18.565 (Kia eNiro) Releasing lock for 'Kia eNiro'
2022-02-11 15:28:18.615 (Kia eNiro) Acquiring lock for 'Kia eNiro'
2022-02-11 15:28:18.615 (Kia eNiro) Releasing lock for 'Kia eNiro'
2022-02-11 15:28:18.665 (Kia eNiro) Requesting lock for 'Kia eNiro', waiting...
2022-02-11 15:28:18.735 (Kia eNiro) Acquiring lock for 'Kia eNiro'
2022-02-11 15:28:18.735 (Kia eNiro) Releasing lock for 'Kia eNiro'
Paolo
--
I use DomBus modules to charge EV car, get a full alarm system, control heat pump, fire alarm detection, lights and much more. Video
Facebook page - Youtube channel
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

psubiaco wrote: Friday 11 February 2022 15:33 I have the same problem with Domoticz beta and Kia - Hyundai plugin:
CPU goes to 30% and I can see a lot of the following lines in the log.
Should we change something on the python plugin, or wait for a domoticz update?
probably wait for a domoticz update, hope that someone will take care of that!
User avatar
psubiaco
Posts: 194
Joined: Monday 20 August 2018 9:38
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Italy
Contact:

Re: Python Plugin : Broadlink

Post by psubiaco »

Domoticz update will not solve the problem.
I believe the problem is on logging class: maybe domoticz now is using python 3.10 and broadlink plugin, as kia-hyundai plugin, is using logging python lib. Now I'm doing a dist-upgrade to update everything on my RPI and retry using the plugin, then I'll update this post with the results....
Paolo
--
I use DomBus modules to charge EV car, get a full alarm system, control heat pump, fire alarm detection, lights and much more. Video
Facebook page - Youtube channel
Valiran
Posts: 13
Joined: Thursday 17 February 2022 0:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Valiran »

zak45 wrote: Thursday 25 February 2021 0:38
albebert wrote: Wednesday 24 February 2021 23:49
need to understand how it works now :) (tried a single IR remote : ok) need to find how create a on/off command with different IR/RF command now
For a simple On/off switch in Domoticz, better create a dummy device and copy paste corresponding http command:
Hello!

Could you give the syntax of the HTML command please?

Another question is for my projector, it needs to send OFF 2 times, how can I duplicate the command sent, with a 1 sec timer between?

Thanks !
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

Valiran wrote: Thursday 17 February 2022 0:50
Could you give the syntax of the HTML command please?

Another question is for my projector, it needs to send OFF 2 times, how can I duplicate the command sent, with a 1 sec timer between?
Click on the earth icon to have the http link :
httpCapture.PNG
httpCapture.PNG (42.22 KiB) Viewed 1445 times
Create a multi code ini file by selecting your desired ini number, add 1 second timer, add any other ini number :


edit the multi code ini just created and replace with your desired ini number:
multieditCapture.PNG
multieditCapture.PNG (92.74 KiB) Viewed 1445 times
Attachments
multiCapture.PNG
multiCapture.PNG (104.56 KiB) Viewed 1445 times
Valiran
Posts: 13
Joined: Thursday 17 February 2022 0:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Valiran »

Hello,

I should have a problem, because my earth button does nothing when I click on it :(
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

Valiran wrote: Thursday 17 February 2022 14:34 Hello,

I should have a problem, because my earth button does nothing when I click on it :(
Try with another browser.
Valiran
Posts: 13
Joined: Thursday 17 February 2022 0:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Valiran »

zak45 wrote: Thursday 17 February 2022 18:38
Valiran wrote: Thursday 17 February 2022 14:34 Hello,

I should have a problem, because my earth button does nothing when I click on it :(
Try with another browser.
Same issue with Chrome, Firefox and Safari :-(
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

try to run the Webadmin Page outside domoticz:
http://<your_domoticz_ip_address>:<plugin_port_number>
Valiran
Posts: 13
Joined: Thursday 17 February 2022 0:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Valiran »

Same issue :(
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

Try to see if Javascript is enabled.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest