Python Plugin: Broadlink RM2 V3

Python and python framework
Bundy75
Posts: 7
Joined: Friday 08 June 2018 7:26
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by Bundy75 » Monday 11 June 2018 17:35

Thanks for your suggestion - I've removed pycrypto and now it's slightly better but still no perfect ;-)

Code: Select all

2018-06-11 17:27:24.126 (RM3) Device ID: '48'
2018-06-11 17:27:24.126 (RM3) Device Name: 'RM3 - Command'
2018-06-11 17:27:24.126 (RM3) Device nValue: 0
2018-06-11 17:27:24.126 (RM3) Device sValue: ''
2018-06-11 17:27:24.126 (RM3) Device LastLevel: 0
2018-06-11 17:27:24.126 (RM3) Device: 254 - ID: 49, Name: 'RM3 - Remote', nValue: 0, sValue: ''
2018-06-11 17:27:24.126 (RM3) Device ID: '49'
2018-06-11 17:27:24.126 (RM3) Device Name: 'RM3 - Remote'
2018-06-11 17:27:24.126 (RM3) Device nValue: 0
2018-06-11 17:27:24.126 (RM3) Device sValue: ''
2018-06-11 17:27:24.126 (RM3) Device LastLevel: 0
2018-06-11 17:27:24.126 (RM3) Device: 255 - ID: 50, Name: 'RM3 - Import', nValue: 0, sValue: ''
2018-06-11 17:27:24.126 (RM3) Device ID: '50'
2018-06-11 17:27:24.126 (RM3) Device Name: 'RM3 - Import'
2018-06-11 17:27:24.126 (RM3) Device nValue: 0
2018-06-11 17:27:24.126 (RM3) Device sValue: ''
2018-06-11 17:27:24.126 (RM3) Device LastLevel: 0
2018-06-11 17:27:24.126 (RM3 - Import) Updating device from 0:'' to have values 0:'Off'.
2018-06-11 17:27:24.131 (RM3) Update 0:'Off' (RM3 - Import)
2018-06-11 17:27:24.131 (RM3) Connecting to: 192.168.0.216:34EA34BB1E4B
2018-06-11 17:27:24.147 Error: (RM3) Error Connecting to Broadlink device....
2018-06-11 17:27:24.147 (RM3 - Command) Updating device from 0:'' to have values 0:'Off'.
2018-06-11 17:27:24.152 (RM3) Update 0:'Off' (RM3 - Command)
2018-06-11 17:27:24.152 (RM3) Device Number begin to : 1
2018-06-11 17:27:24.155 (RM3) No ini file :C:/BroadlinkRM2/remote/plugin_remote_17.ini
2018-06-11 17:27:24.155 (RM3) Custom Commands for Remote not managed
2018-06-11 17:27:24.155 (RM3) Heartbeat interval set to: 30.
2018-06-11 17:27:24.155 (RM3) Heartbeat interval set to: 30.
Plugin produces more output to the log but it still fails to connect to Broadlink.
When I try to click "Learn" I receive the following error (broadlink 0.5 installed)

Code: Select all

2018-06-11 17:32:21.036 User: Admin initiated a switch command (48/RM3 - Command/Set Level)
2018-06-11 17:32:21.079 (RM3) Calling message handler 'onCommand'.
2018-06-11 17:32:21.079 (RM3) onCommand called for Unit 1: Parameter 'Set Level', Level: 10 , Connected : False
2018-06-11 17:32:21.092 Error: (RM3) Error Connecting to Broadlink device....
2018-06-11 17:32:21.092 (RM3) All plugin system is on pause for 5s...
2018-06-11 17:32:21.092 (RM3) When Broadlink led is lit press the button on your remote within 5 seconds
2018-06-11 17:32:21.098 Error: (RM3) 'onCommand' failed 'TypeError':'sequence item 0: expected str instance, bytes found'.
2018-06-11 17:32:21.098 Error: (RM3) ----> Line 158 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-06-11 17:32:21.098 Error: (RM3) ----> Line 417 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function learn
2018-06-11 17:32:21.098 Error: (RM3) ----> Line 487 in /usr/lib/python3.4/broadlink/__init__.py, function enter_learning
2018-06-11 17:32:21.098 Error: (RM3) ----> Line 258 in /usr/lib/python3.4/broadlink/__init__.py, function send_packet
2018-06-11 17:32:21.098 Error: (RM3) ----> Line 162 in /usr/lib/python3.4/broadlink/__init__.py, function encrypt_pyaes

Bundy75
Posts: 7
Joined: Friday 08 June 2018 7:26
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by Bundy75 » Monday 11 June 2018 18:20

I think that I've managed to solve it!!!
Uninstalled 'pyaes' and installed pycrypto instead and it did the trick :-) Now it works like a charm. Thanks Zak for your huge effort and help!

reza
Posts: 145
Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by reza » Friday 15 June 2018 11:15

dear zak, please help me about this topic:
http://www.domoticz.com/forum/viewtopic.php?f=4&t=23843

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests