Python Plugin: Broadlink RM2
Moderator: leecollings
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2
@macben44
maybe by copying broadlink to the right folder
" sudo cp -r /usr/local/lib/python3.4/dist-packages/Crypto/ /usr/lib/python3.4/
and
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
"
you need to adapt that to your installation.
maybe by copying broadlink to the right folder
" sudo cp -r /usr/local/lib/python3.4/dist-packages/Crypto/ /usr/lib/python3.4/
and
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
"
you need to adapt that to your installation.
-
- Posts: 4
- Joined: Thursday 26 October 2017 9:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Broadlink RM2
I don't have repository dist-packages in /usr/local/lib/python3.5...
I had already done :
same probleme but... OK I'have found ! With
it's okey ! I continue...
Tks a lot !
I had already done :
Code: Select all
sudo cp -r /usr/local/lib/python3.5/site-packages/Crypto/ /usr/lib/python3.5/
sudo cp -r /usr/local/lib/python3.5/site-packages/broadlink /usr/lib/python3.5/
Code: Select all
sudo cp -r /usr/local/lib/python3.5/site-packages/Crypto/ /usr/local/lib/python3.5/
sudo cp -r /usr/local/lib/python3.5/site-packages/broadlink /usr/local/lib/python3.5/
Tks a lot !
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
I have done all that but also get:
sudo cp -r /usr/local/lib/python3.5/dist-packages/broadlink/ /usr/lib/python3.5/
sudo cp -r /usr/local/lib/python3.5/dist-packages/crypto/ /usr/lib/python3.5/
Dont no what else to try.
Is it dist-packages or site-packages. I have done it like this:2017-11-12 16:22:06.084 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/broadlink/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2017-11-12 16:22:06.084 Error: (Bean) Module Import failed, exception: 'ImportError'
2017-11-12 16:22:06.084 Error: (Bean) Module Import failed: ' Name: pyaes'
sudo cp -r /usr/local/lib/python3.5/dist-packages/broadlink/ /usr/lib/python3.5/
sudo cp -r /usr/local/lib/python3.5/dist-packages/crypto/ /usr/lib/python3.5/
Dont no what else to try.
-
- Posts: 4
- Joined: Thursday 26 October 2017 9:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Broadlink RM2
Hello,
Try :
sudo cp -r /usr/local/lib/python3.5/dist-packages/broadlink/ /usr/local/lib/python3.5/
sudo cp -r /usr/local/lib/python3.5/dist-packages/crypto/ /usr/local/lib/python3.5/
Try :
sudo cp -r /usr/local/lib/python3.5/dist-packages/broadlink/ /usr/local/lib/python3.5/
sudo cp -r /usr/local/lib/python3.5/dist-packages/crypto/ /usr/local/lib/python3.5/
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
Nope, the same
2017-11-12 19:24:41.481 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/broadlink/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2017-11-12 19:24:41.481 Error: (Bean) Module Import failed, exception: 'ImportError'
2017-11-12 19:24:41.481 Error: (Bean) Module Import failed: ' Name: pyaes'
-
- Posts: 4
- Joined: Thursday 26 October 2017 9:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Broadlink RM2
Which is the result for :
ls -lrt /usr/local/lib/python3.5/dist-packages/broadlink/
ls -lrt /usr/local/lib/python3.5/dist-packages/broadlink/
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
Here:
pi@raspberrypi:~ $ ls -lrt /usr/local/lib/python3.5/dist-packages/broadlink/
total 24
-rw-r--r-- 1 root staff 16621 Stu 12 15:55 __init__.py
drwxr-sr-x 2 root staff 4096 Stu 12 15:55 __pycache__
pi@raspberrypi:~ $
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
I try it all over again and always the same. Any help appreciated.
Thanks
Thanks
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2
@Kruu
problem look like pyaes is missing.
try : sudo pip3 install pyaes
and copy it under /usr/lib/python3.5
problem look like pyaes is missing.
try : sudo pip3 install pyaes
and copy it under /usr/lib/python3.5
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
Thanks allot that helped, but now I am on another error :
I have Broadlink Bean, but I followed all the steps for RM2 because I cant finde nothing specific for Broadlink Bean.
Code: Select all
2017-11-19 14:57:40.789 Error: (Bean) Error Connecting to Broadlink device....
2017-11-19 14:57:40.795 Error: (Bean) 'onCommand' failed 'TypeError':'sequence item 0: expected str instance, bytes found'.
2017-11-19 14:57:40.795 Error: (Bean) ----> Line 158 in /home/domoticz/domoticz/plugins/broadlink/plugin.py, function onCommand
2017-11-19 14:57:40.795 Error: (Bean) ----> Line 417 in /home/domoticz/domoticz/plugins/broadlink/plugin.py, function learn
2017-11-19 14:57:40.795 Error: (Bean) ----> Line 487 in /usr/lib/python3.5/broadlink/__init__.py, function enter_learning
2017-11-19 14:57:40.795 Error: (Bean) ----> Line 258 in /usr/lib/python3.5/broadlink/__init__.py, function send_packet
2017-11-19 14:57:40.795 Error: (Bean) ----> Line 162 in /usr/lib/python3.5/broadlink/__init__.py, function encrypt_pyaes
2017-11-19 14:57:57.326 Error: (Bean) ini file not found: /home/pi/domoticz/BroadlinkRM2/BroadlinkRM2-22-254.ini
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2
unfortunately, broadlink still require pycrypto.
Do the same for it (pip3), take care that folder name could be Crypto
Do the same for it (pip3), take care that folder name could be Crypto
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
I installed it allready:
I have it in folders
Code: Select all
pi@raspberrypi:~ $ sudo pip3 install Crypto
Requirement already satisfied: Crypto in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: shellescape in /usr/local/lib/python3.5/dist-packages (from Crypto)
Requirement already satisfied: Naked in /usr/local/lib/python3.5/dist-packages (from Crypto)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from Naked->Crypto)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.5/dist-packages (from Naked->Crypto)
Code: Select all
/usr/local/lib/python3.5/dist-packages/Crypto
/usr/local/lib/python3.5/Crypto
/usr/lib/python3.5/Crypto
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2
Some problem with Crypto&pyaes, depend of configuration.
Have been able to reproduce the case and by removing all entry related to pyaes looks like resolved the problem.
so.. uninstall pyaes and just keep Crypto.
this is what i have on my test machine :
root@test-virtual-machine:/# find . -name 'pyaes' -print
root@test-virtual-machine:/# find . -name 'Crypto' -print
./usr/lib/python3.5/Crypto
./usr/lib/python2.7/dist-packages/Crypto
./usr/local/lib/python3.5/dist-packages/Crypto
root@test-virtual-machine:/#
Have been able to reproduce the case and by removing all entry related to pyaes looks like resolved the problem.
so.. uninstall pyaes and just keep Crypto.
this is what i have on my test machine :
root@test-virtual-machine:/# find . -name 'pyaes' -print
root@test-virtual-machine:/# find . -name 'Crypto' -print
./usr/lib/python3.5/Crypto
./usr/lib/python2.7/dist-packages/Crypto
./usr/local/lib/python3.5/dist-packages/Crypto
root@test-virtual-machine:/#
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
Removed it and now:
Code: Select all
2017-11-20 18:55:26.800 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/broadlink/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2017-11-20 18:55:26.800 Error: (bean) Module Import failed, exception: 'ImportError'
2017-11-20 18:55:26.800 Error: (bean) Module Import failed: ' Name: pyaes'
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2
do the full search on your device and show result.
-
- Posts: 49
- Joined: Tuesday 17 January 2017 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: Broadlink RM2
Result: No such file or directory
-
- Posts: 5
- Joined: Sunday 26 November 2017 12:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Broadlink RM2
Hi guys. Can you help me to solve this problem? What should i do ?
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2
@davidrq78
you need to adapt plugin_http.sh to your env.
in your case, this should be :
nohup python3 /home/pi/domoticz/plugins/BroadlinkRM2/plugin_http.py $1 $2 $3 &
do not forget to give +x
you need to adapt plugin_http.sh to your env.
in your case, this should be :
nohup python3 /home/pi/domoticz/plugins/BroadlinkRM2/plugin_http.py $1 $2 $3 &
do not forget to give +x
-
- Posts: 99
- Joined: Friday 10 March 2017 22:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: Python Plugin: Broadlink RM2
Execute permissions.
chmod +x plugin_http.py
Migration done, hello Home Assistant.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest