I'm amazed by this work



Thanks to you, for 10€ (the price for a RM mini 3) I'll be able to drive smartly my old aircon' from 2004



Moderator: leecollings
can i use rmpro and rmpro2 and rmpro mini with this plugin ? or this is just for rmpro2?
thank you for answer dear friend
You are trying to create an impossible path. Try this:reza wrote:i can not "on" remote. and i dont have ini file in C:BroadlinkRM2.
also i can not understand what say in wiki.... please help me
i have this problem when i want open folder C:
Code: Select all
12:34:56:78:9A:BC.
Code: Select all
123456789ABC
Code: Select all
cd /home/pi/domoticz/broadlink_ini
Code: Select all
sudo chown pi:pi -R *
dont work for me and i have same error:Sjonnie2017 wrote: ↑Thursday 21 September 2017 15:03 Hi Reza,
Weird! I had that too!I thought I had made a mistake myself and corrected it. Seems more people are affected by this.
How to solve?
Open a terminal and change directory (cd) to the broadlink_ini folder. So enter this:After that you need to change the ownership of the two folders inside the broadlink_ini folder. So enter this:Code: Select all
cd /home/pi/domoticz/broadlink_ini
That will make pi owner of all files and folders in the broadlink_ini folder.Code: Select all
sudo chown pi:pi -R *
Don't know if it is necessary but it works for me![]()
HTH
Greetz,
Sjonnie
5 - Created a new Broadlink devicesudo service domoticz restart
3 - "Remove __pychache__ folder from /home/pi/domoticz/plugins/BroadlinkRM2" how remove this ? thank youSjonnie2017 wrote: ↑Thursday 21 September 2017 15:35 Hi Reza,
"Don't work" is somewhat vague.Can you explain what does not work? Do the folders have new ownership or not?
I had a similar issue and got it working so there is hope![]()
Here is what I did:
1 - I removed the Broadlink device from Domoticz
2 - Emptied the broadlink_ini folder
3 - Remove __pychache__ folder from /home/pi/domoticz/plugins/BroadlinkRM2
4 - Restarted Domoticz by opening a terminal to the pi and entering5 - Created a new Broadlink devicesudo service domoticz restart
6 - Made sure the ownership of the folders import and remote were correct (see previous post)
7 - Used the switch "Broadlink - command" to learn a new command from one of my remotes
8 - Saved the command (creates a new device)
9 - Presto![]()
HTH
Greetz,
Sjonnie
Code: Select all
pi@domoticz:~ $ cat /proc/version
Linux version 4.9.35-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1014 SMP Fri Jun 30 14:47:43 BST 2017
Code: Select all
Domoticz V3.8153
Dashboard
Switches
Scenes
Temperature
Weather
Utility
Setup
All
Status
Error
Filter:
X
2017-09-22 18:22:59.358 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2017-09-22 18:22:59.358 Build Hash: 494fff7, Date: 2017-07-30 20:19:41
2017-09-22 18:22:59.358 Startup Path: /home/pi/domoticz/
2017-09-22 18:22:59.557 PluginSystem: Started, Python version '3.4.2'.
2017-09-22 18:22:59.569 Active notification Subsystems: gcm, http (2/12)
2017-09-22 18:22:59.571 WebServer(HTTP) started on address: :: with port 8080
2017-09-22 18:22:59.581 WebServer(SSL) started on address: :: with port 443
2017-09-22 18:22:59.583 Proxymanager started.
2017-09-22 18:22:59.585 Starting shared server on: :::6144
2017-09-22 18:22:59.586 TCPServer: shared server started...
2017-09-22 18:22:59.586 RxQueue: queue worker started...
2017-09-22 18:23:00.737 Incoming connection from: 10.0.0.25
2017-09-22 18:23:01.587 EventSystem: reset all events...
2017-09-22 18:23:01.588 EventSystem: reset all device statuses...
2017-09-22 18:23:01.722 Python EventSystem: Module not found - Trying to initialize.
2017-09-22 18:23:01.725 Python EventSystem: Initalizing event module.
2017-09-22 18:23:01.726 EventSystem: Started
2017-09-22 18:23:01.900 PluginSystem: Entering work loop.
2017-09-22 18:23:02.306 (test) Initialized version 3.0.0, author 'zak45'
2017-09-22 18:23:02.360 (test) Debug log level set to: 'true'.
2017-09-22 18:23:02.360 (test) 'HardwareID':'2'
2017-09-22 18:23:02.360 (test) 'Author':'zak45'
2017-09-22 18:23:02.360 (test) 'Mode2':'/home/pi/domoticz/plugins/BroadlinkRM2/ini'
2017-09-22 18:23:02.360 (test) 'Key':'BroadlinkRM2'
2017-09-22 18:23:02.360 (test) 'Name':'test'
2017-09-22 18:23:02.360 (test) 'Mode3':'no'
2017-09-22 18:23:02.360 (test) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2017-09-22 18:23:02.361 (test) 'Version':'3.0.0'
2017-09-22 18:23:02.361 (test) 'Mode1':'000000000000'
2017-09-22 18:23:02.361 (test) 'Mode5':'9000'
2017-09-22 18:23:02.361 (test) 'Mode6':'Debug'
2017-09-22 18:23:02.361 (test) 'Port':'0'
2017-09-22 18:23:02.361 (test) 'Address':'127.0.0.1'
2017-09-22 18:23:02.361 (test) 'Mode4':'no'
2017-09-22 18:23:02.361 (test) Device count: 2
2017-09-22 18:23:02.361 (test) Device: 1 - ID: 1, Name: 't8 - Discover', nValue: 0, sValue: 'Off'
2017-09-22 18:23:02.361 (test) Device ID: '1'
2017-09-22 18:23:02.361 (test) Device Name: 't8 - Discover'
2017-09-22 18:23:02.361 (test) Device nValue: 0
2017-09-22 18:23:02.361 (test) Device sValue: 'Off'
2017-09-22 18:23:02.361 (test) Device LastLevel: 0
2017-09-22 18:23:02.361 (test) Device: 254 - ID: 2, Name: 't8 - Remote', nValue: 0, sValue: ''
2017-09-22 18:23:02.362 (test) Device ID: '2'
2017-09-22 18:23:02.362 (test) Device Name: 't8 - Remote'
2017-09-22 18:23:02.362 (test) Device nValue: 0
2017-09-22 18:23:02.362 (test) Device sValue: ''
2017-09-22 18:23:02.362 (test) Device LastLevel: 0
2017-09-22 18:23:02.362 (test) Connecting to: 127.0.0.1:000000000000
2017-09-22 18:23:02.427 Error: (test) Error Connecting to Broadlink device....
2017-09-22 18:23:02.428 (test) Device Number begin to : 1
2017-09-22 18:23:02.450 (test) No ini file :/home/pi/domoticz/plugins/BroadlinkRM2/ini/remote/plugin_remote_2.ini
2017-09-22 18:23:02.450 (test) Custom Commands for Remote not managed
2017-09-22 18:23:02.451 (test) Heartbeat interval set to: 30.
2017-09-22 18:23:11.817 (test) Calling message handler 'onHeartbeat'.
2017-09-22 18:23:20.392 User: Admin initiated a switch command (1/t8 - Discover/On)
2017-09-22 18:23:20.433 (test) Calling message handler 'onCommand'.
2017-09-22 18:23:20.433 (test) onCommand called for Unit 1: Parameter 'On', Level: 0 , Connected : False
2017-09-22 18:23:20.433 (test) All plugin system is on pause for 5s...
2017-09-22 18:23:25.440 (test) Found 1 broadlink devices
2017-09-22 18:23:25.452 Error: (test) 'onCommand' failed 'TypeError':'sequence item 0: expected str instance, bytes found'.
2017-09-22 18:23:25.452 Error: (test) ----> Line 210 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2017-09-22 18:23:25.452 Error: (test) ----> Line 397 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function Discover
2017-09-22 18:23:25.452 Error: (test) ----> Line 203 in /usr/lib/python3.4/broadlink/__init__.py, function auth
2017-09-22 18:23:25.452 Error: (test) ----> Line 258 in /usr/lib/python3.4/broadlink/__init__.py, function send_packet
2017-09-22 18:23:25.452 Error: (test) ----> Line 162 in /usr/lib/python3.4/broadlink/__init__.py, function encrypt_pyaes
2017-09-22 18:23:41.831 (test) Calling message handler 'onHeartbeat'.
Code: Select all
pi@domoticz:~ $ python3
Python 3.5.2 (default, Sep 21 2017, 19:47:52)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Code: Select all
developer info
this code : learnedCommand=str(ir_packet.hex()) is pecific to python 3.5 or >, not work on 3.4
replaced by : learnedCommand=str(codecs.encode(ir_packet, 'hex_codec')) ( & import codecs ) to have it running in 3.x
Code: Select all
learnedCommand=(codecs.encode(ir_packet, 'hex_codec')).decode('utf-8')
Code: Select all
( & import codecs )
Code: Select all
2017-09-22 20:58:47.080 TCPServer: shared server started...
2017-09-22 20:58:47.081 RxQueue: queue worker started...
2017-09-22 20:58:49.081 EventSystem: reset all events...
2017-09-22 20:58:49.082 EventSystem: reset all device statuses...
2017-09-22 20:58:49.217 Python EventSystem: Module not found - Trying to initialize.
2017-09-22 20:58:49.220 Python EventSystem: Initalizing event module.
2017-09-22 20:58:49.221 EventSystem: Started
2017-09-22 20:58:49.412 PluginSystem: Entering work loop.
2017-09-22 20:58:49.572 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-09-22 20:58:49.572 Error: (test) Module Import failed, exception: 'SyntaxError'
2017-09-22 20:58:49.572 Error: (test) Import detail: File: /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, Line: 1872208736, offset: 431
2017-09-22 20:58:49.572 Error: (test) Error Line ' learnedCommand=str(codecs.encode(ir_packet, 'hex_codec'))(& import codecs)
'
Open a terminal and enter the following:
Code: Select all
cd /home/pi/domoticz/plugins/BroadlinkRM2
sudo rm -rf __py*
Hi, I know there is a command that will let you "find¨ your Broadlink and connect to it but I found it was easier to just enter the correct ip and MAC address in the hardware section of Domoticz.
Code: Select all
2017-09-22 18:23:02.362 (test) Device LastLevel: 0
2017-09-22 18:23:02.362 (test) Connecting to: 127.0.0.1:000000000000
2017-09-22 18:23:02.427 Error: (test) Error Connecting to Broadlink device....
I've tried that as wel but same errors so I started as per wiki from discovering broadlink itselfSo you haven't changed the IP and MAC when creating the device. Try to enter the correct IP (your router should be able to tell you that - one of your wireless clients should start with RM****) and find out the MAC (again in most cases your router is your friend). Make sure you enter the MAC address without the colons (see one of my previous posts). If you've done that your connection should be up and running.
Code: Select all
2017-09-25 06:17:55.511 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2017-09-25 06:17:55.512 Build Hash: 494fff7, Date: 2017-07-30 20:19:41
2017-09-25 06:17:55.514 Startup Path: /home/pi/domoticz/
2017-09-25 06:17:55.685 PluginSystem: Started, Python version '3.4.2'.
2017-09-25 06:17:55.698 Active notification Subsystems: gcm, http (2/12)
2017-09-25 06:17:55.700 WebServer(HTTP) started on address: :: with port 8080
2017-09-25 06:17:55.710 WebServer(SSL) started on address: :: with port 443
2017-09-25 06:17:55.712 Proxymanager started.
2017-09-25 06:17:55.713 Starting shared server on: :::6144
2017-09-25 06:17:55.714 TCPServer: shared server started...
2017-09-25 06:17:55.714 RxQueue: queue worker started...
2017-09-25 06:17:57.715 EventSystem: reset all events...
2017-09-25 06:17:57.716 EventSystem: reset all device statuses...
2017-09-25 06:17:57.781 Incoming connection from: 10.0.0.25
2017-09-25 06:17:57.851 Python EventSystem: Module not found - Trying to initialize.
2017-09-25 06:17:57.854 Python EventSystem: Initalizing event module.
2017-09-25 06:17:57.855 EventSystem: Started
2017-09-25 06:17:58.043 PluginSystem: Entering work loop.
2017-09-25 06:17:58.450 (test) Initialized version 3.0.0, author 'zak45'
2017-09-25 06:17:58.454 (test) Debug log level set to: 'true'.
2017-09-25 06:17:58.454 (test) 'HardwareID':'2'
2017-09-25 06:17:58.454 (test) 'Mode5':'9000'
2017-09-25 06:17:58.454 (test) 'Mode6':'Debug'
2017-09-25 06:17:58.454 (test) 'Author':'zak45'
2017-09-25 06:17:58.454 (test) 'Mode1':'34ea34b50a16'
2017-09-25 06:17:58.454 (test) 'Name':'test'
2017-09-25 06:17:58.454 (test) 'Mode4':'no'
2017-09-25 06:17:58.454 (test) 'Version':'3.0.0'
2017-09-25 06:17:58.455 (test) 'Address':'10.0.0.97'
2017-09-25 06:17:58.455 (test) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2017-09-25 06:17:58.455 (test) 'Mode3':'no'
2017-09-25 06:17:58.455 (test) 'Port':'0'
2017-09-25 06:17:58.455 (test) 'Mode2':'/home/pi/domoticz/plugins/BroadlinkRM2/ini'
2017-09-25 06:17:58.455 (test) 'Key':'BroadlinkRM2'
2017-09-25 06:17:58.455 (test) Device count: 2
2017-09-25 06:17:58.455 (test) Device: 1 - ID: 1, Name: 't8 - Discover', nValue: 0, sValue: 'Off'
2017-09-25 06:17:58.455 (test) Device ID: '1'
2017-09-25 06:17:58.455 (test) Device Name: 't8 - Discover'
2017-09-25 06:17:58.455 (test) Device nValue: 0
2017-09-25 06:17:58.455 (test) Device sValue: 'Off'
2017-09-25 06:17:58.455 (test) Device LastLevel: 0
2017-09-25 06:17:58.455 (test) Device: 254 - ID: 2, Name: 't8 - Remote', nValue: 0, sValue: ''
2017-09-25 06:17:58.455 (test) Device ID: '2'
2017-09-25 06:17:58.456 (test) Device Name: 't8 - Remote'
2017-09-25 06:17:58.456 (test) Device nValue: 0
2017-09-25 06:17:58.456 (test) Device sValue: ''
2017-09-25 06:17:58.456 (test) Device LastLevel: 0
2017-09-25 06:17:58.456 (test) Connecting to: 10.0.0.97:34ea34b50a16
2017-09-25 06:17:58.538 Error: (test) Error Connecting to Broadlink device....
2017-09-25 06:17:58.538 (test) Device Number begin to : 1
2017-09-25 06:17:58.561 (test) No ini file :/home/pi/domoticz/plugins/BroadlinkRM2/ini/remote/plugin_remote_2.ini
2017-09-25 06:17:58.561 (test) Custom Commands for Remote not managed
2017-09-25 06:17:58.562 (test) Heartbeat interval set to: 30.
2017-09-25 06:18:00.331 User: Admin initiated a switch command (1/t8 - Discover/On)
2017-09-25 06:18:00.365 (test) Calling message handler 'onCommand'.
2017-09-25 06:18:00.365 (test) onCommand called for Unit 1: Parameter 'On', Level: 0 , Connected : False
2017-09-25 06:18:00.365 (test) All plugin system is on pause for 5s...
2017-09-25 06:18:05.372 (test) Found 1 broadlink devices
2017-09-25 06:18:05.384 Error: (test) 'onCommand' failed 'TypeError':'sequence item 0: expected str instance, bytes found'.
2017-09-25 06:18:05.384 Error: (test) ----> Line 210 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2017-09-25 06:18:05.384 Error: (test) ----> Line 397 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function Discover
2017-09-25 06:18:05.384 Error: (test) ----> Line 203 in /usr/lib/python3.4/broadlink/__init__.py, function auth
2017-09-25 06:18:05.384 Error: (test) ----> Line 258 in /usr/lib/python3.4/broadlink/__init__.py, function send_packet
2017-09-25 06:18:05.385 Error: (test) ----> Line 162 in /usr/lib/python3.4/broadlink/__init__.py, function encrypt_pyaes
2017-09-25 06:18:07.989 (test) Calling message handler 'onHeartbeat'.
2017-09-25 06:18:37.995 (test) Calling message handler 'onHeartbeat'.
make a try by installing pycrypto...
Code: Select all
pi@domoticz:~ $ pip3 install pycrypto
Requirement already satisfied: pycrypto in /usr/local/lib/python3.5/site-packages
2017-09-25 06:18:05.384 Error: (test) ----> Line 203 in /usr/lib/python3.4/broadlink/__init__.py, function authmegus wrote: ↑Monday 25 September 2017 12:40 @zak45make a try by installing pycrypto...Code: Select all
pi@domoticz:~ $ pip3 install pycrypto Requirement already satisfied: pycrypto in [b]/usr/local/lib/python3.5/[/b]site-packages
![]()
Users browsing this forum: janpep and 1 guest