Python Plugin : Broadlink

Python and python framework

Moderator: leecollings

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 »

Hogis wrote: Friday 17 July 2020 1:56 Getting this when trying to install:

IP/PORT OK
/home/pi/domoticz/plugins/broadlink
Installation initialized ......
________________________________________
# we retrieve Domoticz language
Traceback (most recent call last):
File "setup.py", line 72, in exe_domoticz
urllib.error.HTTPError: HTTP Error 401: Unauthorized

Error sending command to Domoticz :type=settings
Verify that you can access Domoticz without userrname/password.
local.PNG
local.PNG (11.94 KiB) Viewed 2114 times
Hogis
Posts: 12
Joined: Wednesday 01 July 2020 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Hogis »

zak45 wrote: Friday 17 July 2020 19:38

Verify that you can access Domoticz without userrname/password.
local.PNG
No, I can't even though I have added the addresses in settings.
xperiazn
Posts: 1
Joined: Wednesday 22 July 2020 20:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by xperiazn »

Hi,

I followed down procedure.
Downloaded setup.py. i use python 3.
But i have following error.
Any idea how to repair that?

2020-07-22 20:41:18.238 (Broadlink_MP1) lang file : /home/osmc/domoticz/plugins/BroadlinkRM2/lng/en_en.lng
2020-07-22 20:41:18.238 (Broadlink_MP1) Language loaded for : en
2020-07-22 20:41:18.239 (Broadlink_MP1) Listen on BROWebServer - Port: 10002
2020-07-22 20:41:18.245 (Broadlink_MP1) Plugin Device count start on : 9
2020-07-22 20:41:18.260 (Broadlink_MP1) Traceback (most recent call last):
2020-07-22 20:41:18.260 File "/home/osmc/domoticz/plugins/BroadlinkRM2/plugin.py", line 2734, in plugin_ver
2020-07-22 20:41:18.260 data = v.read()
2020-07-22 20:41:18.260 File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
2020-07-22 20:41:18.260 return codecs.ascii_decode(input, self.errors)[0]
2020-07-22 20:41:18.260 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 151843: ordinal not in range(128)
2020-07-22 20:41:18.260
2020-07-22 20:41:18.264 (Broadlink_MP1) Traceback (most recent call last):
2020-07-22 20:41:18.264 File "/home/osmc/domoticz/plugins/BroadlinkRM2/plugin.py", line 2734, in plugin_ver
2020-07-22 20:41:18.264 data = v.read()
2020-07-22 20:41:18.264 File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
2020-07-22 20:41:18.264 return codecs.ascii_decode(input, self.errors)[0]
2020-07-22 20:41:18.264 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 151843: ordinal not in range(128)
2020-07-22 20:41:18.264
2020-07-22 20:41:18.265 (Broadlink_MP1) Command line file created: /home/osmc/domoticz/plugins/BroadlinkRM2/log/26MP1.txt
2020-07-22 20:41:18.265 (Broadlink_MP1) Connecting to: 192.168.1.156 : xxxxxxxxxxxx
2020-07-22 20:41:18.285 (Broadlink_MP1) Connected to Broadlink device: 192.168.1.156 MP1
2020-07-22 20:41:18.435 (Broadlink_MP1) Traceback (most recent call last):
2020-07-22 20:41:18.435 File "/home/osmc/domoticz/plugins/BroadlinkRM2/plugin.py", line 2734, in plugin_ver
2020-07-22 20:41:18.435 data = v.read()
2020-07-22 20:41:18.435 File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
2020-07-22 20:41:18.435 return codecs.ascii_decode(input, self.errors)[0]
2020-07-22 20:41:18.435 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 151843: ordinal not in range(128)
2020-07-22 20:41:18.435
2020-07-22 20:41:18.440 (Broadlink_MP1) Admin html file created: /home/osmc/domoticz/www/templates/Broadlink-MP1-26.html
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 »

xperiazn wrote: Wednesday 22 July 2020 20:49 Hi,

I followed down procedure.
Downloaded setup.py. i use python 3.
But i have following error.
Any idea how to repair that?
2020-07-22 20:41:18.260 File "/home/osmc/domoticz/plugins/BroadlinkRM2/plugin.py", line 2734, in plugin_ver
2020-07-22 20:41:18.260 data = v.read()
2020-07-22 20:41:18.260 File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
2020-07-22 20:41:18.260 return codecs.ascii_decode(input, self.errors)[0]
2020-07-22 20:41:18.260 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 151843: ordinal not in range(128)
hi,
can you create folder 'Broadlink' and run setup from it ?
Romel
Posts: 15
Joined: Tuesday 06 August 2019 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Kromeriz / Czech
Contact:

Re: Python Plugin : Broadlink

Post by Romel »

Hi, somebody who can help me with:

Code: Select all

2020-07-22 21:51:11.587 Error: (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'.
2020-07-22 21:51:11.587 Error: (IR remote control) Module Import failed, exception: 'TypeError'
2020-07-22 21:51:11.587 Error: (IR remote control) Error Line details not available.
During install plugin - sudo python setup.py I got err "Error importing translate"
Thanks in advance
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 »

Romel wrote: Wednesday 22 July 2020 21:54 Hi, somebody who can help me with:

Code: Select all

2020-07-22 21:51:11.587 Error: (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'.
2020-07-22 21:51:11.587 Error: (IR remote control) Module Import failed, exception: 'TypeError'
2020-07-22 21:51:11.587 Error: (IR remote control) Error Line details not available.
During install plugin - sudo python setup.py I got err "Error importing translate"
Thanks in advance
do :
python --version

and show output.
Romel
Posts: 15
Joined: Tuesday 06 August 2019 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Kromeriz / Czech
Contact:

Re: Python Plugin : Broadlink

Post by Romel »

do :
python --version

and show output.
hi zak45,
output of python --version :
pi@raspberrypi:~ $ python --version
Python 3.7.3
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 »

Romel wrote: Wednesday 22 July 2020 22:14 output of python --version :
pi@raspberrypi:~ $ python --version
Python 3.7.3
that's look ok.

Can you redo the setup.py and show the last lines output (after checking installation ...) ?
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 »

Hogis wrote: Wednesday 22 July 2020 17:17 No, I can't even though I have added the addresses in settings.
can you try this :
wget http://192.168.x.xxx:yyyy --spider

replace x.xxx by Domoticz IP address
yyyy by Domoticz port

and show output ?
Hogis
Posts: 12
Joined: Wednesday 01 July 2020 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Hogis »

zak45 wrote: Thursday 23 July 2020 12:31
Hogis wrote: Wednesday 22 July 2020 17:17 No, I can't even though I have added the addresses in settings.
can you try this :
wget http://192.168.x.xxx:yyyy --spider

replace x.xxx by Domoticz IP address
yyyy by Domoticz port

and show output ?
Spider mode enabled. Check if remote file exists.
--2020-07-23 17:49:12-- http://192.168.x.x:xxxx/
Connecting to 192.168.x.x:xxxx... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74313 (73K) [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
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 »

Hogis wrote: Thursday 23 July 2020 17:51 Spider mode enabled. Check if remote file exists.
--2020-07-23 17:49:12-- http://192.168.x.x:xxxx/
Connecting to 192.168.x.x:xxxx... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74313 (73K) [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
that's look ok !

try setup.py and if still problem, you can do the manual installation...!
Romel
Posts: 15
Joined: Tuesday 06 August 2019 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Kromeriz / Czech
Contact:

Re: Python Plugin : Broadlink

Post by Romel »

zak45 wrote: Thursday 23 July 2020 12:21
Romel wrote: Wednesday 22 July 2020 22:14 output of python --version :
pi@raspberrypi:~ $ python --version
Python 3.7.3
that's look ok.

Can you redo the setup.py and show the last lines output (after checking installation ...) ?
Hi Zak45, here u r:

Code: Select all

Checking installation ....
----------------------------------------
Successfully imported googletrans
Error importing translate
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 »

Romel wrote: Friday 24 July 2020 20:33

Code: Select all

Checking installation ....
----------------------------------------
Successfully imported googletrans
Error importing translate
Can you do this :
sudo -H python -m pip install translate

and

sudo pip list

ans show the output ?
Hogis
Posts: 12
Joined: Wednesday 01 July 2020 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Hogis »

zak45 wrote: Thursday 23 July 2020 19:12
Hogis wrote: Thursday 23 July 2020 17:51 Spider mode enabled. Check if remote file exists.
--2020-07-23 17:49:12-- http://192.168.x.x:xxxx/
Connecting to 192.168.x.x:xxxx... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74313 (73K) [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
that's look ok !

try setup.py and if still problem, you can do the manual installation...!
After a manual installation:

2020-07-25 16:18:39.757 Status: Domoticz V2020.2 (build 12211) (c)2012-2020 GizMoCuz
2020-07-25 16:18:39.757 Status: Build Hash: 943863218-modified, Date: 2020-07-08 12:34:11
2020-07-25 16:18:39.757 Status: Startup Path: /home/pi/domoticz/
2020-07-25 16:18:40.214 Active notification Subsystems: kodi (1/13)
2020-07-25 16:18:40.266 Starting shared server on: :::6144
2020-07-25 16:18:40.205 Status: PluginSystem: Started, Python version '3.7.3'.
2020-07-25 16:18:40.211 Status: Philips Hue: Using default poll interval of 10 secs.
2020-07-25 16:18:40.245 Status: WebServer(HTTP) started on address: :: with port xxxx
2020-07-25 16:18:40.259 Status: WebServer(SSL) started on address: :: with port xxx
2020-07-25 16:18:40.267 Status: RxQueue: queue worker started...
2020-07-25 16:18:40.266 Status: TCPServer: shared server started...
2020-07-25 16:18:42.374 Kodi: (Kodi Stick) Starting thread.
2020-07-25 16:18:42.475 Kodi: Starting I/O service thread.
2020-07-25 16:18:42.268 Status: Kodi: Started
2020-07-25 16:18:42.268 Status: OpenWeatherMap: Started
2020-07-25 16:18:42.268 Status: Philips Hue: Worker started...
2020-07-25 16:18:42.269 Status: (Broadlink) Started.
2020-07-25 16:18:42.269 Status: Harmony Hub: Worker thread started...
2020-07-25 16:18:42.269 Status: NotificationSystem: thread started...
2020-07-25 16:18:42.270 Status: EventSystem: reset all events...
2020-07-25 16:18:42.281 Status: EventSystem: reset all device statuses...
2020-07-25 16:18:42.461 Status: PluginSystem: Entering work loop.
2020-07-25 16:18:42.523 Status: Python EventSystem: Initalizing event module.
2020-07-25 16:18:42.530 Status: EventSystem: Started
2020-07-25 16:18:42.530 Status: EventSystem: Queue thread started...
2020-07-25 16:18:42.772 Status: OpenZWave: using config in: /home/pi/domoticz/Config/
2020-07-25 16:18:42.850 Status: OpenZWave: Starting...
2020-07-25 16:18:42.850 Status: OpenZWave: Version: 1.6-1033-g3661f170

2020-07-25 16:18:44.405 (Broadlink) lang file : /home/pi/domoticz/plugins/broadlink/lng/en_en.lng
2020-07-25 16:18:44.405 (Broadlink) Language loaded for : en
2020-07-25 16:18:44.406 (Broadlink) Listen on BROWebServer - Port: 9000
2020-07-25 16:18:44.441 (Broadlink) Plugin Device count start on : 9
2020-07-25 16:18:44.442 (Broadlink) __File : /home/pi/domoticz/plugins/broadlink/log/13RM2M.txt exist, we bypass__
2020-07-25 16:18:44.442 (Broadlink) Connecting to: 192.168.x.xx : xxxxxxxxxxxxx
2020-07-25 16:18:44.393 Status: (Broadlink) Entering work loop.
2020-07-25 16:18:44.394 Status: (Broadlink) Initialized version 1.1.1, author 'zak45'

2020-07-25 16:18:54.499 (Broadlink) Update 0:'Off' (Broadlink - RM2M-Status)
2020-07-25 16:18:54.517 (Broadlink) Admin html file created: /home/pi/domoticz/www/templates/Broadlink-RM2M-13.html
2020-07-25 16:18:54.486 Error: (Broadlink) Traceback (most recent call last):
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 350, in send_packet
2020-07-25 16:18:54.486 response = cs.recvfrom(2048)
2020-07-25 16:18:54.486 socket.timeout: timed out
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 During handling of the above exception, another exception occurred:
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 Traceback (most recent call last):
2020-07-25 16:18:54.486 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 1772, in broadlink_connect
2020-07-25 16:18:54.486 DEVICE.auth()
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 251, in auth
2020-07-25 16:18:54.486 response = self.send_packet(0x65, payload)
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 355, in send_packet
2020-07-25 16:18:54.486 raise exception(0xfffd)
2020-07-25 16:18:54.486 broadlink.exceptions.DeviceOfflineError: The device is offline
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 Error: (Broadlink) Error to connect to Broadlink device: 192.168.x.xx
2020-07-25 16:18:54.553 Error: (Broadlink) Traceback (most recent call last):
2020-07-25 16:18:54.553 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 2373, in start_shell
2020-07-25 16:18:54.553 subprocess.check_call(command, shell=True, timeout=1)
2020-07-25 16:18:54.553 File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
2020-07-25 16:18:54.553 raise CalledProcessError(retcode, cmd)
2020-07-25 16:18:54.553 subprocess.CalledProcessError: Command '"/home/pi/domoticz/plugins/broadlink/scr/dombr.sh" "/home/pi/domoticz/plugins/broadlink/Dombroadlink.py" "192.168.x.x;xxxx;xxxxxxxxxx;/home/pi/domoticz/plugins/broadlink/;RM2M;192.168.x.xx;9000;0;13;/home/pi/domoticz/plugins/broadlink/;0;en;remotePlugin" no ' returned non-zero exit status 126.
2020-07-25 16:18:54.553
2020-07-25 16:18:54.553 Error: (Broadlink) ERROR to start subprocess

2020-07-25 16:20:14.514 (Broadlink) Connected to Broadlink device: 192.168.x.xx RM2
2020-07-25 16:20:14.532 (Broadlink) Update 1:'On' (Broadlink - RM2M-Status)
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 »

Hogis wrote: Saturday 25 July 2020 16:31 2020-07-25 16:18:54.517 (Broadlink) Admin html file created: /home/pi/domoticz/www/templates/Broadlink-RM2M-13.html
2020-07-25 16:18:54.486 Error: (Broadlink) Traceback (most recent call last):
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 350, in send_packet
2020-07-25 16:18:54.486 response = cs.recvfrom(2048)
2020-07-25 16:18:54.486 socket.timeout: timed out
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 During handling of the above exception, another exception occurred:
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 Traceback (most recent call last):
2020-07-25 16:18:54.486 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 1772, in broadlink_connect
2020-07-25 16:18:54.486 DEVICE.auth()
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 251, in auth
2020-07-25 16:18:54.486 response = self.send_packet(0x65, payload)
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 355, in send_packet
2020-07-25 16:18:54.486 raise exception(0xfffd)
2020-07-25 16:18:54.486 broadlink.exceptions.DeviceOfflineError: The device is offline
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 Error: (Broadlink) Error to connect to Broadlink device: 192.168.x.xx
2020-07-25 16:18:54.553 Error: (Broadlink) Traceback (most recent call last):
2020-07-25 16:18:54.553 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 2373, in start_shell
2020-07-25 16:18:54.553 subprocess.check_call(command, shell=True, timeout=1)
2020-07-25 16:18:54.553 File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
2020-07-25 16:18:54.553 raise CalledProcessError(retcode, cmd)
2020-07-25 16:18:54.553 subprocess.CalledProcessError: Command '"/home/pi/domoticz/plugins/broadlink/scr/dombr.sh" "/home/pi/domoticz/plugins/broadlink/Dombroadlink.py" "192.168.x.x;xxxx;xxxxxxxxxx;/home/pi/domoticz/plugins/broadlink/;RM2M;192.168.x.xx;9000;0;13;/home/pi/domoticz/plugins/broadlink/;0;en;remotePlugin" no ' returned non-zero exit status 126.
2020-07-25 16:18:54.553
2020-07-25 16:18:54.553 Error: (Broadlink) ERROR to start subprocess
Error 126 for “command not executable"
Verify dombr.sh is executable (chmod +x)

For device connection: double check your settings and that the device is not linked to the Broadlink app.
Hogis
Posts: 12
Joined: Wednesday 01 July 2020 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Hogis »

zak45 wrote: Saturday 25 July 2020 21:33
Hogis wrote: Saturday 25 July 2020 16:31 2020-07-25 16:18:54.517 (Broadlink) Admin html file created: /home/pi/domoticz/www/templates/Broadlink-RM2M-13.html
2020-07-25 16:18:54.486 Error: (Broadlink) Traceback (most recent call last):
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 350, in send_packet
2020-07-25 16:18:54.486 response = cs.recvfrom(2048)
2020-07-25 16:18:54.486 socket.timeout: timed out
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 During handling of the above exception, another exception occurred:
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 Traceback (most recent call last):
2020-07-25 16:18:54.486 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 1772, in broadlink_connect
2020-07-25 16:18:54.486 DEVICE.auth()
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 251, in auth
2020-07-25 16:18:54.486 response = self.send_packet(0x65, payload)
2020-07-25 16:18:54.486 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 355, in send_packet
2020-07-25 16:18:54.486 raise exception(0xfffd)
2020-07-25 16:18:54.486 broadlink.exceptions.DeviceOfflineError: The device is offline
2020-07-25 16:18:54.486
2020-07-25 16:18:54.486 Error: (Broadlink) Error to connect to Broadlink device: 192.168.x.xx
2020-07-25 16:18:54.553 Error: (Broadlink) Traceback (most recent call last):
2020-07-25 16:18:54.553 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 2373, in start_shell
2020-07-25 16:18:54.553 subprocess.check_call(command, shell=True, timeout=1)
2020-07-25 16:18:54.553 File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
2020-07-25 16:18:54.553 raise CalledProcessError(retcode, cmd)
2020-07-25 16:18:54.553 subprocess.CalledProcessError: Command '"/home/pi/domoticz/plugins/broadlink/scr/dombr.sh" "/home/pi/domoticz/plugins/broadlink/Dombroadlink.py" "192.168.x.x;xxxx;xxxxxxxxxx;/home/pi/domoticz/plugins/broadlink/;RM2M;192.168.x.xx;9000;0;13;/home/pi/domoticz/plugins/broadlink/;0;en;remotePlugin" no ' returned non-zero exit status 126.
2020-07-25 16:18:54.553
2020-07-25 16:18:54.553 Error: (Broadlink) ERROR to start subprocess
Error 126 for “command not executable"
Verify dombr.sh is executable (chmod +x)

For device connection: double check your settings and that the device is not linked to the Broadlink app.
OK, setting dombr.sh to exec made some erors go away and now I have this:

2020-07-26 14:38:54.934 (Broadlink) Update 0:'Off' (Broadlink - RM2M-Status)
2020-07-26 14:38:54.955 (Broadlink) Admin html file created: /home/pi/domoticz/www/templates/Broadlink-RM2M-13.html
2020-07-26 14:38:54.918 Error: (Broadlink) Traceback (most recent call last):
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 350, in send_packet
2020-07-26 14:38:54.918 response = cs.recvfrom(2048)
2020-07-26 14:38:54.918 socket.timeout: timed out
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 During handling of the above exception, another exception occurred:
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 Traceback (most recent call last):
2020-07-26 14:38:54.918 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 1772, in broadlink_connect
2020-07-26 14:38:54.918 DEVICE.auth()
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 251, in auth
2020-07-26 14:38:54.918 response = self.send_packet(0x65, payload)
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 355, in send_packet
2020-07-26 14:38:54.918 raise exception(0xfffd)
2020-07-26 14:38:54.918 broadlink.exceptions.DeviceOfflineError: The device is offline
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 Error: (Broadlink) Error to connect to Broadlink device: 192.168.x.xx

2020-07-26 14:39:11.298 (Broadlink) Update 1:'END of remotePlugin' (Broadlink - RM2M-Status)

2020-07-26 14:40:15.214 (Broadlink) Connected to Broadlink device: 192.168.x.xx RM2
2020-07-26 14:40:15.230 (Broadlink) Update 1:'On' (Broadlink - RM2M-Status)

Device is only linked to e-Conrtrol app.
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 »

Hogis wrote: Sunday 26 July 2020 15:02
2020-07-26 14:38:54.934 (Broadlink) Update 0:'Off' (Broadlink - RM2M-Status)
2020-07-26 14:38:54.955 (Broadlink) Admin html file created: /home/pi/domoticz/www/templates/Broadlink-RM2M-13.html
2020-07-26 14:38:54.918 Error: (Broadlink) Traceback (most recent call last):
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 350, in send_packet
2020-07-26 14:38:54.918 response = cs.recvfrom(2048)
2020-07-26 14:38:54.918 socket.timeout: timed out
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 During handling of the above exception, another exception occurred:
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 Traceback (most recent call last):
2020-07-26 14:38:54.918 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 1772, in broadlink_connect
2020-07-26 14:38:54.918 DEVICE.auth()
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 251, in auth
2020-07-26 14:38:54.918 response = self.send_packet(0x65, payload)
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 355, in send_packet
2020-07-26 14:38:54.918 raise exception(0xfffd)
2020-07-26 14:38:54.918 broadlink.exceptions.DeviceOfflineError: The device is offline
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 Error: (Broadlink) Error to connect to Broadlink device: 192.168.x.xx

2020-07-26 14:39:11.298 (Broadlink) Update 1:'END of remotePlugin' (Broadlink - RM2M-Status)

2020-07-26 14:40:15.214 (Broadlink) Connected to Broadlink device: 192.168.x.xx RM2
2020-07-26 14:40:15.230 (Broadlink) Update 1:'On' (Broadlink - RM2M-Status)

Device is only linked to e-Conrtrol app.
ok, looks like it connect after few seconds....

do a network scan and show the output.
show the content of the /home/pi/domoticz/plugins/broadlink/log/13RM2M.txt file
Hogis
Posts: 12
Joined: Wednesday 01 July 2020 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Hogis »

zak45 wrote: Sunday 26 July 2020 15:53
Hogis wrote: Sunday 26 July 2020 15:02
2020-07-26 14:38:54.934 (Broadlink) Update 0:'Off' (Broadlink - RM2M-Status)
2020-07-26 14:38:54.955 (Broadlink) Admin html file created: /home/pi/domoticz/www/templates/Broadlink-RM2M-13.html
2020-07-26 14:38:54.918 Error: (Broadlink) Traceback (most recent call last):
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 350, in send_packet
2020-07-26 14:38:54.918 response = cs.recvfrom(2048)
2020-07-26 14:38:54.918 socket.timeout: timed out
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 During handling of the above exception, another exception occurred:
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 Traceback (most recent call last):
2020-07-26 14:38:54.918 File "/home/pi/domoticz/plugins/broadlink/plugin.py", line 1772, in broadlink_connect
2020-07-26 14:38:54.918 DEVICE.auth()
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 251, in auth
2020-07-26 14:38:54.918 response = self.send_packet(0x65, payload)
2020-07-26 14:38:54.918 File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 355, in send_packet
2020-07-26 14:38:54.918 raise exception(0xfffd)
2020-07-26 14:38:54.918 broadlink.exceptions.DeviceOfflineError: The device is offline
2020-07-26 14:38:54.918
2020-07-26 14:38:54.918 Error: (Broadlink) Error to connect to Broadlink device: 192.168.x.xx

2020-07-26 14:39:11.298 (Broadlink) Update 1:'END of remotePlugin' (Broadlink - RM2M-Status)

2020-07-26 14:40:15.214 (Broadlink) Connected to Broadlink device: 192.168.x.xx RM2
2020-07-26 14:40:15.230 (Broadlink) Update 1:'On' (Broadlink - RM2M-Status)

Device is only linked to e-Conrtrol app.
ok, looks like it connect after few seconds....

do a network scan and show the output.
show the content of the /home/pi/domoticz/plugins/broadlink/log/13RM2M.txt file
Network scan?
And I can't view 13RM2M.txt or change permission to access the file...
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 »

Hogis wrote: Sunday 26 July 2020 16:23
Network scan?
And I can't view 13RM2M.txt or change permission to access the file...
For the scan, two options:
first one :
nscan.PNG
nscan.PNG (114.59 KiB) Viewed 1920 times
or

open term session, go to plugin directory and run
sudo python broadlink_discovery.py


for the rights... hope you have root rights.
Hogis
Posts: 12
Joined: Wednesday 01 July 2020 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Hogis »

zak45 wrote: Sunday 26 July 2020 16:36
Hogis wrote: Sunday 26 July 2020 16:23
Network scan?
And I can't view 13RM2M.txt or change permission to access the file...
For the scan, two options:
first one :
nscan.PNG

or

open term session, go to plugin directory and run
sudo python broadlink_discovery.py


for the rights... hope you have root rights.
Ok,

"0x2712 192.168.0.10 780f771852b7" and "Found 0 devices --2020-07-26 17:03:15"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest