Python Plugin : Broadlink

Python and python framework

Moderator: leecollings

jjnj

Re: Python Plugin : Broadlink

Post by jjnj »

Dear all,

I installed the plugin the first time using 127.0.0.1 as the domoticz IP. Now after checking the admin page I see that it now points to 127.0.0.1:9000. Obvisouly that doesn't show anything. I tried to install the plugin again with the correct domoticz IP but the admin page stays at 127.0.0.1 and not the newly changed domoticz IP. How do I change this manually?
Image

Your help is highly appreciated
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Python Plugin : Broadlink

Post by DAVIZINHO »

zak45 wrote: Thursday 03 February 2022 0:34
DAVIZINHO wrote: Thursday 03 February 2022 0:30 tomorrow i will try with the cli and try to launch the rf comands with the cli. if this works i can use scripts for my use.
Great, let us know if this work.. should help others.
Have seen that version 0.18.0 has been there still long time... will try to update the plugin
but there is a lot of "breaking" changes ..; !!! :(
im test the broadlink_cli.py but allwais obtain the same error trying to learn a rf frequency :-(

Code: Select all

root@domoticz-oficial:/opt/domoticz/userdata/plugins/Broadlink# python broadlink_cli.py --device "0x649b 192.168.1.xx xxxxxxxxxx" --rfscanlearn                                                                                                    
Learning RF Frequency, press and hold the button to learn...                                                                                                                                                                                          
Traceback (most recent call last):                                                                                                                                                                                                                    
  File "broadlink_cli.py", line 206, in <module>                                                                                                                                                                                                      
    if dev.check_frequency():                                                                                                                                                                                                                         
AttributeError: 'device' object has no attribute 'check_frequency' 
:-(
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

jjnj wrote: Thursday 03 February 2022 12:21 Dear all,

I installed the plugin the first time using 127.0.0.1 as the domoticz IP. Now after checking the admin page I see that it now points to 127.0.0.1:9000. Obvisouly that doesn't show anything. I tried to install the plugin again with the correct domoticz IP but the admin page stays at 127.0.0.1 and not the newly changed domoticz IP. How do I change this manually?
Image

Your help is highly appreciated
this should be mainly due to the browser chache.
open browser private session and try , if work, clean browser cache.
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

DAVIZINHO wrote: Thursday 03 February 2022 13:43

Code: Select all

root@domoticz-oficial:/opt/domoticz/userdata/plugins/Broadlink# python broadlink_cli.py --device "0x649b 192.168.1.xx xxxxxxxxxx" --rfscanlearn                                                                                                    
Learning RF Frequency, press and hold the button to learn...                                                                                                                                                                                          
Traceback (most recent call last):                                                                                                                                                                                                                    
  File "broadlink_cli.py", line 206, in <module>                                                                                                                                                                                                      
    if dev.check_frequency():                                                                                                                                                                                                                         
AttributeError: 'device' object has no attribute 'check_frequency' 
:-(
if your try with:

python broadlink_cli.py --device "0x272a 192.168.1.xx xxxxxxxxxx" --rfscanlearn
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Python Plugin : Broadlink

Post by DAVIZINHO »

zak45 wrote: Thursday 03 February 2022 16:21
DAVIZINHO wrote: Thursday 03 February 2022 13:43

Code: Select all

root@domoticz-oficial:/opt/domoticz/userdata/plugins/Broadlink# python broadlink_cli.py --device "0x649b 192.168.1.xx xxxxxxxxxx" --rfscanlearn                                                                                                    
Learning RF Frequency, press and hold the button to learn...                                                                                                                                                                                          
Traceback (most recent call last):                                                                                                                                                                                                                    
  File "broadlink_cli.py", line 206, in <module>                                                                                                                                                                                                      
    if dev.check_frequency():                                                                                                                                                                                                                         
AttributeError: 'device' object has no attribute 'check_frequency' 
:-(
if your try with:

python broadlink_cli.py --device "0x272a 192.168.1.xx xxxxxxxxxx" --rfscanlearn
same error. I try all the posibilities and allways the same error. 'check_frequency" or " 'sweep_frequency' in line 200 of broadlin_cli
jjnj

Re: Python Plugin : Broadlink

Post by jjnj »

zak45 wrote: Thursday 03 February 2022 16:19
jjnj wrote: Thursday 03 February 2022 12:21 Dear all,

I installed the plugin the first time using 127.0.0.1 as the domoticz IP. Now after checking the admin page I see that it now points to 127.0.0.1:9000. Obvisouly that doesn't show anything. I tried to install the plugin again with the correct domoticz IP but the admin page stays at 127.0.0.1 and not the newly changed domoticz IP. How do I change this manually?
Image

Your help is highly appreciated
this should be mainly due to the browser chache.
open browser private session and try , if work, clean browser cache.
Unfortunately that doesn't work. Also on other browsers it keeps pointing to 127.0.0.1. I don't know what else to do now.
Also when I learn a new device via the switch in the Domoticz interface, it doesn't show up anywhere in Domoticz(a new .ini is created though). I guess I should somehow set it to the correct ip.
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

jjnj wrote: Saturday 05 February 2022 16:01 Unfortunately that doesn't work. Also on other browsers it keeps pointing to 127.0.0.1. I don't know what else to do now.
Also when I learn a new device via the switch in the Domoticz interface, it doesn't show up anywhere in Domoticz(a new .ini is created though). I guess I should somehow set it to the correct ip.
the admin page is located under: ...\Domoticz\www\templates
you can remove it, plugin should recreate it.
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 »

Zak45,

I still have the problem that after reboot of my Raspberry Pi running Domoticz randomly only one of my two Broadlink devices is started correctly and works correctly.
The other device does not initialize properly and shows Red in the Switches tab.
I have two Broadlink devices, one for my tv in the livingroom and one for my tv in the bedroom.
I have to define the Broadlink hardware twice in the Hardware tab, once for each of the two Broadlink devices.
For other plugins like RFXCOM I have the define the plugin only once under hardware and can add multiple devices in the Switches tab.
I particular the following error message strikes me:
2022-02-06 09:14:05.441 Error: Broadlink TV slaapkamer: (Broadlink) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Broadlink/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages
Could it be that Domoticz only allows defining the plugin once and 'plugin.py' is locked?
See attached pictures.
Attachments
switch tab.JPG
switch tab.JPG (41.49 KiB) Viewed 2097 times
hardware.JPG
hardware.JPG (92.19 KiB) Viewed 2097 times
devices.JPG
devices.JPG (56.39 KiB) Viewed 2097 times
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

this plugin act , more or less, as the FRXCOM one....
You need to have one version by physical hardware, the same I think for RFXCOM :
How you would declare two differents RFXCOM HW ?

Let me take a look at your different settings / configuration:
provide plugin settings for both devices and folder contents.
What could help also is to put both on debug mode and provide the log files just after restarted plugins.
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

Following config do not make sense, for test only:
I do not own two RM devices so I have declared same Broadlink device twice, and do not see any problem for the moment!
Capture.PNG
Capture.PNG (146.61 KiB) Viewed 2083 times
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 »

You see in the second picture of my previous reply the plugin of RFXCOM defined only ONCE under Hardware tab as I have only one RFXCOM but multiple RFXCOM devices connected to that one and only RFXCOM hardware/
In the first picture of my previous reply you see the way how I can define multiple RFXCOM switches using the RFXCOM hardware plugin.
As I have two Broadlink devices with different IP addresses I am forced to define the the Broadlink plugin twice in the hardware tab, as I have to fill in the IP address in the Hardware tab and not in the switches tab.

See attached the settings for both broadlink devices and the content of the plugin folders.

Where can I find the debug log file ?
Attachments
broadlink plugin.JPG
broadlink plugin.JPG (23.01 KiB) Viewed 2064 times
broadlink woonkamer.JPG
broadlink woonkamer.JPG (68.92 KiB) Viewed 2064 times
broadlink slaapkamer.JPG
broadlink slaapkamer.JPG (68.81 KiB) Viewed 2064 times
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

So looks like there is misunderstanding about "hardware" meaning and how this plugin work... but doesn't matter.. not the subject here !

To provide debug information, put plugin settings :
Capture.PNG
Capture.PNG (61.65 KiB) Viewed 2060 times
after go to plugin Web admin page, click on plugin log and copy paste the information :
e.g.:
Spoiler: show


2022-02-06 23:41:37.815 Status: rm2bis: Started.
2022-02-06 23:41:37.815 Status: rm2bis: Entering work loop.
2022-02-06 23:41:38.124 Status: rm2bis: Initialized version 1.6.3, author 'zak45'
2022-02-06 23:47:15.778 rm2bis: Device Name: 'rm2bis - IR Commands'
2022-02-06 23:47:15.778 rm2bis: Device nValue: 0
2022-02-06 23:47:15.778 rm2bis: Device sValue: 'Off'
2022-02-06 23:47:15.778 rm2bis: Device LastLevel: 10
2022-02-06 23:47:15.778 rm2bis: Device: 3 - ID: 63, Name: 'rm2bis - RF Commands', nValue: 0, sValue: 'Off'
2022-02-06 23:47:15.778 rm2bis: Device ID: '63'
2022-02-06 23:47:15.778 rm2bis: Device Name: 'rm2bis - RF Commands'
2022-02-06 23:47:15.778 rm2bis: Device nValue: 0
2022-02-06 23:47:15.778 rm2bis: Device sValue: 'Off'
2022-02-06 23:47:15.778 rm2bis: Device LastLevel: 0
2022-02-06 23:47:15.779 rm2bis: lang file : C:\Program Files (x86)\Domoticz\plugins\Broadlink\lng/en_en.lng
2022-02-06 23:47:15.779 rm2bis: Language loaded for : en
2022-02-06 23:47:15.354 Status: rm2bis: Stop directive received.
2022-02-06 23:47:15.386 Status: rm2bis: Exiting work loop.
2022-02-06 23:47:15.456 Status: rm2bis: Stopping threads.
2022-02-06 23:47:15.456 Status: rm2bis: Stopped.
2022-02-06 23:47:15.458 Status: rm2bis: Started.
2022-02-06 23:47:15.458 Status: rm2bis: Entering work loop.
2022-02-06 23:47:15.775 Status: rm2bis: Initialized version 1.6.3, author 'zak45'
2022-02-06 23:47:16.790 rm2bis: Listen on BROWebServer - Port: 9001
2022-02-06 23:47:16.791 rm2bis: Hardware ID: 11
2022-02-06 23:47:16.791 rm2bis: 'HardwareID':'11'
2022-02-06 23:47:16.791 rm2bis: 'HomeFolder':'C:\Program Files (x86)\Domoticz\plugins\Broadlink\'
2022-02-06 23:47:16.792 rm2bis: 'StartupFolder':'C:\Program Files (x86)\Domoticz\'
2022-02-06 23:47:16.792 rm2bis: 'UserDataFolder':'C:\Program Files (x86)\Domoticz\'
2022-02-06 23:47:16.793 rm2bis: 'Database':'C:\Program Files (x86)\Domoticz\domoticz.db'
2022-02-06 23:47:16.793 rm2bis: 'Language':'en'
2022-02-06 23:47:16.793 rm2bis: 'Version':'1.6.3'
2022-02-06 23:47:16.793 rm2bis: 'Author':'zak45'
2022-02-06 23:47:16.793 rm2bis: 'Name':'rm2bis'
2022-02-06 23:47:16.794 rm2bis: 'Address':'192.168.1.17'
2022-02-06 23:47:16.794 rm2bis: 'Port':'8080'
2022-02-06 23:47:16.794 rm2bis: 'Key':'Broadlink'
2022-02-06 23:47:16.795 rm2bis: 'Mode1':'b4430dda260b'
2022-02-06 23:47:16.795 rm2bis: 'Mode2':'C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/'
2022-02-06 23:47:16.795 rm2bis: 'Mode3':'RM2'
2022-02-06 23:47:16.796 rm2bis: 'Mode4':'192.168.1.33'
2022-02-06 23:47:16.796 rm2bis: 'Mode5':'9001'
2022-02-06 23:47:16.796 rm2bis: 'Mode6':'62'
2022-02-06 23:47:16.797 rm2bis: 'DomoticzVersion':'2021.1 (build 13954)'
2022-02-06 23:47:16.797 rm2bis: 'DomoticzHash':'43ee2af49'
2022-02-06 23:47:16.797 rm2bis: 'DomoticzBuildTime':'2021-12-23 23:07:32'
2022-02-06 23:47:16.798 rm2bis: Device count: 3
2022-02-06 23:47:16.798 rm2bis: Device: 1 - ID: 61, Name: 'rm2bis - RM2-Status', nValue: 1, sValue: 'On'
2022-02-06 23:47:16.798 rm2bis: Device ID: '61'
2022-02-06 23:47:16.799 rm2bis: Device Name: 'rm2bis - RM2-Status'
2022-02-06 23:47:16.799 rm2bis: Device nValue: 1
2022-02-06 23:47:16.799 rm2bis: Device sValue: 'On'
2022-02-06 23:47:16.800 rm2bis: Device LastLevel: 0
2022-02-06 23:47:16.800 rm2bis: Device: 2 - ID: 62, Name: 'rm2bis - IR Commands', nValue: 0, sValue: 'Off'
2022-02-06 23:47:16.800 rm2bis: Device ID: '62'
2022-02-06 23:47:16.801 rm2bis: Device Name: 'rm2bis - IR Commands'
2022-02-06 23:47:16.801 rm2bis: Device nValue: 0
2022-02-06 23:47:16.801 rm2bis: Device sValue: 'Off'
2022-02-06 23:47:16.802 rm2bis: Device LastLevel: 10
2022-02-06 23:47:16.802 rm2bis: Device: 3 - ID: 63, Name: 'rm2bis - RF Commands', nValue: 0, sValue: 'Off'
2022-02-06 23:47:16.802 rm2bis: Device ID: '63'
2022-02-06 23:47:16.803 rm2bis: Device Name: 'rm2bis - RF Commands'
2022-02-06 23:47:16.803 rm2bis: Device nValue: 0
2022-02-06 23:47:16.803 rm2bis: Device sValue: 'Off'
2022-02-06 23:47:16.804 rm2bis: Device LastLevel: 0
2022-02-06 23:47:16.810 rm2bis: ini file read....C:/Program Files (x86)/Domoticz/plugins/Broadlink/ini/remote/Broadlink-11-001.ini
2022-02-06 23:47:16.811 rm2bis: Custom Commands: 0,
2022-02-06 23:47:16.811 (rm2bis - IR Commands) Updating device from 0:'Off' to have values 0:'Off'.
2022-02-06 23:47:16.819 rm2bis: Update 0:'Off' (rm2bis - IR Commands)
2022-02-06 23:47:16.819 (rm2bis - RF Commands) Updating device from 0:'Off' to have values 0:'Off'.
2022-02-06 23:47:16.825 rm2bis: Update 0:'Off' (rm2bis - RF Commands)
2022-02-06 23:47:16.825 rm2bis: Plugin Device count start on : 9
2022-02-06 23:47:16.830 rm2bis: Command line file updated: C:\Program Files (x86)\Domoticz\plugins\Broadlink\log/11RM2.txt
2022-02-06 23:47:16.830 rm2bis: Connecting to: 192.168.1.33 : b4430dda260b
2022-02-06 23:47:17.113 rm2bis: Connected to Broadlink device: 192.168.1.33 RM2
2022-02-06 23:47:17.116 rm2bis: Admin html file created: C:\Program Files (x86)\Domoticz\www/templates/Broadlink-RM2-11.html
2022-02-06 23:47:17.116 rm2bis: 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;9001;62;11;C:\Program Files (x86)\Domoticz\plugins\Broadlink\;9;en;remotePlugin" no
2022-02-06 23:47:17.151 rm2bis: Protocol for 'BROWebServer' not specified, 'None' assumed.
2022-02-06 23:47:17.151 rm2bis: Transport set to: 'TCP/IP', :9001.
2022-02-06 23:47:17.151 rm2bis: Listen directive received, action initiated successfully.
2022-02-06 23:47:17.151 rm2bis: Heartbeat interval set to: 30.
2022-02-06 23:47:18.463 rm2bis: Protocol set to: 'HTTP'.
2022-02-06 23:47:18.463 rm2bis: Connected successfully to 127.0.0.1:51696
2022-02-06 23:47:18.464 rm2bis: Received 207 bytes of data
2022-02-06 23:47:18.464 rm2bis: Received 69 bytes of data
2022-02-06 23:47:18.464 rm2bis: onMessage called for connection: 127.0.0.1:51696
2022-02-06 23:47:18.465 rm2bis: We bypass URL check
2022-02-06 23:47:18.465 rm2bis: data:b'{"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}'
2022-02-06 23:47:18.465 rm2bis: {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-06 23:47:18.465 rm2bis: processing data : {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-06 23:47:18.465 rm2bis: data process OK
2022-02-06 23:47:18.466 rm2bis: Sending 988 bytes of data
2022-02-06 23:47:18.525 rm2bis: Disconnect event received for '127.0.0.1:51696'.
2022-02-06 23:47:18.526 rm2bis: onDisconnect called for connection 127.0.0.1:51696
2022-02-06 23:47:18.526 rm2bis: Server Connections:
2022-02-06 23:47:18.526 rm2bis: --> 127.0.0.1:51696'.
2022-02-06 23:47:18.650 rm2bis: Protocol set to: 'HTTP'.
2022-02-06 23:47:18.650 rm2bis: Connected successfully to 192.168.1.17:51697
2022-02-06 23:47:18.650 (rm2bis) Deallocating connection object '127.0.0.1:51696' (127.0.0.1:51696).
2022-02-06 23:47:18.650 rm2bis: Received 538 bytes of data
2022-02-06 23:47:18.650 rm2bis: onMessage called for connection: 192.168.1.17:51697
2022-02-06 23:47:18.650 rm2bis: Request from : 192.168.1.17:51697 to : /manage?key=963354559430
2022-02-06 23:47:18.652 rm2bis: Device html file created: C:\Program Files (x86)\Domoticz\www/templates/Broadlink-RM2-11-61.html
2022-02-06 23:47:18.699 rm2bis: Device html file created: C:\Program Files (x86)\Domoticz\www/templates/Broadlink-RM2-11-62.html
2022-02-06 23:47:18.701 rm2bis: Device html file created: C:\Program Files (x86)\Domoticz\www/templates/Broadlink-RM2-11-63.html
2022-02-06 23:47:18.737 rm2bis: manage
2022-02-06 23:47:18.737 rm2bis: Sending 15424 bytes of data
2022-02-06 23:47:20.235 rm2bis: Received 535 bytes of data
2022-02-06 23:47:20.235 rm2bis: onMessage called for connection: 192.168.1.17:51697
2022-02-06 23:47:20.235 rm2bis: Request from : 192.168.1.17:51697 to : /log?key=963354559430
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 »

In the debug log I only see ERROR Domoticz Log
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

kollemt wrote: Monday 07 February 2022 0:07 In the debug log I only see ERROR Domoticz Log
Hummm... so something wrong with your installation.
Do you have more information if you look directly to Domoticz log ?
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 »

2022-02-07 00:01:12.821 Error: Broadlink TV woonkamer: (Broadlink) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Broadlink/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2022-02-07 00:01:12.821 Error: Broadlink TV woonkamer: Module Import failed, exception: 'InternalError'
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: Error Line details not available.
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: Exception traceback:
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 129 in '/home/pi/domoticz/plugins/Broadlink/plugin.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 12 in '/usr/local/lib/python3.7/dist-packages/requests_toolbelt/__init__.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 12 in '/usr/local/lib/python3.7/dist-packages/requests_toolbelt/adapters/__init__.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 12 in '/usr/local/lib/python3.7/dist-packages/requests_toolbelt/adapters/ssl.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 55 in '/usr/lib/python3/dist-packages/requests/__init__.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 59 in '/usr/lib/python3/dist-packages/requests/packages/__init__.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 49 in '/usr/lib/python3/dist-packages/requests/packages/__init__.py', function vendored
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 47 in '/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 8 in '/usr/lib/python3/dist-packages/OpenSSL/__init__.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 12 in '/usr/lib/python3/dist-packages/OpenSSL/rand.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 6 in '/usr/lib/python3/dist-packages/OpenSSL/_util.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 195 in '/usr/local/lib/python3.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py', function <module>
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 151 in '/usr/local/lib/python3.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py', function init_static_locks
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 134 in '/usr/local/lib/python3.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py', function _ensure_ffi_initialized
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 120 in '/usr/local/lib/python3.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py', function _register_osrandom_engine
2022-02-07 00:01:12.822 Error: Broadlink TV woonkamer: ----> Line 78 in '/usr/local/lib/python3.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py', function _openssl_assert
2022-02-07 00:03:22.408 Error: Broadlink TV slaapkamer: Traceback (most recent call last):
2022-02-07 00:03:22.408 File "/home/pi/domoticz/plugins/Broadlink/plugin.py", line 2447, in exe_domoticz
2022-02-07 00:03:22.408 'http://' + '127.0.0.1' + ':' + str(Parameters['Port']) + '/json.htm?' + params, timeout=2)
2022-02-07 00:03:22.408 File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
2022-02-07 00:03:22.408 return opener.open(url, data, timeout)
2022-02-07 00:03:22.408 File "/usr/lib/python3.7/urllib/request.py", line 531, in open
2022-02-07 00:03:22.408 response = meth(req, response)
2022-02-07 00:03:22.408 File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
2022-02-07 00:03:22.408 'http', request, response, code, msg, hdrs)
2022-02-07 00:03:22.408 File "/usr/lib/python3.7/urllib/request.py", line 569, in error
2022-02-07 00:03:22.408 return self._call_chain(*args)
2022-02-07 00:03:22.408 File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
2022-02-07 00:03:22.408 result = func(*args)
2022-02-07 00:03:22.408 File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
2022-02-07 00:03:22.408 raise HTTPError(req.full_url, code, msg, hdrs, fp)
2022-02-07 00:03:22.408 urllib.error.HTTPError: HTTP Error 401: Unauthorized
2022-02-07 00:03:22.408
2022-02-07 00:03:22.408 Error: Broadlink TV slaapkamer: Fout bij verzenden van opdracht naar Domoticz: type=command&param=getlog&loglevel=268435455
2022-02-07 00:04:18.578 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 00:04:18.578 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 00:04:44.577 Error: Broadlink TV woonkamer: Traceback (most recent call last):
2022-02-07 00:04:44.577 File "/home/pi/domoticz/plugins/Broadlink/plugin.py", line 2447, in exe_domoticz
2022-02-07 00:04:44.577 'http://' + '127.0.0.1' + ':' + str(Parameters['Port']) + '/json.htm?' + params, timeout=2)
2022-02-07 00:04:44.577 File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
2022-02-07 00:04:44.577 return opener.open(url, data, timeout)
2022-02-07 00:04:44.577 File "/usr/lib/python3.7/urllib/request.py", line 531, in open
2022-02-07 00:04:44.577 response = meth(req, response)
2022-02-07 00:04:44.577 File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
2022-02-07 00:04:44.577 'http', request, response, code, msg, hdrs)
2022-02-07 00:04:44.577 File "/usr/lib/python3.7/urllib/request.py", line 569, in error
2022-02-07 00:04:44.577 return self._call_chain(*args)
2022-02-07 00:04:44.577 File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
2022-02-07 00:04:44.577 result = func(*args)
2022-02-07 00:04:44.577 File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
2022-02-07 00:04:44.577 raise HTTPError(req.full_url, code, msg, hdrs, fp)
2022-02-07 00:04:44.577 urllib.error.HTTPError: HTTP Error 401: Unauthorized
2022-02-07 00:04:44.577
2022-02-07 00:04:44.577 Error: Broadlink TV woonkamer: Fout bij verzenden van opdracht naar Domoticz: type=command&param=getlog&loglevel=268435455
2022-02-07 00:04:53.855 Error: Broadlink TV slaapkamer: No transport, write directive to '192.168.178.35:55550' ignored.
2022-02-07 00:04:56.243 Error: Broadlink TV slaapkamer: Traceback (most recent call last):
2022-02-07 00:04:56.243 File "/home/pi/domoticz/plugins/Broadlink/plugin.py", line 2447, in exe_domoticz
2022-02-07 00:04:56.243 'http://' + '127.0.0.1' + ':' + str(Parameters['Port']) + '/json.htm?' + params, timeout=2)
2022-02-07 00:04:56.243 File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
2022-02-07 00:04:56.243 return opener.open(url, data, timeout)
2022-02-07 00:04:56.243 File "/usr/lib/python3.7/urllib/request.py", line 531, in open
2022-02-07 00:04:56.243 response = meth(req, response)
2022-02-07 00:04:56.243 File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
2022-02-07 00:04:56.243 'http', request, response, code, msg, hdrs)
2022-02-07 00:04:56.243 File "/usr/lib/python3.7/urllib/request.py", line 569, in error
2022-02-07 00:04:56.243 return self._call_chain(*args)
2022-02-07 00:04:56.243 File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
2022-02-07 00:04:56.243 result = func(*args)
2022-02-07 00:04:56.243 File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
2022-02-07 00:04:56.243 raise HTTPError(req.full_url, code, msg, hdrs, fp)
2022-02-07 00:04:56.243 urllib.error.HTTPError: HTTP Error 401: Unauthorized
2022-02-07 00:04:56.243
2022-02-07 00:04:56.243 Error: Broadlink TV slaapkamer: Fout bij verzenden van opdracht naar Domoticz: type=command&param=getlog&loglevel=268435455
2022-02-07 00:08:56.044 Error: Broadlink TV woonkamer: No transport, write directive to '192.168.178.35:55674' ignored.

© 2012-2022 Domoticz | WWW: Domoticz.com
×
Conversion history
No conversion in history
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 »

Zak45,

I understand you do not have a second Broadlink unit but
would it be possible for you to define in Domoticz a second Broadlink unit with a different ip address.
After the reboot I get for this not connected unit the same error message : (Broadlink) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Broadlink/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
So before even the connection you get an error message.
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

Ok, done.
I got the expected error, as not able to connect to the device:
Spoiler: show
2022-02-07 10:47:32.997 Status: Domoticz V2021.1 (build 13954) (c)2012-2021 GizMoCuz
2022-02-07 10:47:32.997 Status: Build Hash: 43ee2af49, Date: 2021-12-23 23:07:32
2022-02-07 10:47:32.997 Status: Startup Path: C:\Program Files (x86)\Domoticz\
2022-02-07 10:47:33.037 Status: PluginSystem: Started, Python version '3.7.5', 5 plugin definitions loaded.
2022-02-07 10:47:33.041 Status: WebServer(HTTP) started on address: :: with port 8080
2022-02-07 10:47:33.054 Status: WebServer(SSL) started on address: :: with port 443
2022-02-07 10:47:33.056 Status: TCPServer: shared server started...
2022-02-07 10:47:33.057 Status: RxQueue: queue worker started...
2022-02-07 10:47:33.289 Status: rm3: Stop directive received.
2022-02-07 10:47:33.289 Status: rm3: Stopping threads.
2022-02-07 10:47:33.289 Status: rm3: Stopped.
2022-02-07 10:47:33.290 Status: rm3: Started.
2022-02-07 10:47:33.290 Status: rm3: Entering work loop.
2022-02-07 10:47:33.633 Status: rm3: Initialized version 1.6.3, author 'zak45'
2022-02-07 10:47:35.075 Status: rm2: Started.
2022-02-07 10:47:35.075 Status: rm2: Entering work loop.
2022-02-07 10:47:35.075 Status: rm2bis: Started.
2022-02-07 10:47:35.075 Status: rm2bis: Entering work loop.
2022-02-07 10:47:35.076 Status: EventSystem: reset all events...
2022-02-07 10:47:35.076 Status: NotificationSystem: thread started...
2022-02-07 10:47:35.076 Status: EventSystem: reset all device statuses...
2022-02-07 10:47:35.104 Status: Python EventSystem: Initializing event module.
2022-02-07 10:47:35.105 Status: EventSystem: Started
2022-02-07 10:47:35.105 Status: EventSystem: Queue thread started...
2022-02-07 10:47:35.550 Status: PluginSystem: 3 plugins started.
2022-02-07 10:47:35.571 Status: rm2bis: Initialized version 1.6.3, author 'zak45'
2022-02-07 10:47:35.576 Status: rm2: Initialized version 1.6.3, author 'zak45'
2022-02-07 10:47:44.781 Error: rm3: Traceback (most recent call last):
2022-02-07 10:47:44.781 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 369, in send_packet
2022-02-07 10:47:44.781 response = cs.recvfrom(2048)
2022-02-07 10:47:44.781 socket.timeout: timed out
2022-02-07 10:47:44.781
2022-02-07 10:47:44.781 During handling of the above exception, another exception occurred:
2022-02-07 10:47:44.781
2022-02-07 10:47:44.781 Traceback (most recent call last):
2022-02-07 10:47:44.781 File "C:\Program Files (x86)\Domoticz\plugins\Broadlink\plugin.py", line 1803, in broadlink_connect
2022-02-07 10:47:44.781 DEVICE.auth()
2022-02-07 10:47:44.781 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 270, in auth
2022-02-07 10:47:44.781 response = self.send_packet(0x65, payload)
2022-02-07 10:47:44.781 File "C:\Program Files (x86)\Python37-32\lib\site-packages\broadlink\__init__.py", line 374, in send_packet
2022-02-07 10:47:44.781 raise exception(0xfffd)
2022-02-07 10:47:44.781 broadlink.exceptions.DeviceOfflineError: The device is offline
2022-02-07 10:47:44.781
2022-02-07 10:47:44.781 Error: rm3: Error to connect to Broadlink device: 192.168.1.34
2022-02-07 10:47:47.105 rm2bis: {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 10:47:47.105 rm2bis: processing data : {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 10:47:47.105 rm2bis: data process OK
2022-02-07 10:47:47.105 rm2bis: Sending 988 bytes of data
2022-02-07 10:47:47.105 rm3: Connected successfully to 127.0.0.1:59043
2022-02-07 10:47:47.105 rm3: Received 276 bytes of data
2022-02-07 10:47:47.105 rm3: onMessage called for connection: 127.0.0.1:59043
2022-02-07 10:47:47.106 rm3: We bypass URL check
2022-02-07 10:47:47.106 rm3: data:b'{"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}'
2022-02-07 10:47:47.106 rm3: {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 10:47:47.106 rm3: processing data : {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 10:47:47.106 rm3: data process OK
2022-02-07 10:47:47.106 Queued asynchronous read aborted (127.0.0.1:59049), [2] End of file.
2022-02-07 10:47:47.106 rm3: Sending 988 bytes of data
2022-02-07 10:47:47.107 Queued asynchronous read aborted (127.0.0.1:59043), [2] End of file.
2022-02-07 10:47:47.168 rm2bis: Disconnect event received for '127.0.0.1:59049'.
2022-02-07 10:47:47.168 rm2bis: onDisconnect called for connection 127.0.0.1:59049
2022-02-07 10:47:47.168 rm2bis: Server Connections:
2022-02-07 10:47:47.168 rm2bis: --> 127.0.0.1:59049'.
2022-02-07 10:47:47.168 rm3: Disconnect event received for '127.0.0.1:59043'.
2022-02-07 10:47:47.168 rm3: onDisconnect called for connection 127.0.0.1:59043
2022-02-07 10:47:47.168 rm3: Server Connections:
2022-02-07 10:47:47.169 rm3: --> 127.0.0.1:59043'.
2022-02-07 10:47:48.108 rm2: Protocol set to: 'HTTP'.
2022-02-07 10:47:48.108 rm2: Connected successfully to 127.0.0.1:59058
2022-02-07 10:47:48.171 rm2: Received 207 bytes of data
2022-02-07 10:47:48.171 rm2: Received 69 bytes of data
2022-02-07 10:47:48.171 rm2: onMessage called for connection: 127.0.0.1:59058
2022-02-07 10:47:48.171 rm2: We bypass URL check
2022-02-07 10:47:48.172 rm2: data:b'{"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}'
2022-02-07 10:47:48.172 rm2: {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 10:47:48.172 rm2: processing data : {"status":{"step":"remotePlugin","msg":"RemotePlugin OK","code":"0"}}
2022-02-07 10:47:48.172 rm2: data process OK
2022-02-07 10:47:48.172 rm2: Sending 988 bytes of data
2022-02-07 10:47:48.173 Queued asynchronous read aborted (127.0.0.1:59058), [2] End of file.
2022-02-07 10:47:48.233 rm2: Disconnect event received for '127.0.0.1:59058'.
2022-02-07 10:47:48.234 rm2: onDisconnect called for connection 127.0.0.1:59058
2022-02-07 10:47:48.234 rm2: Server Connections:
2022-02-07 10:47:48.235 rm2: --> 127.0.0.1:59058'.
2022-02-07 10:47:49.168 rm2bis: Protocol set to: 'HTTP'.
2022-02-07 10:47:49.168 rm3: Protocol set to: 'HTTP'.
2022-02-07 10:47:49.168 rm3: Connected successfully to 127.0.0.1:59063
2022-02-07 10:47:49.168 (rm3) Deallocating connection object '127.0.0.1:59043' (127.0.0.1:59043).
2022-02-07 10:47:49.169 rm3: Received 207 bytes of data
2022-02-07 10:47:49.169 rm3: Received 59 bytes of data
2022-02-07 10:47:49.169 rm3: onMessage called for connection: 127.0.0.1:59063
2022-02-07 10:47:49.169 rm3: We bypass URL check
2022-02-07 10:47:49.169 rm3: data:b'{"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}'
2022-02-07 10:47:49.169 rm3: {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 10:47:49.169 rm3: processing data : {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 10:47:49.169 (rm3 - RM2-Status) Updating device from 0:'Off' to have values 1:'END of remotePlugin'.
2022-02-07 10:47:49.173 rm3: Update 1:'END of remotePlugin' (rm3 - RM2-Status)
2022-02-07 10:47:49.173 rm3: data process OK
2022-02-07 10:47:49.173 rm3: Sending 988 bytes of data
2022-02-07 10:47:49.173 rm2bis: Connected successfully to 127.0.0.1:59062
2022-02-07 10:47:49.173 (rm2bis) Deallocating connection object '127.0.0.1:59049' (127.0.0.1:59049).
2022-02-07 10:47:49.174 rm2bis: Received 207 bytes of data
2022-02-07 10:47:49.174 rm2bis: Received 59 bytes of data
2022-02-07 10:47:49.174 rm2bis: onMessage called for connection: 127.0.0.1:59062
2022-02-07 10:47:49.174 rm2bis: We bypass URL check
2022-02-07 10:47:49.174 rm2bis: data:b'{"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}'
2022-02-07 10:47:49.174 rm2bis: {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 10:47:49.175 rm2bis: processing data : {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 10:47:49.175 (rm2bis - RM2-Status) Updating device from 1:'On' to have values 1:'END of remotePlugin'.
2022-02-07 10:47:49.179 rm2bis: Update 1:'END of remotePlugin' (rm2bis - RM2-Status)
2022-02-07 10:47:49.179 (rm2bis - RM2-Status) Updating device from 1:'END of remotePlugin' to have values 1:'On'.
2022-02-07 10:47:49.182 rm2bis: Update 1:'On' (rm2bis - RM2-Status)
2022-02-07 10:47:49.182 rm2bis: data process OK
2022-02-07 10:47:49.182 rm2bis: Sending 988 bytes of data
2022-02-07 10:47:49.182 Queued asynchronous read aborted (127.0.0.1:59063), [2] End of file.
2022-02-07 10:47:49.183 Queued asynchronous read aborted (127.0.0.1:59062), [2] End of file.
2022-02-07 10:47:49.230 rm3: Disconnect event received for '127.0.0.1:59063'.
2022-02-07 10:47:49.230 rm3: onDisconnect called for connection 127.0.0.1:59063
2022-02-07 10:47:49.230 rm3: Server Connections:
2022-02-07 10:47:49.230 rm3: --> 127.0.0.1:59063'.
2022-02-07 10:47:49.245 rm2bis: Disconnect event received for '127.0.0.1:59062'.
2022-02-07 10:47:49.245 rm2bis: onDisconnect called for connection 127.0.0.1:59062
2022-02-07 10:47:49.245 rm2bis: Server Connections:
2022-02-07 10:47:49.246 rm2bis: --> 127.0.0.1:59062'.
2022-02-07 10:47:50.228 rm2: Protocol set to: 'HTTP'.
2022-02-07 10:47:50.228 rm2: Connected successfully to 127.0.0.1:59067
2022-02-07 10:47:50.228 (rm2) Deallocating connection object '127.0.0.1:59058' (127.0.0.1:59058).
2022-02-07 10:47:50.229 rm2: Received 207 bytes of data
2022-02-07 10:47:50.229 rm2: Received 59 bytes of data
2022-02-07 10:47:50.229 rm2: onMessage called for connection: 127.0.0.1:59067
2022-02-07 10:47:50.230 rm2: We bypass URL check
2022-02-07 10:47:50.230 rm2: data:b'{"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}'
2022-02-07 10:47:50.230 rm2: {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 10:47:50.231 rm2: processing data : {"end":{"step":"remotePlugin","msg":"END of remotePlugin"}}
2022-02-07 10:47:50.231 (rm2 - RM2-Status) Updating device from 1:'On' to have values 1:'END of remotePlugin'.
2022-02-07 10:47:50.238 rm2: Update 1:'END of remotePlugin' (rm2 - RM2-Status)
2022-02-07 10:47:50.238 (rm2 - RM2-Status) Updating device from 1:'END of remotePlugin' to have values 1:'On'.
2022-02-07 10:47:50.244 rm2: Update 1:'On' (rm2 - RM2-Status)
2022-02-07 10:47:50.244 rm2: data process OK
2022-02-07 10:47:50.244 rm2: Sending 988 bytes of data
2022-02-07 10:47:50.245 Queued asynchronous read aborted (127.0.0.1:59067), [2] End of file.
2022-02-07 10:47:50.306 rm2: Disconnect event received for '127.0.0.1:59067'.
2022-02-07 10:47:50.306 rm2: onDisconnect called for connection 127.0.0.1:59067
2022-02-07 10:47:50.307 rm2: Server Connections:
2022-02-07 10:47:50.307 rm2: --> 127.0.0.1:59067'.

we need more investigation as I detected error http 401 from your log.
Can you confirm that you can connect to your Domoticz web instance without password ?
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 »

No password
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

you have also another error related to this topic:
viewtopic.php?t=37043
Spoiler: show
2022-02-07 00:04:18.578 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-02-07 00:04:18.578 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
Probably something new implemented to the plugin framework.
Will try to do some investigations on my side, on your side maybe do a post on this topic.
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

kollemt wrote: Monday 07 February 2022 11:02No password
ok, please show domoticz settings :
Capture.PNG
Capture.PNG (10.02 KiB) Viewed 2203 times
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest