Python Plugin : Broadlink RM2 V4

Python and python framework

Moderator: leecollings

leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

zak45 wrote: Friday 09 February 2018 19:51 @leandrosaltori
you need python 3.5.4 x86 installed for all users & include in the path
show me output of this command :
pip --version
I installed the version you told me:
"python 3.5.4 x86" by the link: https://www.python.org/downloads/release/python-354/. I downloaded and installed the file: "Windows x86 executable installer".
I do not know where to give the pip --version command to see the version.
Would it be in Windows CMD?
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 »

leandrosaltori wrote: Wednesday 14 February 2018 14:09
zak45 wrote: Friday 09 February 2018 19:51 @leandrosaltori
you need python 3.5.4 x86 installed for all users & include in the path
show me output of this command :
pip --version
I installed the version you told me:
"python 3.5.4 x86" by the link: https://www.python.org/downloads/release/python-354/. I downloaded and installed the file: "Windows x86 executable installer".
I do not know where to give the pip --version command to see the version.
Would it be in Windows CMD?
Yep
leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

zak45 wrote: Wednesday 14 February 2018 15:06
leandrosaltori wrote: Wednesday 14 February 2018 14:09
zak45 wrote: Friday 09 February 2018 19:51 @leandrosaltori
you need python 3.5.4 x86 installed for all users & include in the path
show me output of this command :
pip --version
I installed the version you told me:
"python 3.5.4 x86" by the link: https://www.python.org/downloads/release/python-354/. I downloaded and installed the file: "Windows x86 executable installer".
I do not know where to give the pip --version command to see the version.
Would it be in Windows CMD?
Yep
In the CMD it displays the following error:

'pip' is not recognized as an internal or external command, an operable program or a batch file.Image
Attachments
cmd
cmd
CMD.png (20.31 KiB) Viewed 3978 times
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 »

So... in 3.5.4 should be included.. do you have follow all recommendations ( include in path.. all users ...) ?
Google is your friend.:)
leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

zak45 wrote: Wednesday 14 February 2018 18:29 So... in 3.5.4 should be included.. do you have follow all recommendations ( include in path.. all users ...) ?
Google is your friend.:)
I really do not know where I'm going wrong : /,
I followed the instructions.
Here are some photos of the installation and modification of the installation:
Attachments
Phyton.png
Phyton.png (77.49 KiB) Viewed 3962 times
Phyton1.png
Phyton1.png (76.35 KiB) Viewed 3963 times
User avatar
Phantom
Posts: 87
Joined: Saturday 31 December 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11652
Location: The Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Phantom »

Maybe mark the option "Add python 3.5 to path" this will do that you can run python from any location without going to that folder first.
leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

Phantom wrote: Wednesday 14 February 2018 19:26 Maybe mark the option "Add python 3.5 to path" this will do that you can run python from any location without going to that folder first.
Good!!! Now it was okay to execute the "pip version" command by the CMD.
Look at the version:
Attachments
Pip Version.png
Pip Version.png (10.73 KiB) Viewed 3955 times
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 »

leandrosaltori wrote: Wednesday 14 February 2018 20:01 Good!!! Now it was okay to execute the "pip version" command by the CMD.
Great.. now execute setup.exe.
leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

Here is the error screen when running "setup.exe" (broadlink):


"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
Downloading broadlink-0.6.tar.gz
Collecting pycrypto==2.6.1 (from broadlink)
Downloading pycrypto-2.6.1.tar.gz (446kB)
100% |################################| 450kB 124kB/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\\ANDR-~2\\AppData\\Local\\Temp\\pip-build-hqra35mc\\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\ANDR-~2\AppData\Local\Temp\pip-prx4e_a1-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
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visu ... uild-tools

----------------------------------------
Command ""c:\program files (x86)\python35-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\ANDR-~2\\AppData\\Local\\Temp\\pip-build-hqra35mc\\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\ANDR-~2\AppData\Local\Temp\pip-prx4e_a1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ANDR-~2\AppData\Local\Temp\pip-build-hqra35mc\pycrypto\
""
"ERROR: broadlink installation error"
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 »

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
leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

zak45 wrote: Wednesday 14 February 2018 20:16 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
Show, you're the best! I made the installation of this file by CMD and now it works.
BROADLINK has appeared.
Now it's gettin to set up Broadlink with Domoticz.
Thank you very much for your attention !!
Attachments
PYCRYPTO.png
PYCRYPTO.png (6.29 KiB) Viewed 3944 times
Broadlink.png
Broadlink.png (37.66 KiB) Viewed 3944 times
leandrosaltori
Posts: 23
Joined: Tuesday 06 February 2018 20:04
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by leandrosaltori »

Good morning people,
Thanks and help from you and @ zak45, I was finally able to install Domoticz.

First impressions with Domoticz:

I already started to play and install some items that I have, I do not know if I'm not sure how to configure it or if it's normal, but I've already been disappointed with some things:

- I installed and SC1 of the broadlink in domoticz, it is sensational the speed that it responds to the commands through the web interface domotiz, however I noticed that when the equipment is activated by WEB, it changes the STATUS ON / OFF in the APP's e-Contrl and IHC. But, if I trigger it by APP, or by the physical button of the equipment, it does not change STATUS to ON on the WEB interface.
That is, you risk to turn on or off an equipment that is already connected or vice versa.
So it happened with Air Conditioner, Climatizador TV and other equipment that I own by the house. If I issue the command by the APP, I will never know if it is connected or not by the WEB: /. Is there any way to fix it?

- I have not been able to do the smarthub hub Broadlink (Broadlink Alarm Kit - new model).
  I'll test more.
- Also I have not been able to use RF433 in domoticz yet, I will still give a researched on this subject.
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 »

leandrosaltori wrote: Thursday 15 February 2018 13:17 I already started to play and install some items that I have, I do not know if I'm not sure how to configure it or if it's normal, but I've already been disappointed with some things:

- I installed and SC1 of the broadlink in domoticz, it is sensational the speed that it responds to the commands through the web interface domotiz,
https://github.com/mjg59/python-broadlink/issues/142
lplugo
Posts: 14
Joined: Sunday 11 February 2018 13:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by lplugo »

lplugo wrote: Wednesday 14 February 2018 12:47
lplugo wrote: Monday 12 February 2018 15:41
lplugo wrote: Sunday 11 February 2018 20:55

I found an xml on https://pypi.python.org/pypi/broadlink ( https://pypi.python.org/pypi?:action=do ... ersion=0.6)
and put into the Pi/domoticz/plugins/BroadlinkRM2 folder but the error message is same. :(
So no idea :cry:
I installed it on another Pi but the problem is the same. No Broadlink device in Hardware list.
Well I passed one problem so it's in my HW list but get an error below:

2018-02-17 15:48:40.264 (br2) Started.
2018-02-17 15:48:40.536 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/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-17 15:48:40.536 Error: (br2) Module Import failed, exception: 'ImportError'
2018-02-17 15:48:40.536 Error: (br2) Module Import failed: ' Name: broadlink'
2018-02-17 15:48:40.536 Error: (br2) Error Line details not available.
2018-02-17 15:49:30.288 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:00.318 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:00.318 Error: br2 hardware (3) thread seems to have ended unexpectedly
2018-02-17 15:50:30.324 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:30.324 Error: br2 hardware (3) thread seems to have ended unexpectedly
lplugo
Posts: 14
Joined: Sunday 11 February 2018 13:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by lplugo »

lplugo wrote: Saturday 17 February 2018 15:51
lplugo wrote: Wednesday 14 February 2018 12:47
lplugo wrote: Monday 12 February 2018 15:41

So no idea :cry:
I installed it on another Pi but the problem is the same. No Broadlink device in Hardware list.
Well I passed one problem so it's in my HW list but get an error below:

2018-02-17 15:48:40.264 (br2) Started.
2018-02-17 15:48:40.536 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/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-17 15:48:40.536 Error: (br2) Module Import failed, exception: 'ImportError'
2018-02-17 15:48:40.536 Error: (br2) Module Import failed: ' Name: broadlink'
2018-02-17 15:48:40.536 Error: (br2) Error Line details not available.
2018-02-17 15:49:30.288 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:00.318 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:00.318 Error: br2 hardware (3) thread seems to have ended unexpectedly
2018-02-17 15:50:30.324 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:30.324 Error: br2 hardware (3) thread seems to have ended unexpectedly
Ok!
I solved it by copy to usr/lib/python3.5/plat-arm-linux-gnueabihf.
But have a new error:
2018-02-17 19:06:42.089 Error: (disc) 'onCommand' failed 'AttributeError':'module 'broadlink' has no attribute 'discover''.
2018-02-17 19:06:42.089 Error: (disc) ----> Line 278 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-02-17 19:06:42.089 Error: (disc) ----> Line 568 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function Discover

Error Connecting to Broadlink device....192.1xxxxxxxxxx

and

ini file not found: inibroadl:/BroadlinkRM2/BroadlinkRM2-3-254.ini
lplugo
Posts: 14
Joined: Sunday 11 February 2018 13:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by lplugo »

lplugo wrote: Saturday 17 February 2018 19:09
lplugo wrote: Saturday 17 February 2018 15:51
lplugo wrote: Wednesday 14 February 2018 12:47

I installed it on another Pi but the problem is the same. No Broadlink device in Hardware list.
Well I passed one problem so it's in my HW list but get an error below:

2018-02-17 15:48:40.264 (br2) Started.
2018-02-17 15:48:40.536 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/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-17 15:48:40.536 Error: (br2) Module Import failed, exception: 'ImportError'
2018-02-17 15:48:40.536 Error: (br2) Module Import failed: ' Name: broadlink'
2018-02-17 15:48:40.536 Error: (br2) Error Line details not available.
2018-02-17 15:49:30.288 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:00.318 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:00.318 Error: br2 hardware (3) thread seems to have ended unexpectedly
2018-02-17 15:50:30.324 Error: br hardware (2) thread seems to have ended unexpectedly
2018-02-17 15:50:30.324 Error: br2 hardware (3) thread seems to have ended unexpectedly
Ok!
I solved it by copy to usr/lib/python3.5/plat-arm-linux-gnueabihf.
But have a new error:
2018-02-17 19:06:42.089 Error: (disc) 'onCommand' failed 'AttributeError':'module 'broadlink' has no attribute 'discover''.
2018-02-17 19:06:42.089 Error: (disc) ----> Line 278 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-02-17 19:06:42.089 Error: (disc) ----> Line 568 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function Discover

Error Connecting to Broadlink device....192.1xxxxxxxxxx

and

ini file not found: inibroadl:/BroadlinkRM2/BroadlinkRM2-3-254.ini
Any idea how to connect to the Broadlink RM+ device?
mxg10011
Posts: 5
Joined: Monday 19 February 2018 23:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by mxg10011 »

Hey guys,

I am running Domoticz on my RP3 and added the Broadlink plugin to control my IR devices with the RM2.
For my bedroom light I added one switch with the ON command and one switch with the OFF command.
Both work! But I am not so happy with this solution... Both commands only works for switching "ON".
I really would like to have only one Switch to switch my light.

So I tried to figure out how to implement that but couldn't really find out...

Is it possible to define a virtual switch and use "On action" to send the "ON" command and "Off action" to send the "OFF" command of my light?
If yes, i need two scripts right? But what needs to be the content of the script? Which function do I have to call and which parameters have to be filled?

Can you give me some help? I am really struggling with it :?
yoshida
Posts: 4
Joined: Wednesday 21 February 2018 10:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by yoshida »

Hi,

I have followed the wiki page, and done a new v4 install:

After I add the new hardware "Broadlink RM2 with Kodi Remote", domotich crashes. Either it shows empty devices, empty hardwares, or goes to "offline" state. As this, I can't see the log, can't see what is wrong. Only way I can get the normal operation, is to stop domoticz, move the BroadlinkRM2 out of domoticz plugin directory, and start domoticz.
Can you help, how can I find out what is the issue?

Setup:
Domoticz V3.8930
Raspbian Stretch with default python 2 & 3. (Python 3.5.3)
I had to change a bit the copy commands from 3.4 to 3.5 from the wiki:
pi@raspberrypi:~ $ sudo cp -r /usr/local/lib/python3.5/dist-packages/crypto/ /usr/lib/python3.5/
pi@raspberrypi:~ $ sudo cp -r /usr/local/lib/python3.5/dist-packages/broadlink /usr/lib/python3.5/

What folder should I enter to store the ini files? I have tried this: "/home/pi/domoticz/Config"

Thanks for any help
yoshi
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 »

mxg10011 wrote: Monday 19 February 2018 23:55 Is it possible to define a virtual switch and use "On action" to send the "ON" command and "Off action" to send the "OFF" command of my light?
If yes, i need two scripts right? But what needs to be the content of the script? Which function do I have to call and which parameters have to be filled?

Can you give me some help? I am really struggling with it :?
Plugin provide command line feature (put on debug mode to have full path/command)
you can define a virtual switch (dummy hardware) and put on the ON& OFF the command line to execute
something like that:
Capture.JPG
Capture.JPG (60.03 KiB) Viewed 3697 times
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 »

yoshida wrote: Wednesday 21 February 2018 10:44 Hi,

I have followed the wiki page, and done a new v4 install:

After I add the new hardware "Broadlink RM2 with Kodi Remote", domotich crashes. Either it shows empty devices, empty hardwares, or goes to "offline" state. As this, I can't see the log, can't see what is wrong. Only way I can get the normal operation, is to stop domoticz, move the BroadlinkRM2 out of domoticz plugin directory, and start domoticz.
Can you help, how can I find out what is the issue?

Setup:
Domoticz V3.8930
Raspbian Stretch with default python 2 & 3. (Python 3.5.3)
I had to change a bit the copy commands from 3.4 to 3.5 from the wiki:
pi@raspberrypi:~ $ sudo cp -r /usr/local/lib/python3.5/dist-packages/crypto/ /usr/lib/python3.5/
pi@raspberrypi:~ $ sudo cp -r /usr/local/lib/python3.5/dist-packages/broadlink /usr/lib/python3.5/

What folder should I enter to store the ini files? I have tried this: "/home/pi/domoticz/Config"

Thanks for any help
yoshi

Don't know if this could help, have seen lots of problem with plugin system, some have solved by installing 3.4. (just search on the forum)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest