Python Plugin : Broadlink RM2 V4

Python and python framework

Moderator: leecollings

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 »

@titoz
hummm.. that's look ok.. do you have installed pyaes & pycrypto ??
titoz
Posts: 5
Joined: Monday 29 January 2018 15:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by titoz »

@zak45
yes, i have installed both as described in the wiki:
For others
pip3 install broadlink --> mandatory
pip3 install pycrypto --> no more mandatory, pyaes will be used instead (this need to be double-checked)
...but i used the pip2 because i'm not able to install pip3 on my synology
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 »

titoz wrote: Tuesday 30 January 2018 21:24 @zak45
yes, i have installed both as described in the wiki:
For others
pip3 install broadlink --> mandatory
pip3 install pycrypto --> no more mandatory, pyaes will be used instead (this need to be double-checked)
...but i used the pip2 because i'm not able to install pip3 on my synology
So.. that's the problem.
See this link, hope could provide you some help:
https://zhougy0717.github.io/2017/07/31 ... on%20Echo/
titoz
Posts: 5
Joined: Monday 29 January 2018 15:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by titoz »

zak45 wrote: Tuesday 30 January 2018 23:16
titoz wrote: Tuesday 30 January 2018 21:24 @zak45
yes, i have installed both as described in the wiki:
For others
pip3 install broadlink --> mandatory
pip3 install pycrypto --> no more mandatory, pyaes will be used instead (this need to be double-checked)
...but i used the pip2 because i'm not able to install pip3 on my synology
So.. that's the problem.
See this link, hope could provide you some help:
https://zhougy0717.github.io/2017/07/31 ... on%20Echo/
Thank you very much, i will try it for sure and i will let you know :D
titoz
Posts: 5
Joined: Monday 29 January 2018 15:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by titoz »

HI Zak45
i have try to reinstall all, following the link that u sent me, but nothing has changed and i still have the same issue.
I'm able to turn ON/OFF the spmini using this python script:

#!/usr/bin/python

import broadlink
import sys

device_ip="192.168.1.5"
device_port=80
device_mac="02XXXXXXDC61"
device_type="broadlink.sp2"

action = str(sys.argv[1])

device = broadlink.sp2(host=(device_ip,device_port), mac=bytearray.fromhex(device_mac))

device.auth()
#device.host

if action == "on":
device.set_power(True)
elif action == "off":
device.set_power(False)
elif action == "status":
print "on" if device.check_power() else "off"

Any other suggestion about?
Thanks in advance
titoz
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by febalci »

Wow @titoz,
Thank you very much for the bash script; my SP mini is at last working with a script. I was hopeless after failing from the @zak45 plugin; now at least i know that it is doable :D Now i have to look for ways to make the plugin work.
peterredl
Posts: 6
Joined: Saturday 03 February 2018 12:42
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by peterredl »

Installation of Broadlink extension fails.

I run a Domoticz with Xiaomi devices which works perfectly. Now I would like to integrate my other devices which I steer with Broadlink RM2 into Domoticz. Unfortunately, the setup routine for Windows does not work. The routine turns red every time and ends.

Unfortunately, I can not continue and ask for help. If someone can help me please send me a message.

Broadlink RM2 python plugin install for Win"
" this need to be run with admin right "
""
""
"Search python version"
Python 3.6.4
" main module used by the plugin"
"Python version : " 36
Collecting broadlink
Using cached broadlink-0.6.tar.gz
Collecting pycrypto==2.6.1 (from broadlink)
Using cached pycrypto-2.6.1.tar.gz
Installing collected packages: pycrypto, broadlink
Running setup.py install for pycrypto ... error
Complete output from command c:\users\peter\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\peter\\AppData\\Local\\Temp\\pip-build-2roclsga\\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\peter\AppData\Local\Temp\pip-79pbxumi-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\Crypto
copying lib\Crypto\pct_warnings.py -> build\lib.win32-3.6\Crypto
copying lib\Crypto\__init__.py -> build\lib.win32-3.6\Crypto
creating build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\hashalgo.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\HMAC.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\MD2.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\MD4.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\MD5.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\RIPEMD.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA224.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA256.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA384.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA512.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\__init__.py -> build\lib.win32-3.6\Crypto\Hash
creating build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\AES.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\ARC2.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\ARC4.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\blockalgo.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\Blowfish.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\CAST.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\DES.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\DES3.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_OAEP.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_v1_5.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\XOR.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\__init__.py -> build\lib.win32-3.6\Crypto\Cipher
creating build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\asn1.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\Counter.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\number.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\py3compat.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\randpool.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\RFC1751.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\winrandom.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\_number_new.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\__init__.py -> build\lib.win32-3.6\Crypto\Util
creating build\lib.win32-3.6\Crypto\Random
copying lib\Crypto\Random\random.py -> build\lib.win32-3.6\Crypto\Random
copying lib\Crypto\Random\_UserFriendlyRNG.py -> build\lib.win32-3.6\Crypto\Random
copying lib\Crypto\Random\__init__.py -> build\lib.win32-3.6\Crypto\Random
creating build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaAccumulator.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaGenerator.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\SHAd256.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\__init__.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
creating build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\fallback.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\__init__.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
creating build\lib.win32-3.6\Crypto\SelfTest
copying lib\Crypto\SelfTest\st_common.py -> build\lib.win32-3.6\Crypto\SelfTest
copying lib\Crypto\SelfTest\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest
creating build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_AES.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC2.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES3.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_oaep.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_XOR.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
creating build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\common.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_HMAC.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD2.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
creating build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_AllOrNothing.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_chaffing.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_KDF.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_rfc1751.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
creating build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_ElGamal.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_importKey.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_RSA.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
creating build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_rpoolcompat.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test__UserFriendlyRNG.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
creating build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaAccumulator.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaGenerator.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_SHAd256.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
creating build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_fallback.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_generic.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_nt.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_posix.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_winrandom.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
creating build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_asn1.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_Counter.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
creating build\lib.win32-3.6\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_15.py -> build\lib.win32-3.6\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_pss.py -> build\lib.win32-3.6\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\__init__.py -> build\lib.win32-3.6\Crypto\SelfTest\Signature
creating build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\KDF.py -> build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\__init__.py -> build\lib.win32-3.6\Crypto\Protocol
creating build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\DSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\ElGamal.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\pubkey.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\RSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\_DSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\_RSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\_slowmath.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\__init__.py -> build\lib.win32-3.6\Crypto\PublicKey
creating build\lib.win32-3.6\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win32-3.6\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win32-3.6\Crypto\Signature
copying lib\Crypto\Signature\__init__.py -> build\lib.win32-3.6\Crypto\Signature
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._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
creating build\temp.win32-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:\users\peter\appdata\local\programs\python\python36-32\include -Ic:\users\peter\appdata\local\programs\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcsrc/winrand.c /Fobuild\temp.win32-3.6\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(26): error C2061: syntax error: identifier 'intmax_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier 'rem'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(28): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2061: syntax error: identifier 'imaxdiv_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(40): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(41): error C2146: syntax error: missing ')' before identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(41): error C2061: syntax error: identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(41): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(42): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(45): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2146: syntax error: missing ')' before identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2061: syntax error: identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(48): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(50): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(56): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(63): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(69): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(76): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(82): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(89): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(95): error C2143: syntax error: missing '{' before '__cdecl'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

----------------------------------------
Command "c:\users\peter\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\peter\\AppData\\Local\\Temp\\pip-build-2roclsga\\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\peter\AppData\Local\Temp\pip-79pbxumi-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\peter\AppData\Local\Temp\pip-build-2roclsga\pycrypto\
""
"ERROR: broadlink installation error"
Drücken Sie eine beliebige Taste . . .
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 »

@peterredl
I see you have python 3.6 : Python 3.6.4
Never has been able to have it running well...
If you do not depend of this version, I would recommend 3.5 x86.
peterredl
Posts: 6
Joined: Saturday 03 February 2018 12:42
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by peterredl »

Thanks, zak45.
I tried to use the version Python 3.5.4.
Now there is another mistake .....

Please help me again.

Here is the new error log.

"Broadlink RM2 python plugin install for Win"
" this need to be run with admin right "
""
""
"Search python version"
Python 3.5.4
" main module used by the plugin"
"Python version : " 35
Collecting broadlink
Using cached broadlink-0.6.tar.gz
Collecting pycrypto==2.6.1 (from broadlink)
Using cached pycrypto-2.6.1.tar.gz
Installing collected packages: pycrypto, broadlink
Running setup.py install for pycrypto ... error
Complete output from command c:\users\toshiba\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-build-wlmt6a_i\\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\Toshiba\AppData\Local\Temp\pip-3uqwiou1-record\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\Random\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\Random\OSRNG
copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win32-3.5\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win32-3.5\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win32-3.5\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\__init__.py -> build\lib.win32-3.5\Crypto\Random\OSRNG
creating build\lib.win32-3.5\Crypto\SelfTest
copying lib\Crypto\SelfTest\st_common.py -> build\lib.win32-3.5\Crypto\SelfTest
copying lib\Crypto\SelfTest\__init__.py -> build\lib.win32-3.5\Crypto\SelfTest
creating build\lib.win32-3.5\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win32-3.5\Crypto\SelfTest\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\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win32-3.5\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win32-3.5\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win32-3.5\Crypto\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\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win32-3.5\Crypto\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\SelfTest\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\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win32-3.5\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\__init__.py -> build\lib.win32-3.5\Crypto\SelfTest\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\Crypto\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\Crypto\SelfTest\Protocol
creating build\lib.win32-3.5\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win32-3.5\Crypto\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\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\__init__.py -> build\lib.win32-3.5\Crypto\SelfTest\PublicKey
creating build\lib.win32-3.5\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win32-3.5\Crypto\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.win32-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 -> build\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.win32-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\Crypto\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.win32-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\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win32-3.5\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win32-3.5\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\__init__.py -> build\lib.win32-3.5\Crypto\SelfTest\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\Crypto\SelfTest\Signature
creating build\lib.win32-3.5\Crypto\Protocol
copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win32-3.5\Crypto\Protocol
copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win32-3.5\Crypto\Protocol
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\Protocol
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\PublicKey
copying lib\Crypto\PublicKey\pubkey.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\_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\PublicKey
copying lib\Crypto\PublicKey\__init__.py -> build\lib.win32-3.5\Crypto\PublicKey
creating build\lib.win32-3.5\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win32-3.5\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win32-3.5\Crypto\Signature
copying lib\Crypto\Signature\__init__.py -> build\lib.win32-3.5\Crypto\Signature
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._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
creating build\temp.win32-3.5\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:\users\toshiba\appdata\local\programs\python\python35-32\include -Ic:\users\toshiba\appdata\local\programs\python\python35-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /Tcsrc/winrand.c /Fobuild\temp.win32-3.5\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\toshiba\appdata\local\programs\python\python35-32\libs /LIBPATH:c:\users\toshiba\appdata\local\programs\python\python35-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86" ws2_32.lib advapi32.lib /EXPORT:PyInit_winrandom build\temp.win32-3.5\Release\src/winrand.obj /OUT:build\lib.win32-3.5\Crypto\Random\OSRNG\winrandom.cp35-win32.pyd /IMPLIB:build\temp.win32-3.5\Release\src\winrandom.cp35-win32.lib
Creating library build\temp.win32-3.5\Release\src\winrandom.cp35-win32.lib and object build\temp.win32-3.5\Release\src\winrandom.cp35-win32.exp
Generating code
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1158

----------------------------------------
Command "c:\users\toshiba\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-build-wlmt6a_i\\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\Toshiba\AppData\Local\Temp\pip-3uqwiou1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Toshiba\AppData\Local\Temp\pip-build-wlmt6a_i\pycrypto\
""
"ERROR: broadlink installation error"
Drücken Sie eine beliebige Taste . . .
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 »

peterredl wrote: Sunday 04 February 2018 22:47 Thanks, zak45.
I tried to use the version Python 3.5.4.
Now there is another mistake .....

Please help me again.

Here is the new error log.

can you provide the output of:
pip --version
peterredl
Posts: 6
Joined: Saturday 03 February 2018 12:42
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by peterredl »

Sorry, I do not know how to do it :-(
Unfortunately, I'm not a programmer, I'm just a user. Everything I know, I only know from the domoticz wiki.

I try to connect to Broadlink based on this directive. https://www.domoticz.com/wiki/Plugins/B ... dows_users

I think I've come a long way. See the picture. It was not a problem with the Xiaomi Gateway. But integrating Broadlink into Domoticz just does not work for me.

For further advice or instructions I would be very grateful.

[img]http://C:My Domoticz.png]
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 »

peterredl wrote: Monday 05 February 2018 14:23 Sorry, I do not know how to do it :-(
Unfortunately, I'm not a programmer, I'm just a user. Everything I know, I only know from the domoticz wiki.

I try to connect to Broadlink based on this directive. https://www.domoticz.com/wiki/Plugins/B ... dows_users

I think I've come a long way. See the picture. It was not a problem with the Xiaomi Gateway. But integrating Broadlink into Domoticz just does not work for me.

For further advice or instructions I would be very grateful.

[img]http://C:My Domoticz.png]
No problem...
open a cmd prompt (start/execute/cmd)
type :
pip --version
peterredl
Posts: 6
Joined: Saturday 03 February 2018 12:42
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by peterredl »

Got it.

Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. Alle Rechte vorbehalten.

C:\WINDOWS\system32>pip --version
pip 9.0.1 from c:\users\toshiba\appdata\local\programs\python\python35-32\lib\site-packages (python 3.5)

C:\WINDOWS\system32>
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 »

ok, you need to install python x86, just forget x64...
during installation, you need also to say that you want it for all users & include into path...
If you search on the forum, you will be able to find even some screenshot.
this is my output :

C:\Users\Z>pip --version
pip 9.0.1 from c:\program files (x86)\python35-32\lib\site-packages (python 3.5)
Kruu
Posts: 49
Joined: Tuesday 17 January 2017 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Kruu »

I just can manage to get my Bean mini to work with domoticz, always this message.

Code: Select all

2018-02-05 20:12:19.720 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/BroadlinkRM2/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-02-05 20:12:19.720 Error: (Bean) Module Import failed, exception: 'ImportError'
2018-02-05 20:12:19.720 Error: (Bean) Module Import failed: ' Name: pyaes'
2018-02-05 20:13:30.240 Error: Bean hardware (24) thread seems to have ended unexpectedly
2018-02-05 20:14:00.247 Error: Bean hardware (24) thread seems to have ended unexpectedly
2018-02-05 20:14:30.254 Error: Bean hardware (24) thread seems to have ended unexpectedly
2018-02-05 20:14:56.556 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/BroadlinkRM2/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-02-05 20:14:56.556 Error: (Bean) Module Import failed, exception: 'ImportError'
2018-02-05 20:14:56.556 Error: (Bean) Module Import failed: ' Name: pyaes'
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 »

Kruu wrote: Monday 05 February 2018 20:16 I just can manage to get my Bean mini to work with domoticz, always this message.

2018-02-05 20:14:56.556 Error: (Bean) Module Import failed, exception: 'ImportError'
2018-02-05 20:14:56.556 Error: (Bean) Module Import failed: ' Name: pyaes'
Do you have installed pyaes ?
try:
sudo pip3 install pyaes
Kruu
Posts: 49
Joined: Tuesday 17 January 2017 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Kruu »

HM, dont know why I have missed that, but now I get error

Code: Select all

2018-02-05 21:14:36.391 Error: (bean) check power error
2018-02-05 21:15:15.849 Error: (bean) Error getting temperature data from Broadlink device....Timeout
2018-02-05 21:15:15.850 Error: (bean) Error Connecting to Broadlink device....127.0.0.1
2018-02-05 21:16:06.270 Error: (bean) check power error
2018-02-05 21:16:57.488 Error: (bean) check power error
2018-02-05 21:18:30.732 Error: (bean2) check power error
2018-02-05 21:20:10.270 Error: (bean2) Error getting temperature data from Broadlink device....Timeout
2018-02-05 21:20:10.270 Error: (bean2) Error Connecting to Broadlink device....192.168.1.196
2018-02-05 21:23:29.605 Error: (bean2) check power error
2018-02-05 21:23:48.453 Error: (bean2) check power error
2018-02-05 21:25:28.010 Error: (bean2) Error getting temperature data from Broadlink device....Timeout
2018-02-05 21:25:28.010 Error: (bean2) Error Connecting to Broadlink device....192.168.1.196

Code: Select all

2018-02-05 21:23:29.296 (bean2) Exiting work loop...
2018-02-05 21:23:29.296 (bean2) Stopped.
2018-02-05 21:23:29.602 (bean2) Initialized version 4.0.0, author 'zak45'
2018-02-05 21:23:48.104 (bean2) Exiting work loop...
2018-02-05 21:23:48.105 (bean2) Stopped.
2018-02-05 21:23:48.450 (bean2) Initialized version 4.0.0, author 'zak45'
And under hardware type it shows me 2 same Broadlink RM2 with KODI Remote
peterredl
Posts: 6
Joined: Saturday 03 February 2018 12:42
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by peterredl »

zak45 wrote: Monday 05 February 2018 17:51 ok, you need to install python x86, just forget x64...
during installation, you need also to say that you want it for all users & include into path...
If you search on the forum, you will be able to find even some screenshot.
this is my output :

C:\Users\Z>pip --version
pip 9.0.1 from c:\program files (x86)\python35-32\lib\site-packages (python 3.5)
[/quote

Now i have the same version as you....

C:\Users\Toshiba>pip --version
pip 9.0.1 from c:\program files (x86)\python35-32\lib\site-packages (python 3.5)

C:\Users\Toshiba>

But the installation continued to fail...

copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win32-3.5\Crypto\Signature
copying lib\Crypto\Signature\__init__.py -> build\lib.win32-3.5\Crypto\Signature
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._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
creating build\temp.win32-3.5\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ "-Ic:\program files (x86)\python35-32\include" "-Ic:\program files (x86)\python35-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /Tcsrc/winrand.c /Fobuild\temp.win32-3.5\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:c:\program files (x86)\python35-32\libs" "/LIBPATH:c:\program files (x86)\python35-32\PCbuild\win32" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86" ws2_32.lib advapi32.lib /EXPORT:PyInit_winrandom build\temp.win32-3.5\Release\src/winrand.obj /OUT:build\lib.win32-3.5\Crypto\Random\OSRNG\winrandom.cp35-win32.pyd /IMPLIB:build\temp.win32-3.5\Release\src\winrandom.cp35-win32.lib
Creating library build\temp.win32-3.5\Release\src\winrandom.cp35-win32.lib and object build\temp.win32-3.5\Release\src\winrandom.cp35-win32.exp
Generating code
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1158

----------------------------------------
Command ""c:\program files (x86)\python35-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-build-mhsnv81k\\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\Toshiba\AppData\Local\Temp\pip-6kcmw4p5-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Toshiba\AppData\Local\Temp\pip-build-mhsnv81k\pycrypto\
""
"ERROR: broadlink installation error"
Drücken Sie eine beliebige Taste . . .


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 »

@peterredl

Download pycrypto-2.6.1-cp35-none-win32.whl from dropbox and install it manually
open cmd with admin right
go to the folder where pycrypto-2.6.1-cp35-none-win32.whl is located and type:
pip install pycrypto-2.6.1-cp35-none-win32.whl
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 »

@Kruu

do you have selected the right device type ??
Capture.JPG
Capture.JPG (34.09 KiB) Viewed 3896 times
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests