Python Plugin : Broadlink RM2 V4

Python and python framework

Moderator: leecollings

Post Reply
Lars65
Posts: 41
Joined: Thursday 14 July 2016 20:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Lars65 »

I have just installed an Broadlink A1, and try to use this plugin.
Everything seems to be fine, except that I get no values for temp and Hum:
2018-03-07 18:40:18.991 (Livingroom Temperature) Updating device from 0:'0.0' to have values 0:'0.0'.
2018-03-07 18:40:18.997 (Broadlink) Update 0:'0.0' (Livingroom Temperature)
Anyone who knows what possibly could be wrong?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

Lars65 wrote: Wednesday 07 March 2018 18:42 I have just installed an Broadlink A1, and try to use this plugin.
Everything seems to be fine, except that I get no values for temp and Hum:
2018-03-07 18:40:18.991 (Livingroom Temperature) Updating device from 0:'0.0' to have values 0:'0.0'.
2018-03-07 18:40:18.997 (Broadlink) Update 0:'0.0' (Livingroom Temperature)
Anyone who knows what possibly could be wrong?
do you have selected the right type:
Capture.JPG
Capture.JPG (11.44 KiB) Viewed 3291 times
Lars65
Posts: 41
Joined: Thursday 14 July 2016 20:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Lars65 »

Yes, I have choosen the A1 sensor. It have found all the sensors, temp, hum, air, noice and lux. But it don't update the values.
Lars65
Posts: 41
Joined: Thursday 14 July 2016 20:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Lars65 »

Got it working. It was needed to be set in AP mode. :D
Alcloud
Posts: 32
Joined: Sunday 18 June 2017 22:00
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Berlin, Germany
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Alcloud »

Velly wrote: Tuesday 13 February 2018 14:16 Anybody with MP1 on V4 (Raspberry, Python 3.4):
are your MP1 plugs POWER STATE synced well with Domoticz?
Thanks!
No, actually, i have the same error..
Legster
Posts: 3
Joined: Thursday 15 March 2018 0:40
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Legster »

Hello everyone.

First off I dont know if its allowed to ask question on this topic when its allready open so delete me if I offend.

setup information:
Domoticz: 3.8975
pip --version: pip 9.0.1 from /usr/lib/python2.7/site-packages
Python 2.7 and 3.5.1 installed on NAS aswell as Python module.

manually exectuted (after following wiki it was not working so found missing items and installed):
python3.5 get-pip.py
python -m pip install pyaes
pip install pycryptodomex
python -m Cryptodome.SelfTest
pip install pycryptodome


My problem (and I found many with same error but not a solution for me):

I have a Synology Nas and have installed Domoticz there.
I also have a broadlink mini. But since it did not work natively i bought a Xiaomi universal remote controller. total nightmare. so back to Broadlink.
I use it alot on my phone to control led lamps but i want it intergrated so installed your awesome script!

I can add the Broadlink in Domotics now and filled in IP and MAC adres of the device.
folder to store ini /usr/local/domoticz/var/plugins/BroadlinkRM2 (all py files i put there including plugin.py as read on wiki).

so far so good.

but the item wont do anything so I check log file in NAS and see:
2018-03-12 15:40:42.872 Domoticz V3.8975 (c)2012-2018 GizMoCuz
2018-03-12 15:40:42.872 Build Hash: 63d0d07-modified, Date: 2018-02-28 08:26:48
2018-03-12 15:40:42.873 Startup Path: /usr/local/domoticz/
2018-03-12 15:40:42.910 EventSystem: reset all events...
2018-03-12 15:40:43.024 PluginSystem: Started, Python version '3.5.1'.
2018-03-12 15:40:43.034 Active notification Subsystems: pushover (1/14)
2018-03-12 15:40:43.036 WebServer(HTTP) started on address: :: with port 8084
2018-03-12 15:40:43.042 WebServer(SSL) started on address: :: with port 8443
2018-03-12 15:40:43.044 Proxymanager started.
2018-03-12 15:40:43.045 Camera: settings (re)loaded
2018-03-12 15:40:43.046 Starting shared server on: :::6144
2018-03-12 15:40:43.046 TCPServer: shared server started...
2018-03-12 15:40:43.047 RxQueue: queue worker started...
2018-03-12 15:40:45.052 ToonThermostat: Worker started...
2018-03-12 15:40:45.052 XiaomiGateway: will listen on 9898 for hardware id 3
2018-03-12 15:40:45.053 XiaomiGateway: Delaying worker startup...
2018-03-12 15:40:50.054 XiaomiGateway: Worker started...
2018-03-12 15:40:50.054 (Broadlink RM ) Started.
2018-03-12 15:40:50.054 XiaomiGateway: Using 192.168.1.114 for local IP address.
2018-03-12 15:40:50.054 EventSystem: reset all events...
2018-03-12 15:40:50.055 EventSystem: reset all device statuses...
2018-03-12 15:40:50.102 XiaomiGateway: RGB Gateway Detected
2018-03-12 15:40:50.159 Python EventSystem: Initalizing event module.
2018-03-12 15:40:50.159 EventSystem: Started
2018-03-12 15:40:50.160 EventSystem: Queue thread started...
2018-03-12 15:40:50.430 PluginSystem: Entering work loop.
2018-03-12 15:40:50.733 [1;31mError: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/BroadlinkRM2/:/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'.[0;0m
2018-03-12 15:40:50.733 [1;31mError: (Broadlink RM ) Module Import failed, exception: 'ImportError'[0;0m
2018-03-12 15:40:50.733 [1;31mError: (Broadlink RM ) Module Import failed: ' Name: broadlink'[0;0m
2018-03-12 15:40:50.733 [1;31mError: (Broadlink RM ) Error Line details not available.[0;0m
2018-03-12 15:40:51.642 (Thermos Jorn) Thermostat (Toon)
2018-03-12 15:40:51.647 (Thermos Jorn) Temp (Temperatuur)
2018-03-12 15:40:51.648 (Thermos Jorn) P1 Smart Meter (Unknown)
2018-03-12 15:40:51.649 (Thermos Jorn) P1 Smart Meter (Unknown)
2018-03-12 15:41:52.714 Incoming connection from: 192.168.1.100
2018-03-12 15:41:52.715 (Broadlink RM ) Stop directive received.
2018-03-12 15:41:52.716 (Broadlink RM ) Stopping threads.
2018-03-12 15:41:52.716 (Broadlink RM ) Stopped.
2018-03-12 15:41:52.716 (Broadlink RM ) Started.
2018-03-12 15:41:52.937 [1;31mError: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/BroadlinkRM2/:/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'.[0;0m
2018-03-12 15:41:52.937 [1;31mError: (Broadlink RM ) Module Import failed, exception: 'ImportError'[0;0m
2018-03-12 15:41:52.938 [1;31mError: (Broadlink RM ) Module Import failed: ' Name: broadlink'[0;0m
2018-03-12 15:41:52.938 [1;31mError: (Broadlink RM ) Error Line details not available.[0;0m
2018-03-12 15:43:00.462 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:43:30.531 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:44:00.604 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:44:30.665 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:45:00.754 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:45:30.822 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:46:00.899 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:46:30.969 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m
2018-03-12 15:46:56.016 [1;31mError: ToonThermostat: retrieveToonState request not successful, restarting..![0;0m
2018-03-12 15:47:00.030 [1;31mError: Broadlink RM hardware (7) thread seems to have ended unexpectedly[0;0m

what can I do? is it a python version problem?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

Legster
Posts: 3
Joined: Thursday 15 March 2018 0:40
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Legster »

zak45 wrote: Saturday 17 March 2018 9:35 let see this :
https://zhougy0717.github.io/2017/07/31 ... on%20Echo/
Thanks Zak45 thats the one I actually used to get as far as I am however it does not contain a solution for the error provided.
It does talk about an connection error in _init_.py however in general and not in detail what to edit (at least not for me as python noob).
My problem is that it cannot even load the plugin.py
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

Legster wrote: Sunday 18 March 2018 23:19
zak45 wrote: Saturday 17 March 2018 9:35 let see this :
https://zhougy0717.github.io/2017/07/31 ... on%20Echo/
Thanks Zak45 thats the one I actually used to get as far as I am however it does not contain a solution for the error provided.
It does talk about an connection error in _init_.py however in general and not in detail what to edit (at least not for me as python noob).
My problem is that it cannot even load the plugin.py
have you take a look at 'Import Error “broadlink”' section ?
Legster
Posts: 3
Joined: Thursday 15 March 2018 0:40
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Legster »

well there is no subfolder in: /usr/local/lib/python3.5/site-packages/
Image

so the command :
cp -r /usr/local/lib/python3.5/site-packages/broadlink-0.5-py3.5.egg/broadlink/ /usr/local/domoticz/var/plugins/BroadlinkRM2/

cant succeed. However my
/usr/local/domoticz/var/plugins/BroadlinkRM2/
has the files i copied as instructed on wiki:
Image

I dont get the broadlink-0.5-py3.egg folder reccon this a gitclone issue but im not sure.
I gitcloned to /volume1/Git/
Image
JesusArmy
Posts: 13
Joined: Thursday 22 March 2018 3:56
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JesusArmy »

Hello,
I am new here, so first a great thanks to zak45 for this nice Broaklink plugin!

Unfortunately I am having some problems running it on my Domoticz setup (under Windows 7).
I had some difficulty to make the plugin work, but after downgrading Python to 3.5.3 I could finally make it run and add my broadlink hardware (with last 3.6.x I could add Broaklink hardware but plugin was crashing and not adding any device as expected).

Now I have two issues:
1/ I can not use the "Learn" feature
As soon as I click the learn button, the system immediatly gave up in the same second:

Code: Select all

2018-03-22 12:09:44.063 (BroadlinkRM2) All plugin system is on pause for 5s...
2018-03-22 12:09:44.063 (BroadlinkRM2) When Broadlink led is lit press the button on your remote within 5 seconds
2018-03-22 12:09:44.063 Error: (BroadlinkRM2) Not able to learn command
I will try to see if I can succeed in getting ini files from Android offical app and copy these to the server tonight as a workaround. :)

2/ Temperature is not working (RM2)
I have seen other posts saying that temp is not reliable. Anyway mine is showing always "0" in Domoticz. I have also many communication errors that might probably be related...

Code: Select all

2018-03-22 12:10:11.214 Error: (BroadlinkRM2) Error Connecting to Broadlink device....192.168.11.31
2018-03-22 12:12:11.215 Error: (BroadlinkRM2) Error Connecting to Broadlink device....192.168.11.31
2018-03-22 12:14:11.217 Error: (BroadlinkRM2) Error Connecting to Broadlink device....192.168.11.31
2018-03-22 12:16:11.252 Error: (BroadlinkRM2) Error Connecting to Broadlink device....192.168.11.31
2018-03-22 12:18:11.253 Error: (BroadlinkRM2) Error Connecting to Broadlink device....192.168.11.31
Detection of the device itself is working. I already know IP and mac but just to see I have set discovery mode and it as properly detected everything including type of device. So I guess that communication on network side seems ok... (Windows firewall, but if the rest is going through I guess that this too should isn't it ?)

Official device is also reporting temperature normally.

Thanks for any lead that could help me solve this! :)
JesusArmy
Posts: 13
Joined: Thursday 22 March 2018 3:56
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JesusArmy »

Just tried import from apps. Import feature itself is working, but triggering the action does not seem to broadcast proper IR signal... :(

Code: Select all

2018-03-22 23:54:20.148 User: Admin initiated a switch command (17/BroadlinkRM2 - 7-10 Sort in order Light off/On)
2018-03-22 23:54:20.151 (BroadlinkRM2) Calling message handler 'onCommand'.
2018-03-22 23:54:20.151 (BroadlinkRM2) onCommand called for Unit 10: Parameter 'On', Level: 0 , Connected : False
2018-03-22 23:54:20.151 (BroadlinkRM2) Generate on Command for learned code stored on unit/ini :10
2018-03-22 23:54:20.153 (BroadlinkRM2) Code loaded : 260084030600013707000135070001360b0001330700013508000135070001360a000133080001350800027306000137070001350900027109000134080002720700013607000136080002730600013608000135070001360700013609000270090001340a0001330900013607000134090001340800027208000135090001340800027209000135070001350a0001330900013507000135089e079205000136090001340900027107000136090001360600013608000135080001340900013407000274070001350900013407000136070001360a0001330900013409000134090001350700013508000272070001360a00013307000273070001370700027207000136070001360800013508000135090002710700013607000136070001360700013607000273080001350900013407000135090001340800027208000136070001350800013508000272090001350700027208000136080001341200012c0900013506000274080001340800013408000135080002720900013408000136080002710700013609000134080001350800013507000273070002730800013507000273080001350a000133080003b0070001350800013507000273080002720700027209000134080001350900013507000136080001350700013607000135080001350700013608000135080001350a0001330900013507000135080001350800013509000134070001360700013806af087e08000136070001350800013507cb54571c1b1c3e1c1c1b1d1a3e1b1c1d3c1e3c1e0001170600013707000135090001350800013507d954571c1c1c3e1a1c1b1e1b3d1b1c1b3e1c3d1c00024707000136080001350900013407e456551c1c1c3e1b1b1c1b1d3e1b1b1d3c1c3f1b00023c080001340800027208ee55581b1d1a3d1c1c1b1e1a3e1b1c1b3e1c3d1c0004ab0800023554571c1b1c3e1c1c1c1b1b3f1b1c1b3f1a3e1d0006e755571c1d1b3c1c1c1c1b1c3d1d1b1b3e1c3e1b0006e857551d1b1b3e1c1b1c1b1e3c1d1b1c3c1c3f1c0006e755571b1c1c3d1c1c1b1c1c3f1a1b1c3e1c3d1c0006e855561c1b1c3e1b1d1c1c1a3e1c1b1d3c1d3d1b0006ea54571d1a1c3e1b1d1b1b1d3c1c1b1d3f1b3d1b0006e856571b1b1d3e1b1c1b1d1a3e1c1b1c3e1c3e1a0006e955571c1c1c3c1c1c1b1c1d3c1c1b1e3c1c3d1c0006e755571d1c1a3e1c1b1c1b1c3e1d1a1c3e1b3e1b0006ea55561b1d1c3d1b1e191c1c3d1c1c1b3e1c3e1b0007c507000d0500000000
2018-03-22 23:54:20.156 (BroadlinkRM2) Command line : "C:\Program Files (x86)\Domoticz\plugins\BroadlinkRM2\plugin_send.py" D:\Scripts\Domoticz\BroadlinkRM2/BroadlinkRM2-7-10.ini
2018-03-22 23:54:20.156 (BroadlinkRM2 - 7-10 Sort in order Light off) Updating device from 1:'On-13' to have values 1:'On-14'.
2018-03-22 23:54:20.423 (BroadlinkRM2) Update 1:'On-14' (BroadlinkRM2 - 7-10 Sort in order Light off)
2018-03-22 23:54:31.651 (BroadlinkRM2) Calling message handler 'onHeartbeat'.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

JesusArmy wrote: Thursday 22 March 2018 15:56 Just tried import from apps. Import feature itself is working, but triggering the action does not seem to broadcast proper IR signal... :(

can you give the output of this cmd :
pip show broadlink
JesusArmy
Posts: 13
Joined: Thursday 22 March 2018 3:56
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JesusArmy »

Is it good? :)

Code: Select all

D:\>pip 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: [email protected]
License: UNKNOWN
Location: c:\program files (x86)\python35-32\lib\site-packages
Requires: pycryptodome, PyCRC
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

JesusArmy wrote: Thursday 22 March 2018 17:43 Is it good? :)

Code: Select all

D:\>pip show broadlink
Name: broadlink
Version: 0.8
Requires: pycryptodome, PyCRC
and.
Version 0.8 is the problem, this is the last one but not work as expected.
You need to do that :

pip uninstall pycryptodome
pip uninstall broadlink

download python-broadlink-master-06.zip from dropbox
unzip it somewhere
go to this folder until you find setup.py
open another cmd and go to this folder
type this command
pip install .
--> do not forget the dot '.' at the end
this should install broadlink v0.6

restart Domoticz

EDIT : all of that with admin right .. of course.
JesusArmy
Posts: 13
Joined: Thursday 22 March 2018 3:56
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JesusArmy »

Thanks a lot for the instructions.

Uninstall went both well.

But unfortunately install has ended with an error :(

Not sure if it could be a path issue or something like this?

Full output here:

Code: Select all

D:\downloads\temp\python-broadlink-master>pip install .
Processing d:\downloads\temp\python-broadlink-master
Collecting pycrypto==2.6.1 (from broadlink==0.6)
  Downloading pycrypto-2.6.1.tar.gz (446kB)
    100% |################################| 450kB 419kB/s
Installing collected packages: pycrypto, broadlink
  Running setup.py install for pycrypto ... error
    Complete output from command "c:\program files (x86)\python35-32\python.exe"
 -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\T
emp\\pip-build-n5nf_jpp\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(_
_file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file
__, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-v83lnfyf-rec
ord\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.5
    creating build\lib.win32-3.5\Crypto
    copying lib\Crypto\pct_warnings.py -> build\lib.win32-3.5\Crypto
    copying lib\Crypto\__init__.py -> build\lib.win32-3.5\Crypto
    creating build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\hashalgo.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\HMAC.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\MD2.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\MD4.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\MD5.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\RIPEMD.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\SHA.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\SHA224.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\SHA256.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\SHA384.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\SHA512.py -> build\lib.win32-3.5\Crypto\Hash
    copying lib\Crypto\Hash\__init__.py -> build\lib.win32-3.5\Crypto\Hash
    creating build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\AES.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\ARC2.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\ARC4.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\blockalgo.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\Blowfish.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\CAST.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\DES.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\DES3.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\PKCS1_OAEP.py -> build\lib.win32-3.5\Crypto\Cipher

    copying lib\Crypto\Cipher\PKCS1_v1_5.py -> build\lib.win32-3.5\Crypto\Cipher

    copying lib\Crypto\Cipher\XOR.py -> build\lib.win32-3.5\Crypto\Cipher
    copying lib\Crypto\Cipher\__init__.py -> build\lib.win32-3.5\Crypto\Cipher
    creating build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\asn1.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\Counter.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\number.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\py3compat.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\randpool.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\RFC1751.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\winrandom.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\_number_new.py -> build\lib.win32-3.5\Crypto\Util
    copying lib\Crypto\Util\__init__.py -> build\lib.win32-3.5\Crypto\Util
    creating build\lib.win32-3.5\Crypto\Random
    copying lib\Crypto\Random\random.py -> build\lib.win32-3.5\Crypto\Random
    copying lib\Crypto\Random\_UserFriendlyRNG.py -> build\lib.win32-3.5\Crypto\
Random
    copying lib\Crypto\Random\__init__.py -> build\lib.win32-3.5\Crypto\Random
    creating build\lib.win32-3.5\Crypto\Random\Fortuna
    copying lib\Crypto\Random\Fortuna\FortunaAccumulator.py -> build\lib.win32-3
.5\Crypto\Random\Fortuna
    copying lib\Crypto\Random\Fortuna\FortunaGenerator.py -> build\lib.win32-3.5
\Crypto\Random\Fortuna
    copying lib\Crypto\Random\Fortuna\SHAd256.py -> build\lib.win32-3.5\Crypto\R
andom\Fortuna
    copying lib\Crypto\Random\Fortuna\__init__.py -> build\lib.win32-3.5\Crypto\
Random\Fortuna
    creating build\lib.win32-3.5\Crypto\Random\OSRNG
    copying lib\Crypto\Random\OSRNG\fallback.py -> build\lib.win32-3.5\Crypto\Ra
ndom\OSRNG
    copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win32-3.5\Crypto\Random\O
SRNG
    copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win32-3.5\Crypto\Rando
m\OSRNG
    copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win32-3.5\Crypto\Ra
ndom\OSRNG
    copying lib\Crypto\Random\OSRNG\__init__.py -> build\lib.win32-3.5\Crypto\Ra
ndom\OSRNG
    creating build\lib.win32-3.5\Crypto\SelfTest
    copying lib\Crypto\SelfTest\st_common.py -> build\lib.win32-3.5\Crypto\SelfT
est
    copying lib\Crypto\SelfTest\__init__.py -> build\lib.win32-3.5\Crypto\SelfTe
st
    creating build\lib.win32-3.5\Crypto\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win32-3.5\Crypto\S
elfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_AES.py -> build\lib.win32-3.5\Crypto
\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_ARC2.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win32-3.5\C
rypto\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_DES.py -> build\lib.win32-3.5\Crypto
\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_DES3.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win32-3.5\C
rypto\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_pkcs1_oaep.py -> build\lib.win32-3.5
\Crypto\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\test_XOR.py -> build\lib.win32-3.5\Crypto
\SelfTest\Cipher
    copying lib\Crypto\SelfTest\Cipher\__init__.py -> build\lib.win32-3.5\Crypto
\SelfTest\Cipher
    creating build\lib.win32-3.5\Crypto\SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\common.py -> build\lib.win32-3.5\Crypto\Sel
fTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_HMAC.py -> build\lib.win32-3.5\Crypto\
SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_MD2.py -> build\lib.win32-3.5\Crypto\S
elfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win32-3.5\Crypto\S
elfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win32-3.5\Crypto\S
elfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win32-3.5\Crypto\S
elfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Hash
    copying lib\Crypto\SelfTest\Hash\__init__.py -> build\lib.win32-3.5\Crypto\S
elfTest\Hash
    creating build\lib.win32-3.5\Crypto\SelfTest\Protocol
    copying lib\Crypto\SelfTest\Protocol\test_AllOrNothing.py -> build\lib.win32
-3.5\Crypto\SelfTest\Protocol
    copying lib\Crypto\SelfTest\Protocol\test_chaffing.py -> build\lib.win32-3.5
\Crypto\SelfTest\Protocol
    copying lib\Crypto\SelfTest\Protocol\test_KDF.py -> build\lib.win32-3.5\Cryp
to\SelfTest\Protocol
    copying lib\Crypto\SelfTest\Protocol\test_rfc1751.py -> build\lib.win32-3.5\
Crypto\SelfTest\Protocol
    copying lib\Crypto\SelfTest\Protocol\__init__.py -> build\lib.win32-3.5\Cryp
to\SelfTest\Protocol
    creating build\lib.win32-3.5\Crypto\SelfTest\PublicKey
    copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win32-3.5\Cry
pto\SelfTest\PublicKey
    copying lib\Crypto\SelfTest\PublicKey\test_ElGamal.py -> build\lib.win32-3.5
\Crypto\SelfTest\PublicKey
    copying lib\Crypto\SelfTest\PublicKey\test_importKey.py -> build\lib.win32-3
.5\Crypto\SelfTest\PublicKey
    copying lib\Crypto\SelfTest\PublicKey\test_RSA.py -> build\lib.win32-3.5\Cry
pto\SelfTest\PublicKey
    copying lib\Crypto\SelfTest\PublicKey\__init__.py -> build\lib.win32-3.5\Cry
pto\SelfTest\PublicKey
    creating build\lib.win32-3.5\Crypto\SelfTest\Random
    copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win32-3.5\Cry
pto\SelfTest\Random
    copying lib\Crypto\SelfTest\Random\test_rpoolcompat.py -> build\lib.win32-3.
5\Crypto\SelfTest\Random
    copying lib\Crypto\SelfTest\Random\test__UserFriendlyRNG.py -> build\lib.win
32-3.5\Crypto\SelfTest\Random
    copying lib\Crypto\SelfTest\Random\__init__.py -> build\lib.win32-3.5\Crypto
\SelfTest\Random
    creating build\lib.win32-3.5\Crypto\SelfTest\Random\Fortuna
    copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaAccumulator.py -> bui
ld\lib.win32-3.5\Crypto\SelfTest\Random\Fortuna
    copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaGenerator.py -> build
\lib.win32-3.5\Crypto\SelfTest\Random\Fortuna
    copying lib\Crypto\SelfTest\Random\Fortuna\test_SHAd256.py -> build\lib.win3
2-3.5\Crypto\SelfTest\Random\Fortuna
    copying lib\Crypto\SelfTest\Random\Fortuna\__init__.py -> build\lib.win32-3.
5\Crypto\SelfTest\Random\Fortuna
    creating build\lib.win32-3.5\Crypto\SelfTest\Random\OSRNG
    copying lib\Crypto\SelfTest\Random\OSRNG\test_fallback.py -> build\lib.win32
-3.5\Crypto\SelfTest\Random\OSRNG
    copying lib\Crypto\SelfTest\Random\OSRNG\test_generic.py -> build\lib.win32-
3.5\Crypto\SelfTest\Random\OSRNG
    copying lib\Crypto\SelfTest\Random\OSRNG\test_nt.py -> build\lib.win32-3.5\C
rypto\SelfTest\Random\OSRNG
    copying lib\Crypto\SelfTest\Random\OSRNG\test_posix.py -> build\lib.win32-3.
5\Crypto\SelfTest\Random\OSRNG
    copying lib\Crypto\SelfTest\Random\OSRNG\test_winrandom.py -> build\lib.win3
2-3.5\Crypto\SelfTest\Random\OSRNG
    copying lib\Crypto\SelfTest\Random\OSRNG\__init__.py -> build\lib.win32-3.5\
Crypto\SelfTest\Random\OSRNG
    creating build\lib.win32-3.5\Crypto\SelfTest\Util
    copying lib\Crypto\SelfTest\Util\test_asn1.py -> build\lib.win32-3.5\Crypto\
SelfTest\Util
    copying lib\Crypto\SelfTest\Util\test_Counter.py -> build\lib.win32-3.5\Cryp
to\SelfTest\Util
    copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win32-3.5\Crypt
o\SelfTest\Util
    copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win32-3.5\Cr
ypto\SelfTest\Util
    copying lib\Crypto\SelfTest\Util\__init__.py -> build\lib.win32-3.5\Crypto\S
elfTest\Util
    creating build\lib.win32-3.5\Crypto\SelfTest\Signature
    copying lib\Crypto\SelfTest\Signature\test_pkcs1_15.py -> build\lib.win32-3.
5\Crypto\SelfTest\Signature
    copying lib\Crypto\SelfTest\Signature\test_pkcs1_pss.py -> build\lib.win32-3
.5\Crypto\SelfTest\Signature
    copying lib\Crypto\SelfTest\Signature\__init__.py -> build\lib.win32-3.5\Cry
pto\SelfTest\Signature
    creating build\lib.win32-3.5\Crypto\Protocol
    copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win32-3.5\Crypto\Pr
otocol
    copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win32-3.5\Crypto\Protoc
ol
    copying lib\Crypto\Protocol\KDF.py -> build\lib.win32-3.5\Crypto\Protocol
    copying lib\Crypto\Protocol\__init__.py -> build\lib.win32-3.5\Crypto\Protoc
ol
    creating build\lib.win32-3.5\Crypto\PublicKey
    copying lib\Crypto\PublicKey\DSA.py -> build\lib.win32-3.5\Crypto\PublicKey
    copying lib\Crypto\PublicKey\ElGamal.py -> build\lib.win32-3.5\Crypto\Public
Key
    copying lib\Crypto\PublicKey\pubkey.py -> build\lib.win32-3.5\Crypto\PublicK
ey
    copying lib\Crypto\PublicKey\RSA.py -> build\lib.win32-3.5\Crypto\PublicKey
    copying lib\Crypto\PublicKey\_DSA.py -> build\lib.win32-3.5\Crypto\PublicKey

    copying lib\Crypto\PublicKey\_RSA.py -> build\lib.win32-3.5\Crypto\PublicKey

    copying lib\Crypto\PublicKey\_slowmath.py -> build\lib.win32-3.5\Crypto\Publ
icKey
    copying lib\Crypto\PublicKey\__init__.py -> build\lib.win32-3.5\Crypto\Publi
cKey
    creating build\lib.win32-3.5\Crypto\Signature
    copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win32-3.5\Crypto\Sign
ature
    copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win32-3.5\Crypto\Sig
nature
    copying lib\Crypto\Signature\__init__.py -> build\lib.win32-3.5\Crypto\Signa
ture
    Skipping optional fixer: buffer
    Skipping optional fixer: idioms
    Skipping optional fixer: set_literal
    Skipping optional fixer: ws_comma
    running build_ext
    warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastm
ath.
    building 'Crypto.Random.OSRNG.winrandom' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

    ----------------------------------------
Command ""c:\program files (x86)\python35-32\python.exe" -u -c "import setuptool
s, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-n5nf_jpp\
\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record C:\Users\User\AppData\Local\Temp\pip-v83lnfyf-record\install-record.txt -
-single-version-externally-managed --compile" failed with error code 1 in C:\Use
rs\User\AppData\Local\Temp\pip-build-n5nf_jpp\pycrypto\
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
I guess problem is in one of these errors/warning?

Code: Select all

Running setup.py install for pycrypto ... error
 (...)
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastm
(...)
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
ath.
But should I really need to install VC++ 14.0 ? Broadlink 0.8 did installed properly like this... Or should I upgrade Python version ? I did downgrade from 3.6.4 to 3.5.3 to make the plugin works yesterday...
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

JesusArmy wrote: Thursday 22 March 2018 18:21 Thanks a lot for the instructions.

Uninstall went both well.

But unfortunately install has ended with an error :(

Command ""c:\program files (x86)\python35-32\python.exe" -u -c "import setuptool
s, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-n5nf_jpp\
\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record C:\Users\User\AppData\Local\Temp\pip-v83lnfyf-record\install-record.txt -
-single-version-externally-managed --compile" failed with error code 1 in C:\Use
rs\User\AppData\Local\Temp\pip-build-n5nf_jpp\pycrypto\

Running setup.py install for pycrypto ... error
(...)
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastm
(...)
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visu ... uild-tools
ath.[/code]

But should I really need to install VC++ 14.0 ? Broadlink 0.8 did installed properly like this... Or should I upgrade Python version ? I did downgrade from 3.6.4 to 3.5.3 to make the plugin works yesterday...
You do not need VC++ and you need to stay on python 3.5
Just download pycrypto-2.6.1-cp35-none-win32.whl from dropbox and type this command:
pip install pycrypto-2.6.1-cp35-none-win32.whl
after, you need to go to D:\downloads\temp\python-broadlink-master>
and type
pip install .
JeremyM
Posts: 4
Joined: Thursday 22 March 2018 23:19
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JeremyM »

Hello Everyone !

I am currently trying to install the broadlink plugin with no success ! I always have the same issue :(

Using the beta version 3.9052

Code: Select all

2018-03-22 23:08:12.573 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/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'.
2018-03-22 23:08:12.573 Error: (TV Controller) Module Import failed, exception: 'ImportError'
Anyone has manage this problem ? I tried to find something on the forum but the answer is no clear regarding this Wrong Python Path.

Thanks for you help :D
JesusArmy
Posts: 13
Joined: Thursday 22 March 2018 3:56
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JesusArmy »

zak45 wrote: Thursday 22 March 2018 18:55 You do not need VC++ and you need to stay on python 3.5
Just download pycrypto-2.6.1-cp35-none-win32.whl from dropbox and type this command:
pip install pycrypto-2.6.1-cp35-none-win32.whl
after, you need to go to D:\downloads\temp\python-broadlink-master>
and type
pip install .
Wonderfull, big big thanks! It went well and I am almost sure that it is working now! :) I am actually doing that remotely so I cannot confirm the actions but I do not have anymore communication errors in the logs, and temperature is reported correctly now! So it's a good sign, if think the rest should follow and be ok. :)

The day you stop supporting the plugin we are doomed. :D Thanks again for the great plugin and support!
JeremyM
Posts: 4
Joined: Thursday 22 March 2018 23:19
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by JeremyM »

JeremyM wrote: Thursday 22 March 2018 23:27 Hello Everyone !

I am currently trying to install the broadlink plugin with no success ! I always have the same issue :(

Using the beta version 3.9052

Code: Select all

2018-03-22 23:08:12.573 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/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'.
2018-03-22 23:08:12.573 Error: (TV Controller) Module Import failed, exception: 'ImportError'
Anyone has manage this problem ? I tried to find something on the forum but the answer is no clear regarding this Wrong Python Path.

Thanks for you help :D
Up ! Anyone can help me ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest