Python Plugin : Broadlink RM2 V4

Python and python framework
HarleyZard
Posts: 9
Joined: Tuesday 24 April 2018 22:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by HarleyZard » Wednesday 30 May 2018 22:22

Hi Zak45,

I can't use the plugin :|
I can use the discovery, but after I've a remote device, and when I push on it, i have an error withe the plugin :
pi@raspberrypi:~/domoticz $ sudo ./domoticz
2018-05-30 22:16:35.948 Domoticz V3.9476 (c)2012-2018 GizMoCuz
2018-05-30 22:16:35.948 Build Hash: 0747e583, Date: 2018-05-23 15:11:16
2018-05-30 22:16:35.949 Startup Path: /home/pi/domoticz/
2018-05-30 22:16:36.002 Sunrise: 05:42:00 SunSet: 21:49:00
2018-05-30 22:16:36.002 Day length: 16:07:00 Sun at south: 13:05:00
2018-05-30 22:16:36.002 Civil twilight start: 04:59:00 Civil twilight end: 22:32:00
2018-05-30 22:16:36.002 Nautical twilight start: 03:57:00 Nautical twilight end: 23:34:00
2018-05-30 22:16:36.002 There is no astronomical twilight in the space of 24 hours
2018-05-30 22:16:36.002 EventSystem: reset all events...
2018-05-30 22:16:36.082 PluginSystem: Started, Python version '3.4.4'.
2018-05-30 22:16:36.090 Active notification Subsystems: (0/14)
2018-05-30 22:16:36.092 WebServer(HTTP) started on address: :: with port 8080
2018-05-30 22:16:36.097 WebServer(SSL) started on address: :: with port 443
2018-05-30 22:16:36.098 Proxymanager started.
2018-05-30 22:16:36.100 Starting shared server on: :::6144
2018-05-30 22:16:36.100 TCPServer: shared server started...
2018-05-30 22:16:36.100 RxQueue: queue worker started...
2018-05-30 22:16:38.101 (MyBR) Started.
2018-05-30 22:16:38.102 EventSystem: reset all events...
2018-05-30 22:16:38.103 EventSystem: reset all device statuses...
2018-05-30 22:16:38.237 Python EventSystem: Initalizing event module.
2018-05-30 22:16:38.237 EventSystem: Started
2018-05-30 22:16:38.237 EventSystem: Queue thread started...
2018-05-30 22:16:38.504 PluginSystem: Entering work loop.
2018-05-30 22:16:38.717 (MyBR) Entering work loop.
2018-05-30 22:16:38.718 (MyBR) Initialized version 4.1.0, author 'zak45'
2018-05-30 22:16:38.720 (MyBR) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-05-30 22:16:38.721 (MyBR) 'Version':'4.1.0'
2018-05-30 22:16:38.721 (MyBR) 'Key':'BroadlinkRM2'
2018-05-30 22:16:38.721 (MyBR) 'Mode1':'34ea3443159c'
2018-05-30 22:16:38.721 (MyBR) 'Author':'zak45'
2018-05-30 22:16:38.721 (MyBR) 'Name':'MyBR'
2018-05-30 22:16:38.721 (MyBR) 'Mode4':'no'
2018-05-30 22:16:38.721 (MyBR) 'Mode5':'9000'
2018-05-30 22:16:38.722 (MyBR) 'Address':'192.168.0.21'
2018-05-30 22:16:38.722 (MyBR) 'Port':'0'
2018-05-30 22:16:38.722 (MyBR) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2018-05-30 22:16:38.722 (MyBR) 'DomoticzVersion':'3.9476'
2018-05-30 22:16:38.722 (MyBR) 'DomoticzHash':'0747e583'
2018-05-30 22:16:38.722 (MyBR) 'HardwareID':'2'
2018-05-30 22:16:38.722 (MyBR) 'DomoticzBuildTime':'2018-05-23 15:11:16'
2018-05-30 22:16:38.722 (MyBR) 'Mode3':'RM2T'
2018-05-30 22:16:38.723 (MyBR) 'Mode2':'/home/pi'
2018-05-30 22:16:38.723 (MyBR) 'Mode6':'Debug'
2018-05-30 22:16:38.723 (MyBR) Device count: 3
2018-05-30 22:16:38.723 (MyBR) Device: 1 - ID: 1, Name: 'MyBR - Discovery', nValue: 1, sValue: '10'
2018-05-30 22:16:38.723 (MyBR) Device ID: '1'
2018-05-30 22:16:38.723 (MyBR) Device Name: 'MyBR - Discovery'
2018-05-30 22:16:38.723 (MyBR) Device nValue: 1
2018-05-30 22:16:38.724 (MyBR) Device sValue: '10'
2018-05-30 22:16:38.724 (MyBR) Device LastLevel: 0
2018-05-30 22:16:38.724 (MyBR) Device: 2 - ID: 2, Name: 'MyBR - Discovery Info', nValue: 1, sValue: '0.0'
2018-05-30 22:16:38.724 (MyBR) Device ID: '2'
2018-05-30 22:16:38.724 (MyBR) Device Name: 'MyBR - Discovery Info'
2018-05-30 22:16:38.724 (MyBR) Device nValue: 1
2018-05-30 22:16:38.724 (MyBR) Device sValue: '0.0'
2018-05-30 22:16:38.724 (MyBR) Device LastLevel: 0
2018-05-30 22:16:38.724 (MyBR) Device: 254 - ID: 3, Name: 'MyBR - Remote', nValue: 0, sValue: ''
2018-05-30 22:16:38.725 (MyBR) Device ID: '3'
2018-05-30 22:16:38.725 (MyBR) Device Name: 'MyBR - Remote'
2018-05-30 22:16:38.725 (MyBR) Device nValue: 0
2018-05-30 22:16:38.725 (MyBR) Device sValue: ''
2018-05-30 22:16:38.725 (MyBR) Device LastLevel: 0
2018-05-30 22:16:38.725 (MyBR) Pushing 'PollIntervalDirective' on to queue
2018-05-30 22:16:38.725 (MyBR) Connecting to: 192.168.0.21:34ea3443159c
2018-05-30 22:16:38.806 (MyBR) Connected to Broadlink device: 192.168.0.21
2018-05-30 22:16:38.818 (MyBR) No ini file :/home/pi/remote/plugin_remote_2.ini
2018-05-30 22:16:38.819 (MyBR) Custom Commands for Remote not managed
2018-05-30 22:16:38.819 (MyBR) Device Number begin to : 2
2018-05-30 22:16:38.819 (MyBR) Processing 'PollIntervalDirective' message
2018-05-30 22:16:38.819 (MyBR) Heartbeat interval set to: 30.
2018-05-30 22:16:42.714 User: Admin initiated a switch command (3/MyBR - Remote/On)
2018-05-30 22:16:42.716 (MyBR) Pushing 'onCommandCallback' on to queue
2018-05-30 22:16:42.727 (MyBR) Processing 'onCommandCallback' message
2018-05-30 22:16:42.727 (MyBR) Calling message handler 'onCommand'.
2018-05-30 22:16:42.728 (MyBR) onCommand called for Unit 254: Parameter 'On', Level: 0 , Connected : True
2018-05-30 22:16:42.728 (MyBR) Generate on Command for learned code stored on unit/ini :254
2018-05-30 22:16:42.730 Error: (MyBR) 'onCommand' failed 'NoSectionError'.
2018-05-30 22:16:42.731 Error: (MyBR) ----> Line 314 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-05-30 22:16:42.732 Error: (MyBR) ----> Line 528 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function genCommand
2018-05-30 22:16:42.732 Error: (MyBR) ----> Line 756 in /usr/lib/python3.4/configparser.py, function get
2018-05-30 22:16:42.732 Error: (MyBR) ----> Line 1118 in /usr/lib/python3.4/configparser.py, function _unify_values

2018-05-30 22:16:48.219 (MyBR) Pushing 'onHeartbeatCallback' on to queue
2018-05-30 22:16:48.243 (MyBR) Processing 'onHeartbeatCallback' message
2018-05-30 22:16:48.243 (MyBR) Calling message handler 'onHeartbeat'.
2018-05-30 22:16:48.405 (MyBR - Discovery Info) Updating device from 1:'0.0' to have values 1:'0.0'.
2018-05-30 22:16:48.413 (MyBR) Update 1:'0.0' (MyBR - Discovery Info)
cccc^C2018-05-30 22:17:01.509 Closing application!...
2018-05-30 22:17:01.509 Stopping worker...
2018-05-30 22:17:01.509 RxQueue: queue worker stopped...
2018-05-30 22:17:01.510 WebServer(HTTP) stopped
2018-05-30 22:17:02.011 WebServer(SSL) stopped
2018-05-30 22:17:02.512 TCPServer: shared server stopped
2018-05-30 22:17:02.512 Stopping all hardware...
2018-05-30 22:17:02.512 (MyBR) Stop directive received.
2018-05-30 22:17:02.512 (MyBR) Pushing 'onStopCallback' on to queue
2018-05-30 22:17:02.542 (MyBR) Processing 'onStopCallback' message
2018-05-30 22:17:02.542 (MyBR) Calling message handler 'onStop'.
2018-05-30 22:17:02.542 (MyBR) onStop called
2018-05-30 22:17:02.613 (MyBR) Stopping threads.
2018-05-30 22:17:02.722 (MyBR) Exiting work loop.
2018-05-30 22:17:02.722 (MyBR) Stopped.
2018-05-30 22:17:03.102 Scheduler stopped...
2018-05-30 22:17:03.242 EventSystem: Stopped...
2018-05-30 22:17:03.262 EventSystem - Python stopped...
2018-05-30 22:17:03.606 PluginSystem: Exiting work loop.
2018-05-30 22:17:03.642 PluginSystem: Stopped.
2018-05-30 22:17:03.742 Mainworker Stopped...
pi@raspberrypi:~/domoticz $
and I've not a Command button...

Do ou have an idea ?

Tanks,
HarleyZard

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Wednesday 30 May 2018 23:17

HarleyZard wrote:
Wednesday 30 May 2018 22:22
Hi Zak45,

I can't use the plugin :|
I can use the discovery, but after I've a remote device, and when I push on it, i have an error withe the plugin :
and I've not a Command button...

Do ou have an idea ?

Tanks,
HarleyZard
You need to create another hardware, not modify the discovery one. this one is here only to help to find IP address. After, need to be removed.

HarleyZard
Posts: 9
Joined: Tuesday 24 April 2018 22:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by HarleyZard » Friday 01 June 2018 19:10

Hi Zak45,

I have now the Command Button, after remove and insert a new material.
Thanks ! :)

But I've always the same errors in the logs : :roll:
pi@raspberrypi:~/domoticz $ sudo ./domoticz
2018-06-01 19:02:07.653 Domoticz V3.9476 (c)2012-2018 GizMoCuz
2018-06-01 19:02:07.653 Build Hash: 0747e583, Date: 2018-05-23 15:11:16
2018-06-01 19:02:07.654 Startup Path: /home/pi/domoticz/
2018-06-01 19:02:07.692 Sunrise: 05:40:00 SunSet: 21:51:00
2018-06-01 19:02:07.692 Day length: 16:10:00 Sun at south: 13:05:00
2018-06-01 19:02:07.692 Civil twilight start: 04:57:00 Civil twilight end: 22:35:00
2018-06-01 19:02:07.692 Nautical twilight start: 03:54:00 Nautical twilight end: 23:38:00
2018-06-01 19:02:07.692 There is no astronomical twilight in the space of 24 hours
2018-06-01 19:02:07.692 EventSystem: reset all events...
2018-06-01 19:02:07.769 PluginSystem: Started, Python version '3.4.4'.
2018-06-01 19:02:07.778 Active notification Subsystems: (0/14)
2018-06-01 19:02:07.779 WebServer(HTTP) started on address: :: with port 8080
2018-06-01 19:02:07.784 WebServer(SSL) started on address: :: with port 443
2018-06-01 19:02:07.785 Proxymanager started.
2018-06-01 19:02:07.787 Starting shared server on: :::6144
2018-06-01 19:02:07.787 TCPServer: shared server started...
2018-06-01 19:02:07.787 RxQueue: queue worker started...
2018-06-01 19:02:09.788 EventSystem: reset all events...
2018-06-01 19:02:09.789 EventSystem: reset all device statuses...
2018-06-01 19:02:09.907 Python EventSystem: Initalizing event module.
2018-06-01 19:02:09.907 EventSystem: Started
2018-06-01 19:02:09.907 EventSystem: Queue thread started...
2018-06-01 19:02:10.194 PluginSystem: Entering work loop.
2018-06-01 19:03:23.656 (BRSalon) Started.
2018-06-01 19:03:23.993 (BRSalon) Entering work loop.
2018-06-01 19:03:23.994 (BRSalon) Initialized version 4.1.0, author 'zak45'
2018-06-01 19:03:23.996 (BRSalon) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-06-01 19:03:23.996 (BRSalon) Creating device 'Command'.
2018-06-01 19:03:24.002 (BRSalon) Creating device 'Temp'.
2018-06-01 19:03:24.004 (BRSalon) Creating device 'Remote'.
2018-06-01 19:03:24.005 (BRSalon) 'DomoticzVersion':'3.9476'
2018-06-01 19:03:24.005 (BRSalon) 'Address':'192.168.0.21'
2018-06-01 19:03:24.006 (BRSalon) 'DomoticzBuildTime':'2018-05-23 15:11:16'
2018-06-01 19:03:24.006 (BRSalon) 'Version':'4.1.0'
2018-06-01 19:03:24.006 (BRSalon) 'Mode5':'9000'
2018-06-01 19:03:24.006 (BRSalon) 'Mode6':'Debug'
2018-06-01 19:03:24.006 (BRSalon) 'DomoticzHash':'0747e583'
2018-06-01 19:03:24.006 (BRSalon) 'Mode4':'no'
2018-06-01 19:03:24.006 (BRSalon) 'Key':'BroadlinkRM2'
2018-06-01 19:03:24.006 (BRSalon) 'HardwareID':'2'
2018-06-01 19:03:24.006 (BRSalon) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2018-06-01 19:03:24.007 (BRSalon) 'Author':'zak45'
2018-06-01 19:03:24.007 (BRSalon) 'Name':'BRSalon'
2018-06-01 19:03:24.007 (BRSalon) 'Mode3':'RM2T'
2018-06-01 19:03:24.007 (BRSalon) 'Mode2':'/home/pi'
2018-06-01 19:03:24.007 (BRSalon) 'Mode1':'34ea3443159c'
2018-06-01 19:03:24.007 (BRSalon) 'Port':'0'
2018-06-01 19:03:24.007 (BRSalon) Device count: 3
2018-06-01 19:03:24.007 (BRSalon) Device: 1 - ID: 1, Name: 'BRSalon - Command', nValue: 0, sValue: ''
2018-06-01 19:03:24.007 (BRSalon) Device ID: '1'
2018-06-01 19:03:24.007 (BRSalon) Device Name: 'BRSalon - Command'
2018-06-01 19:03:24.007 (BRSalon) Device nValue: 0
2018-06-01 19:03:24.007 (BRSalon) Device sValue: ''
2018-06-01 19:03:24.007 (BRSalon) Device LastLevel: 0
2018-06-01 19:03:24.007 (BRSalon) Device: 2 - ID: 2, Name: 'BRSalon - Temp', nValue: 0, sValue: ''
2018-06-01 19:03:24.007 (BRSalon) Device ID: '2'
2018-06-01 19:03:24.008 (BRSalon) Device Name: 'BRSalon - Temp'
2018-06-01 19:03:24.008 (BRSalon) Device nValue: 0
2018-06-01 19:03:24.008 (BRSalon) Device sValue: ''
2018-06-01 19:03:24.008 (BRSalon) Device LastLevel: 0
2018-06-01 19:03:24.008 (BRSalon) Device: 254 - ID: 3, Name: 'BRSalon - Remote', nValue: 0, sValue: ''
2018-06-01 19:03:24.008 (BRSalon) Device ID: '3'
2018-06-01 19:03:24.008 (BRSalon) Device Name: 'BRSalon - Remote'
2018-06-01 19:03:24.008 (BRSalon) Device nValue: 0
2018-06-01 19:03:24.008 (BRSalon) Device sValue: ''
2018-06-01 19:03:24.008 (BRSalon) Device LastLevel: 0
2018-06-01 19:03:24.008 (BRSalon) Pushing 'PollIntervalDirective' on to queue
2018-06-01 19:03:24.008 (BRSalon) Connecting to: 192.168.0.21:34ea3443159c
2018-06-01 19:03:24.088 (BRSalon) Connected to Broadlink device: 192.168.0.21
2018-06-01 19:03:24.088 (BRSalon - Command) Updating device from 0:'' to have values 1:'10'.
2018-06-01 19:03:24.093 (BRSalon) Update 1:'10' (BRSalon - Command)
2018-06-01 19:03:24.107 Error: (BRSalon) 'onStart' failed 'NoSectionError'.
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 215 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onStart
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 976 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function genRemote
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 958 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function get_remoteconfig
2018-06-01 19:03:24.108 Error: (BRSalon) ----> Line 756 in /usr/lib/python3.4/configparser.py, function get
2018-06-01 19:03:24.108 Error: (BRSalon) ----> Line 1118 in /usr/lib/python3.4/configparser.py, function _unify_values
2018-06-01 19:03:24.158 (BRSalon) Processing 'PollIntervalDirective' message
2018-06-01 19:03:24.158 (BRSalon) Heartbeat interval set to: 30.
2018-06-01 19:03:33.495 (BRSalon) Pushing 'onHeartbeatCallback' on to queue
2018-06-01 19:03:33.525 (BRSalon) Processing 'onHeartbeatCallback' message
2018-06-01 19:03:33.525 (BRSalon) Calling message handler 'onHeartbeat'.
2018-06-01 19:04:03.500 (BRSalon) Pushing 'onHeartbeatCallback' on to queue
2018-06-01 19:04:03.530 (BRSalon) Processing 'onHeartbeatCallback' message
2018-06-01 19:04:03.530 (BRSalon) Calling message handler 'onHeartbeat'.
2018-06-01 19:04:03.572 User: Admin initiated a switch command (1/BRSalon - Command/Set Level)
2018-06-01 19:04:03.573 (BRSalon) Pushing 'onCommandCallback' on to queue
2018-06-01 19:04:03.694 (BRSalon - Temp) Updating device from 0:'' to have values 1:'0.0'.
2018-06-01 19:04:03.700 (BRSalon) Update 1:'0.0' (BRSalon - Temp)
2018-06-01 19:04:03.700 (BRSalon) Processing 'onCommandCallback' message
2018-06-01 19:04:03.700 (BRSalon) Calling message handler 'onCommand'.
2018-06-01 19:04:03.700 (BRSalon) onCommand called for Unit 1: Parameter 'Set Level', Level: 20 , Connected : True
2018-06-01 19:04:03.700 (BRSalon) Nothing to send
^C2018-06-01 19:04:13.244 Closing application!...
2018-06-01 19:04:13.244 Stopping worker...
2018-06-01 19:04:13.244 RxQueue: queue worker stopped...
2018-06-01 19:04:13.245 WebServer(HTTP) stopped
2018-06-01 19:04:13.746 WebServer(SSL) stopped
2018-06-01 19:04:14.247 TCPServer: shared server stopped
2018-06-01 19:04:14.247 Stopping all hardware...
2018-06-01 19:04:14.247 (BRSalon) Stop directive received.
2018-06-01 19:04:14.247 (BRSalon) Pushing 'onStopCallback' on to queue
2018-06-01 19:04:14.270 (BRSalon) Processing 'onStopCallback' message
2018-06-01 19:04:14.270 (BRSalon) Calling message handler 'onStop'.
2018-06-01 19:04:14.270 (BRSalon) onStop called
2018-06-01 19:04:14.347 (BRSalon) Stopping threads.
2018-06-01 19:04:14.502 (BRSalon) Exiting work loop.
2018-06-01 19:04:14.502 (BRSalon) Stopped.
2018-06-01 19:04:14.802 Scheduler stopped...
2018-06-01 19:04:14.928 EventSystem: Stopped...
2018-06-01 19:04:14.948 EventSystem - Python stopped...
2018-06-01 19:04:15.337 PluginSystem: Exiting work loop.
2018-06-01 19:04:15.372 PluginSystem: Stopped.
2018-06-01 19:04:15.428 Mainworker Stopped...
pi@raspberrypi:~/domoticz $
Do you know why I have these errors ?

Thanks

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Friday 01 June 2018 20:24

HarleyZard wrote:
Friday 01 June 2018 19:10
Hi Zak45,

I have now the Command Button, after remove and insert a new material.
Thanks ! :)

But I've always the same errors in the logs : :roll:

2018-06-01 19:03:24.093 (BRSalon) Update 1:'10' (BRSalon - Command)
2018-06-01 19:03:24.107 Error: (BRSalon) 'onStart' failed 'NoSectionError'.
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 215 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onStart
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 976 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function genRemote
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 958 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function get_remoteconfig
2018-06-01 19:03:24.108 Error: (BRSalon) ----> Line 756 in /usr/lib/python3.4/configparser.py, function get
2018-06-01 19:03:24.108 Error: (BRSalon) ----> Line 1118 in /usr/lib/python3.4/configparser.py, function _unify_values
2018-06-01 19:03:24.158 (BRSalon) Processing 'PollIntervalDirective' message
2018-06-01 19:03:24.158 (BRSalon) Heartbeat interval set to: 30.

Do you know why I have these errors ?

Thanks
Looks like you have created the ini file for the remote with no section inside ??? if this is the case, just remove it.

henk99
Posts: 11
Joined: Thursday 02 March 2017 12:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by henk99 » Monday 04 June 2018 21:53

It has taken me some time, but I think I have succeeded in some of it. I have installed Python through the wiki and it says I have version 3.4.2 installed when I check it. I have continued with the part below, but now I'm stuck. I am using the commands from the wiki. I have managed to mount a USB stick with the downloaded files and I can see the files are there. I want to copy the files to the plugins\broadlinkRM2 folder as described in the wiki......but it isn't there. Even though the below command to install broadlink was run succesfully.
henk99 wrote:
Monday 14 May 2018 22:40

For others
sudo pip3 install broadlink
sudo pip3 install pyaes
download plugin.py
download plugin_send.py
download plugin_http.py
download plugin_http.sh

I am stuck here.......

these files need to be on the plugins/BroadlinkRM2 folder (chmod +x should be necessary ??)

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Monday 04 June 2018 23:36

henk99 wrote:
Monday 04 June 2018 21:53
I have managed to mount a USB stick with the downloaded files and I can see the files are there. I want to copy the files to the plugins\broadlinkRM2 folder as described in the wiki......but
Just create this folder and copy the files.

henk99
Posts: 11
Joined: Thursday 02 March 2017 12:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by henk99 » Tuesday 05 June 2018 18:13

zak45 wrote:
Monday 04 June 2018 23:36
Just create this folder and copy the files.
I have no idea what is going on, but I have made the directory, copied the files in there, but after I restarted at the end, it is all gone. The folder is gone, Python is also not there anymore when I check for the version (python3 -V). It's as if the system is write protected or something.

HarleyZard
Posts: 9
Joined: Tuesday 24 April 2018 22:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by HarleyZard » Thursday 07 June 2018 21:08

zak45 wrote:
Friday 01 June 2018 20:24
HarleyZard wrote:
Friday 01 June 2018 19:10
Hi Zak45,

I have now the Command Button, after remove and insert a new material.
Thanks ! :)

But I've always the same errors in the logs : :roll:

2018-06-01 19:03:24.093 (BRSalon) Update 1:'10' (BRSalon - Command)
2018-06-01 19:03:24.107 Error: (BRSalon) 'onStart' failed 'NoSectionError'.
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 215 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onStart
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 976 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function genRemote
2018-06-01 19:03:24.107 Error: (BRSalon) ----> Line 958 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function get_remoteconfig
2018-06-01 19:03:24.108 Error: (BRSalon) ----> Line 756 in /usr/lib/python3.4/configparser.py, function get
2018-06-01 19:03:24.108 Error: (BRSalon) ----> Line 1118 in /usr/lib/python3.4/configparser.py, function _unify_values
2018-06-01 19:03:24.158 (BRSalon) Processing 'PollIntervalDirective' message
2018-06-01 19:03:24.158 (BRSalon) Heartbeat interval set to: 30.

Do you know why I have these errors ?

Thanks
Looks like you have created the ini file for the remote with no section inside ??? if this is the case, just remove it.
Yes !!
You're right ! I remove it, and it's better.

Thanks Zak45

torM6
Posts: 5
Joined: Tuesday 29 May 2018 18:11
Target OS: NAS (Synology & others)
Domoticz version: 3.9390
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by torM6 » Saturday 09 June 2018 0:51

Learned code disappearing magically from ini file!

I use version 0.9 and RM Pro+, attached to domoticz using standard approach - everything ok.
Then I created a ini file using learn mode induced from domoticz web interface - "command" device, generate and import.
Created device has "Push On" style.
when I manually (from web) switch on the device, it send the learned string, light was switched on and device state in web goto "red button" - everything OK.
Second push to the button (red in web interface) do nothing, device does not blink and do not send anything, it in "On" state. :?
So, because I use it for light switch on/off, I choose to change button style. I goto in web and choose "edit" for the generated device and change its style to "On/Off".
Ok, I press it - it works for first time, send string and it works :D .

Then I try to press the same device again and nothing happens. :oops:
I check ini file in the plugin directory and found this magically "Learned" section disappears from it!
I try to restore it, then repeat even reboot competely domoticz - problem still the same: if I switch on generated device which I moved to "On/Off" style - Learned section disappears from ini file!

So. what should I do?

original ini

Code: Select all

[DEFAULT]
pluginkey = BroadlinkRM2
unit = 2
pluginfolder = /usr/local/domoticz/var/plugins/BroadlinkRM2/
pluginname = RM Pro+
hardwareid = 6
customname =

[Device]
host = 192.168.1.97
mac = 34EA348A60B0

[LearnedCode]
2 = b200c4001d0a091d1d0a091d091d0a1d1c0a0a1c1d0a091d1d091d0a1d090a1c0a1d0a1c0a1d1c0a0a1c0a1d0a000129091d0a1c1d0a091d1d090a1d1d090a1d091d0a1c1d0a091d1d0a091d1d091d0a1d090a1d091d091d0a1d1d090a1d091d0a000129091d0a1d1c0a091d1d0a091d1d0a091d0a1c0a1d1d090a1d1c0a0a1c1d0a1d091d0a091d0a1c0a1d0a1c1d0a091d0a1d090001290a1d0a1c1d0a091d1d0a091d1d090a1d091d0a1c1d0a091d1d0a091d1d0a1c0a1d090a1d0a1c0a1d091d040b080005dc00000000

ini after selection (press) of this device from web interface:
[DEFAULT]
pluginkey = BroadlinkRM2
unit = 2
pluginfolder = /usr/local/domoticz/var/plugins/BroadlinkRM2/
pluginname = RM Pro+
hardwareid = 6

2018-06-09 01:44:43.114 (RM Pro+) Calling message handler 'onHeartbeat'.
2018-06-09 01:45:00.166 dzVents: Debug: Dumping domoticz data to /usr/local/domoticz/var/scripts/dzVents/domoticzData.lua
2018-06-09 01:45:00.306 dzVents: Debug: Event triggers:
2018-06-09 01:45:00.306 dzVents: Debug: - Timer
2018-06-09 01:45:01.980 User: tor initiated a switch command (176/Свет 2эт главный/On)
2018-06-09 01:45:01.981 (RM Pro+) Pushing 'onCommandCallback' on to queue
2018-06-09 01:45:02.014 (RM Pro+) Processing 'onCommandCallback' message
2018-06-09 01:45:02.014 (RM Pro+) Calling message handler 'onCommand'.
2018-06-09 01:45:02.014 (RM Pro+) onCommand called for Unit 2: Parameter 'On', Level: 0 , Connected : True
2018-06-09 01:45:02.014 (RM Pro+) Generate on Command for learned code stored on unit/ini :2
2018-06-09 01:45:02.023 (RM Pro+) Code loaded : b200c4001d0a091d1d0a091d091d0a1d1c0a0a1c1d0a091d1d091d0a1d090a1c0a1d0a1c0a1d1c0a0a1c0a1d0a000129091d0a1c1d0a091d1d090a1d1d090a1d091d0a1c1d0a091d1d0a091d1d091d0a1d090a1d091d091d0a1d1d090a1d091d0a000129091d0a1d1c0a091d1d0a091d1d0a091d0a1c0a1d1d090a1d1c0a0a1c1d0a1d091d0a091d0a1c0a1d0a1c1d0a091d0a1d090001290a1d0a1c1d0a091d1d0a091d1d090a1d091d0a1c1d0a091d1d0a091d1d0a1c0a1d090a1d0a1c0a1d091d040b080005dc00000000
2018-06-09 01:45:02.023 (RM Pro+) b'\xb2\x00\xc4\x00\x1d\n\t\x1d\x1d\n\t\x1d\t\x1d\n\x1d\x1c\n\n\x1c\x1d\n\t\x1d\x1d\t\x1d\n\x1d\t\n\x1c\n\x1d\n\x1c\n\x1d\x1c\n\n\x1c\n\x1d\n\x00\x01)\t\x1d\n\x1c\x1d\n\t\x1d\x1d\t\n\x1d\x1d\t\n\x1d\t\x1d\n\x1c\x1d\n\t\x1d\x1d\n\t\x1d\x1d\t\x1d\n\x1d\t\n\x1d\t\x1d\t\x1d\n\x1d\x1d\t\n\x1d\t\x1d\n\x00\x01)\t\x1d\n\x1d\x1c\n\t\x1d\x1d\n\t\x1d\x1d\n\t\x1d\n\x1c\n\x1d\x1d\t\n\x1d\x1c\n\n\x1c\x1d\n\x1d\t\x1d\n\t\x1d\n\x1c\n\x1d\n\x1c\x1d\n\t\x1d\n\x1d\t\x00\x01)\n\x1d\n\x1c\x1d\n\t\x1d\x1d\n\t\x1d\x1d\t\n\x1d\t\x1d\n\x1c\x1d\n\t\x1d\x1d\n\t\x1d\x1d\n\x1c\n\x1d\t\n\x1d\n\x1c\n\x1d\t\x1d\x04\x0b\x08\x00\x05\xdc\x00\x00\x00\x00'
2018-06-09 01:45:11.681 User: tor initiated a switch command (176/Свет 2эт главный/Off)
2018-06-09 01:45:11.681 (RM Pro+) Pushing 'onCommandCallback' on to queue
2018-06-09 01:45:11.684 (RM Pro+) Processing 'onCommandCallback' message
2018-06-09 01:45:11.684 (RM Pro+) Calling message handler 'onCommand'.
2018-06-09 01:45:11.684 (RM Pro+) onCommand called for Unit 2: Parameter 'Off', Level: 0 , Connected : True
2018-06-09 01:45:11.684 (Свет 2эт главный) Updating device from 1:'On-3' to have values 0:'Off'.
2018-06-09 01:45:11.693 (RM Pro+) Update 0:'Off' (Свет 2эт главный)
2018-06-09 01:45:11.787 dzVents: Debug: Dumping domoticz data to /usr/local/domoticz/var/scripts/dzVents/domoticzData.lua
2018-06-09 01:45:11.980 dzVents: Debug: Processing device-adapter for Свет 2эт главный: Switch device adapter
2018-06-09 01:45:11.980 dzVents: Debug: dzVents version: 2.4.5
2018-06-09 01:45:11.981 dzVents: Debug: Event triggers:
2018-06-09 01:45:11.981 dzVents: Debug: - Device: Свет 2эт главный
2018-06-09 01:45:13.694 (RM Pro+) Pushing 'onHeartbeatCallback' on to queue

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Saturday 09 June 2018 11:05

torM6 wrote:
Saturday 09 June 2018 0:51
Learned code disappearing magically from ini file!
thanks for reporting, will take a look on that.. but no make sense to have other type that push button for this device, it's like a remote...just put some delay into the generated button e.g
Capture.JPG
Capture.JPG (25.96 KiB) Viewed 998 times

torM6
Posts: 5
Joined: Tuesday 29 May 2018 18:11
Target OS: NAS (Synology & others)
Domoticz version: 3.9390
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by torM6 » Saturday 09 June 2018 11:43

will try.
but, what is a meaning for this?
if state of device "off" then when I press device icon what happens? why I need this 2 sec delay?
I assume that if device off - then string go out for switching on, for on - string to off. and by default these 2 strings are the same and taken from "Learned" section? what changes will give 2 sec delay?

By the wa, I suspect also some problem with learning mode - it does not switch off after learning, or even after "Reset" option choosen.
may be it still consider that device is in learning mode... (while no orange blinking light present on device). even after reboot of server with domoticz (I use Synology NAS)
but this is just assumption

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

Re: Python Plugin : Broadlink RM2 V4

Post by Bundy75 » Saturday 09 June 2018 18:42

Hello everyone!

I'm struggling with Broadlink plugin for a third day in a row and I already started pulling my hair :-) I've started with Raspbian Stretch + Domoticz Stable + Python 3.5 and 3.4 (installed later) and v4 plugin - unfortunately no luck :-( I tried to check several variants (versions of broadlink module, Python version etc.). Still nothing.

Today I downgraded my Pi (3B) to Raspbian Jessie. Currently there's Domoticz Stable + Python 3.4 + v3 plugin (broadlink module 0.8).

Code: Select all

2018-06-09 18:26:49.493 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2018-06-09 18:26:49.495 Build Hash: 494fff7, Date: 2017-07-30 12:19:41
2018-06-09 18:26:49.497 Startup Path: /home/pi/domoticz/
2018-06-09 18:26:49.533 Sunrise: 04:32:00 SunSet:20:50:00
2018-06-09 18:26:49.533 EventSystem: reset all events...
2018-06-09 18:26:49.628 PluginSystem: Started, Python version '3.4.2'.
2018-06-09 18:26:49.637 Active notification Subsystems: gcm, kodi, prowl (3/12)
2018-06-09 18:26:49.638 WebServer(HTTP) started on address: :: with port 8084
2018-06-09 18:26:49.643 WebServer(SSL) started on address: :: with port 8443
2018-06-09 18:26:49.645 Proxymanager started.
2018-06-09 18:26:49.646 Starting shared server on: :::6144
2018-06-09 18:26:49.646 TCPServer: shared server started...
2018-06-09 18:26:49.647 RxQueue: queue worker started...
2018-06-09 18:26:51.647 Wunderground: Worker started...
2018-06-09 18:26:51.648 Kodi: Started
2018-06-09 18:26:51.648 Http: Worker started...
2018-06-09 18:26:51.648 EventSystem: reset all events...
2018-06-09 18:26:51.649 EventSystem: reset all device statuses...
2018-06-09 18:26:51.748 Kodi: (osmc) Starting thread.
2018-06-09 18:26:51.849 Kodi: Starting I/O service thread.
2018-06-09 18:26:51.864 Python EventSystem: Module not found - Trying to initialize.
2018-06-09 18:26:51.865 Python EventSystem: Initalizing event module.
2018-06-09 18:26:51.866 EventSystem: Started
2018-06-09 18:26:52.035 PluginSystem: Entering work loop.
2018-06-09 18:26:52.227 (RM3) Initialized version 3.0.0, author 'zak45'
2018-06-09 18:26:52.230 (RM3) Debug log level set to: 'true'.
2018-06-09 18:26:52.230 (RM3) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2018-06-09 18:26:52.230 (RM3) 'Mode4':'no'
2018-06-09 18:26:52.230 (RM3) 'Mode2':'C:/BroadlinkRM2'
2018-06-09 18:26:52.230 (RM3) 'Version':'3.0.0'
2018-06-09 18:26:52.230 (RM3) 'Key':'BroadlinkRM2'
2018-06-09 18:26:52.230 (RM3) 'Port':'0'
2018-06-09 18:26:52.230 (RM3) 'Mode6':'Debug'
2018-06-09 18:26:52.230 (RM3) 'Author':'zak45'
2018-06-09 18:26:52.230 (RM3) 'Mode3':'no'
2018-06-09 18:26:52.230 (RM3) 'Mode5':'9000'
2018-06-09 18:26:52.230 (RM3) 'Address':'192.168.0.216'
2018-06-09 18:26:52.230 (RM3) 'Mode1':'34EA34BB1E4B'
2018-06-09 18:26:52.230 (RM3) 'HardwareID':'15'
2018-06-09 18:26:52.230 (RM3) 'Name':'RM3'
2018-06-09 18:26:52.230 (RM3) Device count: 2
2018-06-09 18:26:52.230 (RM3) Device: 1 - ID: 42, Name: 'RM3 - Command', nValue: 0, sValue: 'Off'
2018-06-09 18:26:52.230 (RM3) Device ID: '42'
2018-06-09 18:26:52.230 (RM3) Device Name: 'RM3 - Command'
2018-06-09 18:26:52.230 (RM3) Device nValue: 0
2018-06-09 18:26:52.230 (RM3) Device sValue: 'Off'
2018-06-09 18:26:52.230 (RM3) Device LastLevel: 0
2018-06-09 18:26:52.230 (RM3) Device: 254 - ID: 43, Name: 'RM3 - Remote', nValue: 0, sValue: ''
2018-06-09 18:26:52.230 (RM3) Device ID: '43'
2018-06-09 18:26:52.230 (RM3) Device Name: 'RM3 - Remote'
2018-06-09 18:26:52.231 (RM3) Device nValue: 0
2018-06-09 18:26:52.231 (RM3) Device sValue: ''
2018-06-09 18:26:52.231 (RM3) Device LastLevel: 0
2018-06-09 18:26:52.231 (RM3) Connecting to: 192.168.0.216:34EA34BB1E4B
[b]2018-06-09 18:26:52.231 Error: (RM3) Error Connecting to Broadlink device....[/b]
2018-06-09 18:26:52.231 (RM3) Device Number begin to : 1
2018-06-09 18:26:52.243 (RM3) No ini file :C:/BroadlinkRM2/remote/plugin_remote_15.ini
2018-06-09 18:26:52.243 (RM3) Custom Commands for Remote not managed
2018-06-09 18:26:52.243 (RM3) Heartbeat interval set to: 30.
Plugin starts (previously it was only "Initialized version 3.0.0, author 'zak45'" entry in the log) but reports that it can't connect to Broadlink device.
Communication between domoticz and RM3 (Pro) seems to be ok. Test script discovers Broadlink device without any issues:

Code: Select all

************************************************
Using python library created by Matthew Garrett
https://github.com/mjg59/python-broadlink
************************************************
Scanning network for Broadlink devices....
Found 1 broadlink devices
...............
Device 1 Host address = '192.168.0.216', 8
Device 1 MAC address = 34 ea 34 bb 1e 4b
Installed modules:

Code: Select all

automationhat (0.1.0)
blinkt (0.1.2)
broadlink (0.8)
Cap1xxx (0.1.3)
chardet (2.3.0)
codebug-i2c-tether (0.2.3)
codebug-tether (0.7.0)
colorama (0.3.2)
crypto (1.4.1)
drumhat (0.1.0)
envirophat (1.0.0)
ExplorerHAT (0.4.2)
Flask (0.10.1)
fourletterphat (0.1.0)
gpiozero (1.4.0)
html5lib (0.999)
itsdangerous (0.24)
jedi (0.10.2)
Jinja2 (2.7.3)
MarkupSafe (0.23)
mcpi (0.1.1)
microdotphat (0.2.1)
mote (0.0.3)
motephat (0.0.2)
Naked (0.1.31)
numpy (1.8.2)
pgzero (1.1)
phatbeat (0.1.1)
pianohat (0.1.0)
picamera (1.13)
picraft (1.0)
pifacecommon (4.2.1)
pifacedigitalio (3.1.0)
piglow (1.2.4)
pigpio (1.35)
Pillow (2.6.1)
pip (1.5.6)
pyaes (1.6.0)
PyCRC (1.21)
pygame (1.9.2a0)
pygobject (3.14.0)
pyinotify (0.9.4)
pyOpenSSL (0.13.1)
pyserial (2.6)
python-apt (0.9.3.12)
python-debian (0.1.27)
PyYAML (3.12)
rainbowhat (0.1.0)
requests (2.4.3)
RPi.GPIO (0.6.3)
RTIMULib (7.2.1)
scrollphat (0.0.7)
scrollphathd (1.2.1)
sense-emu (1.0)
sense-hat (2.2.0)
setuptools (5.5.1)
shellescape (3.4.1)
six (1.8.0)
skywriter (0.0.7)
smbus (1.1)
sn3218 (1.2.7)
spidev (3.0)
thonny (2.1.10)
touchphat (0.0.1)
twython (3.1.2)
urllib3 (1.9.1)
Werkzeug (0.9.6)
wheel (0.24.0)
Details of modules:

Code: Select all

sudo pip3 show broadlink
---
Name: broadlink
Version: 0.8
Location: /usr/local/lib/python3.4/dist-packages
Requires: 

sudo pip3 show Crypto
---
Name: crypto
Version: 1.4.1
Location: /usr/local/lib/python3.4/dist-packages
Requires: shellescape, Naked

sudo pip3 show pyaes
---
Name: pyaes
Version: 1.6.0
Location: /usr/local/lib/python3.4/dist-packages
Requires: 
Additionaly "broadlink" directory contents are copied to /usr/lib/python3.4

Of course new switches are created (Command and Remote). When I try to perform learning (Command -> Learn) LED doesn't light up and there's an error in log:

Code: Select all

018-06-09 20:03:07.670 User: Admin initiated a switch command (42/RM3 - Command/Set Level)
2018-06-09 20:03:07.702 (RM3) Calling message handler 'onCommand'.
2018-06-09 20:03:07.702 (RM3) onCommand called for Unit 1: Parameter 'Set Level', Level: 10 , Connected : False
2018-06-09 20:03:07.702 Error: (RM3) Error Connecting to Broadlink device....
2018-06-09 20:03:07.702 (RM3) All plugin system is on pause for 5s...
2018-06-09 20:03:07.702 (RM3) When Broadlink led is lit press the button on your remote within 5 seconds
2018-06-09 20:03:07.702 Error: (RM3) 'onCommand' failed 'NameError':'name 'device' is not defined'.
2018-06-09 20:03:07.703 Error: (RM3) ----> Line 158 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-06-09 20:03:07.703 Error: (RM3) ----> Line 417 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function learn
I'll really appreciate any advice or help! I feel that I'm only a few small steps to the final success :-)

moo2089
Posts: 7
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: lastbeta
Location: Budapest/Hungary
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by moo2089 » Sunday 10 June 2018 13:35

hi there,

i have problems during installation of plugin (win10, python3.5.3, broadlink module 0.8)

got this during running setup.exe:

...
Requirement already satisfied: PyCRC in c:\program files (x86)\python35-32\lib\site-packages (from broadlink==0.8)
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
File not found - plugin.py
0 File(s) copied
""
"ERROR: copy plugin error"
Press any key to continue . . .

where this plugin.py should be located?
i copied to several palces w/o success:(
thx in advance

moo2089
Posts: 7
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: lastbeta
Location: Budapest/Hungary
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by moo2089 » Sunday 10 June 2018 13:57

in addition:

C:\WINDOWS\system32>pip3 show broadlink
Name: broadlink
Version: 0.8
Summary: Python API for controlling Broadlink IR controllers
Home-page: http://github.com/mjg59/python-broadlink
Author: Matthew Garrett
Author-email: mjg59@srcf.ucam.org
License: UNKNOWN
Location: c:\program files (x86)\python35-32\lib\site-packages
Requires: pyaes, PyCRC
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\WINDOWS\system32>
C:\WINDOWS\system32>pip3 show pyaes
Name: pyaes
Version: 1.6.0
Summary: Pure-Python Implementation of the AES block-cipher and common modes of operation
Home-page: https://github.com/ricmoo/pyaes
Author: Richard Moore
Author-email: pyaes@ricmoo.com
License: License :: OSI Approved :: MIT License
Location: c:\program files (x86)\python35-32\lib\site-packages
Requires:
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

torM6
Posts: 5
Joined: Tuesday 29 May 2018 18:11
Target OS: NAS (Synology & others)
Domoticz version: 3.9390
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by torM6 » Sunday 10 June 2018 22:05

torM6 wrote:
Saturday 09 June 2018 11:43
will try.
but, what is a meaning for this?
No help.
same. seems that it try to update ini file - but for what purposes I do not copy...
see log
Spoiler: show
2018-06-10 22:44:05.463 User: tor initiated a switch command (289/2эт свет главный/On)
2018-06-10 22:44:05.464 (RM Pro+) Pushing 'onCommandCallback' on to queue
2018-06-10 22:44:05.506 (RM Pro+) Processing 'onCommandCallback' message
2018-06-10 22:44:05.535 (RM Pro+) Calling message handler 'onCommand'.
2018-06-10 22:44:05.554 (RM Pro+) onCommand called for Unit 115: Parameter 'On', Level: 0 , Connected : True
2018-06-10 22:44:05.554 (RM Pro+) Generate on Command for learned code stored on unit/ini :115
2018-06-10 22:44:05.626 (RM Pro+) Code loaded : b21234000b1d0b00012b0a1d0b1d1e0a0b1d1e0a0a1d1e0a0b1d0b1d0a1d1d0a0b1d1e0a0a1d
1e0a1e0a1e0a0b1d0b1d0b1d0a1d1e0a0b1d00000000
2018-06-10 22:44:05.626 (RM Pro+) b'\xb2\x124\x00\x0b\x1d\x0b\x00\x01+\n\x1d\x0b\x1d\x1e\n\x0b\x1d\x1e\n\n\x1d\x1e\n\x0b\x1d\
x0b\x1d\n\x1d\x1d\n\x0b\x1d\x1e\n\n\x1d\x1e\n\x1e\n\x1e\n\x0b\x1d\x0b\x1d\x0b\x1d\n\x1d\x1e\n\x0b\x1d\x00\x00\x00\x00'
2018-06-10 22:44:05.645 (RM Pro+) Code Sent....
2018-06-10 22:44:05.645 (RM Pro+) <b> Command line : "/usr/local/domoticz/var/plugins/BroadlinkRM2/plugin_send.py" /usr/loca
l/domoticz/var/plugins/BroadlinkRM2/BroadlinkRM2-6-115.ini </b>
2018-06-10 22:44:05.656 (RM Pro+ - 2эт свет главный) Updating device from 0:'Off' to have values 1:'On-1'.
2018-06-10 22:44:05.668 (RM Pro+) Update 1:'On-1' (2эт свет главный)
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) Error updating config file, customname param missingESC[0;0m
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) 'onCommand' failed 'UnicodeEncodeError'.ESC[0;0m
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) ----> Line 321 in /usr/local/domoticz/var/plugins/BroadlinkRM2/plugin.py, f
unction onCommandESC[0;0m
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) ----> Line 564 in /usr/local/domoticz/var/plugins/BroadlinkRM2/plugin.py, f
unction genCommandESC[0;0m
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) ----> Line 913 in /volume1/@appstore/py3k/usr/local/lib/python3.5/configpar
ser.py, function writeESC[0;0m
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) ----> Line 928 in /volume1/@appstore/py3k/usr/local/lib/python3.5/configpar
ser.py, function _write_sectionESC[0;0m
2018-06-10 22:44:05.756 dzVents: Debug: Dumping domoticz data to /usr/local/domoticz/var/scripts/dzVents/domoticzData.lua
................
2018-06-10 22:44:07.706 (RM Pro+) onCommand called for Unit 115: Parameter 'Off', Level: 0 , Connected : True
2018-06-10 22:44:07.706 (2эт свет главный) Updating device from 1:'On-1' to have values 0:'Off'.
2018-06-10 22:44:07.715 (RM Pro+) Update 0:'Off' (2эт свет главный)
2018-06-10 22:44:07.800 dzVents: Debug: Dumping domoticz data to /usr/local/domoticz/var/scripts/dzVents/domoticzData.lua
2018-06-10 22:44:08.024 dzVents: Debug: Processing device-adapter for 2эт свет главный: Switch device adapter
2018-06-10 22:44:08.025 dzVents: Debug: dzVents version: 2.4.5
2018-06-10 22:44:08.025 dzVents: Debug: Event triggers:
2018-06-10 22:44:08.025 dzVents: Debug: - Device: 2эт свет главный
2018-06-10 22:44:12.541 User: tor initiated a switch command (289/2эт свет главный/On)
2018-06-10 22:44:12.542 (RM Pro+) Pushing 'onCommandCallback' on to queue
2018-06-10 22:44:12.575 (RM Pro+) Processing 'onCommandCallback' message
2018-06-10 22:44:12.575 (RM Pro+) Calling message handler 'onCommand'.
2018-06-10 22:44:12.575 (RM Pro+) onCommand called for Unit 115: Parameter 'On', Level: 0 , Connected : True
2018-06-10 22:44:12.575 (RM Pro+) Generate on Command for learned code stored on unit/ini :115
2018-06-10 22:44:12.580 ESC[1;31mError: (RM Pro+) 'onCommand' failed 'NoSectionError'.ESC[0;0m
2018-06-10 22:44:12.580 ESC[1;31mError: (RM Pro+) ----> Line 321 in /usr/local/domoticz/var/plugins/BroadlinkRM2/plugin.py, function onCommandESC[0;0m
2018-06-10 22:44:12.580 ESC[1;31mError: (RM Pro+) ----> Line 535 in /usr/local/domoticz/var/plugins/BroadlinkRM2/plugin.py, function genCommandESC[0;0m
2018-06-10 22:44:12.580 ESC[1;31mError: (RM Pro+) ----> Line 781 in /volume1/@appstore/py3k/usr/local/lib/python3.5/configparser.py, function getESC[0;0m
2018-06-10 22:44:12.580 ESC[1;31mError: (RM Pro+) ----> Line 1138 in /volume1/@appstore/py3k/usr/local/lib/python3.5/configparser.py, function _unify_valuesESC[0;0m
2018-06-10 22:44:37.590 (RM Pro+) Pushing 'onHeartbeatCallback' on to queue
probably key problem here
2018-06-10 22:44:05.668 (RM Pro+) Update 1:'On-1' (2эт свет главный)
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) Error updating config file, customname param missingESC[0;0m

found temporary solution
need to setup
customname = name of the device in domoticz
then it do not try to update ini and do not kill sections

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Monday 11 June 2018 11:12

torM6 wrote:
Sunday 10 June 2018 22:05
torM6 wrote:
Saturday 09 June 2018 11:43
will try.
but, what is a meaning for this?
No help.
same. seems that it try to update ini file - but for what purposes I do not copy...
see log

probably key problem here
2018-06-10 22:44:05.668 (RM Pro+) Update 1:'On-1' (2эт свет главный)
2018-06-10 22:44:05.671 ESC[1;31mError: (RM Pro+) Error updating config file, customname param missingESC[0;0m

found temporary solution
need to setup
customname = name of the device in domoticz
then it do not try to update ini and do not kill sections
Can you confirm your ini file is conform to :
https://www.domoticz.com/wiki/Plugins/B ... #ini_files

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Monday 11 June 2018 12:49

moo2089 wrote:
Sunday 10 June 2018 13:35
hi there,

i have problems during installation of plugin (win10, python3.5.3, broadlink module 0.8)
where this plugin.py should be located?
i copied to several palces w/o success:(
thx in advance
the plugin.py need to be : C:\Domoticz\plugins\BroadlinkRM2

zak45
Posts: 512
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Monday 11 June 2018 12:51

Bundy75 wrote:
Saturday 09 June 2018 18:42
Hello everyone!

I'm struggling with Broadlink plugin for a third day in a row and I already started pulling my hair :-) I've started with Raspbian Stretch + Domoticz Stable + Python 3.5 and 3.4 (installed later) and v4 plugin - unfortunately no luck :-( I tried to check several variants (versions of broadlink module, Python version etc.). Still nothing.
I'll really appreciate any advice or help! I feel that I'm only a few small steps to the final success :-)
The V4 plugin need Domoticz beta version, and it looks that some problem with python 3.5x on Stretch, so best is to be on 3.4x

moo2089
Posts: 7
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: lastbeta
Location: Budapest/Hungary
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by moo2089 » Saturday 16 June 2018 3:10

hi,
thx, i put plugin.py and other plugin components manually into proper folder, because setup.exe or setupbroadlink.cmd did its job except copy files, even if i run them with admin rights.
anyway now domoticz server is working properly, only one issue is missing import device/switch, i have discovery/command/remote, all of them are working properly, strange...
sytem;
domoticz 3.9634
python 3.5.3
broadlink V4.1
win10

thx

2018-06-16 02:57:02.272 Status: Domoticz V3.9634 (c)2012-2018 GizMoCuz
2018-06-16 02:57:02.272 Status: Build Hash: 5f63b324, Date: 2018-06-14 07:06:02
2018-06-16 02:57:02.272 Status: Startup Path: C:\Program Files (x86)\Domoticz\
2018-06-16 02:57:02.585 Status: EventSystem: reset all events...
2018-06-16 02:57:02.976 Status: PluginSystem: Started, Python version '3.5.3'.
2018-06-16 02:57:03.007 Status: WebServer(HTTP) started on address: :: with port 8080
2018-06-16 02:57:03.491 Status: WebServer(SSL) started on address: :: with port 443
2018-06-16 02:57:03.491 Status: Proxymanager started.
2018-06-16 02:57:03.491 Status: TCPServer: shared server started...
2018-06-16 02:57:03.491 Status: RxQueue: queue worker started...
2018-06-16 02:57:05.698 Status: Incoming connection from: 10.0.0.89
2018-06-16 02:57:05.799 Status: Kodi: Started
2018-06-16 02:57:05.808 Status: Incoming connection from: 10.0.0.52
2018-06-16 02:57:05.948 Status: Panasonic Plugin: Started
2018-06-16 02:57:05.991 Status: Wunderground: Worker started...
2018-06-16 02:57:05.990 Status: Wunderground: Worker started...
2018-06-16 02:57:05.993 Status: Wunderground: Worker started...
2018-06-16 02:57:06.252 Status: (Broadlink IR1) Started.
2018-06-16 02:57:06.466 Status: XiaomiGateway: will listen on 9898 for hardware id 36
2018-06-16 02:57:06.521 Status: XiaomiGateway: Delaying worker startup...
2018-06-16 02:57:07.720 Status: MQTT: Connecting to 127.0.0.1:1883
2018-06-16 02:57:07.930 Status: MQTT: connected to: 127.0.0.1:1883
2018-06-16 02:57:08.074 Status: MQTT: Subscribed
2018-06-16 02:57:11.534 Status: (Broadlink IR1) Started.
2018-06-16 02:57:11.534 Status: XiaomiGateway: Worker started...
2018-06-16 02:57:11.534 Status: WOL: Started
2018-06-16 02:57:11.535 Status: XiaomiGateway: Using 10.0.0.94 for local IP address.
2018-06-16 02:57:11.535 Status: EventSystem: reset all events...
2018-06-16 02:57:11.537 Status: EventSystem: reset all device statuses...
2018-06-16 02:57:11.554 Status: XiaomiGateway: RGB Gateway Detected
2018-06-16 02:57:11.643 Status: PluginSystem: Entering work loop.
2018-06-16 02:57:13.746 Status: (Broadlink IR1) Initialized version 4.1.0, author 'zak45'
2018-06-16 02:57:13.747 Status: (Broadlink IR1) Entering work loop.
2018-06-16 02:57:14.124 Status: (Broadlink IR1) Initialized version 4.1.0, author 'zak45'
2018-06-16 02:57:14.124 Status: (Broadlink IR1) Entering work loop.
2018-06-16 02:57:14.223 Status: Incoming connection from: 10.0.0.25
2018-06-16 02:57:14.230 Status: Python EventSystem: Initalizing event module.
2018-06-16 02:57:14.231 Status: EventSystem: Started
2018-06-16 02:57:14.231 Status: EventSystem: Queue thread started...
2018-06-16 02:57:15.941 Status: Notification: THB nappali Temperature is 28.4 degrees [> 23.0 degrees]
2018-06-16 02:57:29.496 Status: Incoming connection from: 127.0.0.1
2018-06-16 02:58:21.146 Status: (Broadlink IR1) Stop directive received.
2018-06-16 02:58:21.247 Status: (Broadlink IR1) Stopping threads.
2018-06-16 02:58:21.279 Status: (Broadlink IR1) Exiting work loop.
2018-06-16 02:58:21.279 Status: (Broadlink IR1) Stopped.

olicot
Posts: 6
Joined: Thursday 04 May 2017 13:02
Target OS: Linux
Domoticz version: V4.9788
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by olicot » Monday 18 June 2018 11:45

Hello
I need some help with this Plugin
I've got issue for 2 month. So I install a new and fresh and "light" environnement to tests (My other production build works fine with other plugins such as Kodi, Zigate, LGWebOS T...)

So my test build ::
  • Ubuntu 16.04.4 (on Orange PI New PC+)
    Domoticz V3.9639
    Python version '3.5.2'.
    Broadlink 0.9
    plugin : Broadlink RM2 V4.1
    pycryptodome : 3.4.11
    pyaes : 1.6.1
I've got a RM2 and a PM1 Broadlink devices.

When I restart Domotics : hearafter some logs:

Code: Select all

2018-06-18 11:31:22.835 Status: (BROADLINK-MP1-1) Entering work loop.
2018-06-18 11:31:22.836 Status: (BROADLINK-MP1-1) Initialized version 4.1.0, author 'zak45'
2018-06-18 11:31:23.615 Status: (BROADLINK-RM2-1) Entering work loop.
2018-06-18 11:31:23.615 Status: (BROADLINK-RM2-1) Initialized version 4.1.0, author 'zak45'
2018-06-18 11:31:24.422 Status: (BROADLINK-MP1-1) Entering work loop.
2018-06-18 11:31:24.422 Status: (BROADLINK-MP1-1) Initialized version 4.1.0, author 'zak45' 
I've got no more line in logs mentionning any Broadlink devices : it seems like a "lock"
No new devices are discoverde in "devices" tab.

I read all post in this forum several time,
(For information : scripts from http://domo-attitude.fr/broadlink-rm-promini-domoticz/ (update to python3) work fine and all devices can be discovered with locatrm.pt)

Thanks in advance for your help
Olivier

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests