Broadlink plugin - test version

Questions and comments specific to a particular plugin should go here.
User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Broadlink plugin - test version

Post by Medy » Fri Oct 16, 2020 3:44 pm

Broadlink plugin - test version

Since IFTTT decided it is time to not be free anymore...
And I now even was gently reminded(pay or GTFO) via Email that they will "archive" my applets next month...


I created this first "test version"
which lets you control the > Broadlink RM Pro Plus and Broadlink Rm 3 mini <
for sending IR & RF SIGNALS.

Amazon.de: https://www.amazon.de/Lichtschalter-Fun ... 166&sr=8-7
Amazon.com : https://www.amazon.com/BroadLink-Automa ... 789&sr=8-3

Install steps with pictures : https://imgur.com/a/9XnySxE

Setup
1. Setup the device via the offical broadlink app , just make
sure it is added to you network ... (or use the Setup Device Plugin Action - follow the instructions )

1.1 Unlock Device - After setting up the device via the offical app .. there is a setting in the latest broadlink
app for unlocking the device. You must do this .. alternatively do the manual setup instead.... so your device never gets locked ;)


2. Install the the plugin via the .egplugin file - from my google drive (bottom of each of my posts)

3. Add plugin to eventghost (it will autodiscover your device (only 1 device is supported atm))
(it should print your device name to the console ... looking good so far)

4. Learn IR or RF Signals via the Plugin Actions.
(Note : Adding a action will start the learning process immediatly. - Follow the instruction that are printed to the console (Its a bit wierd I know ... will change that later ))

if it worked .. "command added" will be printed to the console ... then you can select
the command in Send IR or RF actions" ...

5. Send IR or Rf Signals via the plugin Actions.
(there will be a dropdown you can select the command... press apply ... or test to see if the magic happens :D)

´
Test version
You cannot name the commands you learned for now ... Numbers will be assigend to learned commands ...
So If you learn your first command ... it will show up as "0" ...
Tipp : You can rename plugin actions ...
Attempting to adding a Send Action before you have recorded anything will throw error for now ...

Supported Devices
> RM Pro Plus (0x27a9) (old firmware - tested)
> RM 3 Mini (0x5f36) (latest firmware - v44057 - tested )

TESTERS & CREDITS
Thanks to member @Roma & Semicolon & Kgschlosser
for testing/feedback. Also Thx to felipediel from the
python broadlink library team.

FEEDBACK NEEDED
Please leave a comment with your device Model and Dev-Type
if stuff works or not ... so I can create a list of confirmed devices ...

IF you can test other devices ... or want me to test it / send me the device ... let me know ... ty
THere might be couple more projects that I spawn because of this IFTTT situation ... stay tuned

UPCOMING RELASE
7.11.2020 : Close to a relase version now
- multidevice support & some small changes

#GoodbyeIFTTT
Last edited by Medy on Sat Nov 07, 2020 11:04 pm, edited 15 times in total.

kalinkamaen
Experienced User
Posts: 142
Joined: Wed Dec 26, 2012 9:23 am

Re: Broadlink plugin - test version

Post by kalinkamaen » Sat Oct 17, 2020 11:13 am

I am using the old eventghost. Will it work with eventghost 0.4 R1722?

User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Broadlink plugin - test version

Post by Medy » Sat Oct 17, 2020 11:14 am

kalinkamaen wrote:
Sat Oct 17, 2020 11:13 am
I am using the old eventghost. Will it work with eventghost 0.4 R1722?
I think so.

chipd33
Posts: 8
Joined: Fri Oct 16, 2020 10:04 pm

Re: Broadlink plugin - test version

Post by chipd33 » Sun Oct 18, 2020 7:12 pm

Great job Medy,
I currently use the RM plugin for Tasker but am happy to see you working on this.
I have also been getting bombarded by those recent emails from IFTTT and am just relieved I didn't actually use them as my method for home automation.
All the best.
Chip

User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Broadlink plugin - test version

Post by Medy » Sun Oct 18, 2020 7:31 pm

chipd33 wrote:
Sun Oct 18, 2020 7:12 pm
Great job Medy,
I currently use the RM plugin for Tasker but am happy to see you working on this.
I have also been getting bombarded by those recent emails from IFTTT and am just relieved I didn't actually use them as my method for home automation.
All the best.
Chip
Okay ... cool ... I was using tasker for a long time ... but eventually moved everything to eventghost ;) ...
The only downside is that its still running on python 2.7 ... so newer libraries are likely incompatible ....


im still waiting to get some feedback ... if stuff works ...
Then I can make improvements ...

chipd33
Posts: 8
Joined: Fri Oct 16, 2020 10:04 pm

Re: Broadlink plugin - test version

Post by chipd33 » Sun Oct 18, 2020 8:38 pm

Hi Medy ,
that is interesting, I hadn't thought about that. 2.7 was sunset on Jan 1 ,2020.
It is just a never ending job to keep software contemporary. At least your work will work with EG but it is a shame if newer libraries won't work.
I will let you know if I find any issues if I use EG to run RF devices now that your plugin has made that possible.
Chip

*Roma*
Posts: 23
Joined: Thu Mar 13, 2008 5:13 pm

Re: Broadlink plugin - test version

Post by *Roma* » Mon Oct 19, 2020 3:51 pm

Hi Medy,

I have RM mini 3.
I added the plugin to EG 0.5 and got the following error message:

Code: Select all

Searching for Broadlink Device in your Network... please wait
Exception in thread Thread-375:
Traceback (most recent call last):
  File "threading.pyc", line 801, in __bootstrap_inner
  File "threading.pyc", line 754, in run
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\__init__.py", line 205, in discoverDevices
    discovered = broadlink.discover(timeout=conTimeout)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 198, in discover
    device = gendevice(devtype, host, mac, name=name, is_locked=is_locked)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 112, in gendevice
    is_locked=is_locked,
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 728, in __init__
    device.__init__(self, *args, **kwargs)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 234, in __init__
    self.update_aes(key)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 238, in update_aes
    backend=default_backend())
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\__init__.py", line 15, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\openssl\__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\openssl\backend.py", line 16, in <module>
    from cryptography import utils, x509
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\x509\__init__.py", line 7, in <module>
    from cryptography.x509 import certificate_transparency
ImportError: cannot import name certificate_transparency
Do you know hot to fix this ?

Thanks
Roman

User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Broadlink plugin - test version

Post by Medy » Mon Oct 19, 2020 5:21 pm

*Roma* wrote:
Mon Oct 19, 2020 3:51 pm
Hi Medy,

I have RM mini 3.
I added the plugin to EG 0.5 and got the following error message:

Code: Select all

Searching for Broadlink Device in your Network... please wait
Exception in thread Thread-375:
Traceback (most recent call last):
  File "threading.pyc", line 801, in __bootstrap_inner
  File "threading.pyc", line 754, in run
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\__init__.py", line 205, in discoverDevices
    discovered = broadlink.discover(timeout=conTimeout)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 198, in discover
    device = gendevice(devtype, host, mac, name=name, is_locked=is_locked)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 112, in gendevice
    is_locked=is_locked,
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 728, in __init__
    device.__init__(self, *args, **kwargs)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 234, in __init__
    self.update_aes(key)
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 238, in update_aes
    backend=default_backend())
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\__init__.py", line 15, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\openssl\__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\openssl\backend.py", line 16, in <module>
    from cryptography import utils, x509
  File "E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography\x509\__init__.py", line 7, in <module>
    from cryptography.x509 import certificate_transparency
ImportError: cannot import name certificate_transparency
Do you know hot to fix this ?

Thanks
Roman
Greetings , thanks for testing.


I was able to reproduce and find the error.... ;)

You can either replace this folder "cryptography" you have here E:\PROGRAMS\EventGhost\plugins\Broadlink\cryptography
with this updated cryptography folder I uploaded here : https://drive.google.com/open?id=1y7Lib ... WJ-LWTO64W


Or you do a fresh install ... I uploaded a new version in my google drive ... called v0.1 ..

maybe remove the previous files just in case ... (Idk what happens to the previous files tbh ... :D running the new egplugin file to update might just work though)

Im thrilled to know if it works ... let me know

*Roma*
Posts: 23
Joined: Thu Mar 13, 2008 5:13 pm

Re: Broadlink plugin - test version

Post by *Roma* » Mon Oct 19, 2020 7:49 pm

I replace the folder "cryptography", but I get same error as before.
I tried the fresh install of v0.1 plugin, unfortunately I get same error as before.

Thanks
Roman

User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Broadlink plugin - test version

Post by Medy » Mon Oct 19, 2020 8:45 pm

did you restart eventghost ? im not getting that error on a fresh install....
will take a look again tommorrow

*Roma*
Posts: 23
Joined: Thu Mar 13, 2008 5:13 pm

Re: Broadlink plugin - test version

Post by *Roma* » Mon Oct 19, 2020 8:48 pm

Yes, I restarted the eventghost.

User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Broadlink plugin - test version

Post by Medy » Mon Oct 19, 2020 8:52 pm

*Roma* wrote:
Mon Oct 19, 2020 8:48 pm
Yes, I restarted the eventghost.
okay in your eventghost site.packes folder ... there is no other crypthography package right ?
if there is you need to delete it .

I think I previously made a folder in my gdrive instructing to copy things there ....
EventGhost\lib27\site-packages

delete cryptograhy from all places it could be located
-site packages
- C Drive\program data
- Program Files (x86)

and only use the egplugin file from now to install (so the only place it will be is C Drive\program data...)


i tried it with EG 0.5 rc6 and it works

Will take another look tommorrow gotta sleep now ;)
we will definetly get this sorted out ... I mean it works on my end ... and im using 0.5 too :D ...

*Roma*
Posts: 23
Joined: Thu Mar 13, 2008 5:13 pm

Re: Broadlink plugin - test version

Post by *Roma* » Mon Oct 19, 2020 9:14 pm

I have only one copy of crypthography package.

When I restart eventghost with enabled plugin - I get other error messages:

Code: Select all

C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py:13: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
  from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes

Code: Select all

      Exception in thread Thread-5:
      Traceback (most recent call last):
        File "threading.pyc", line 801, in __bootstrap_inner
        File "threading.pyc", line 754, in run
        File "C:\ProgramData\EventGhost\plugins\Broadlink\__init__.py", line 205, in discoverDevices
          discovered = broadlink.discover(timeout=conTimeout)
        File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 198, in discover
          device = gendevice(devtype, host, mac, name=name, is_locked=is_locked)
        File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 112, in gendevice
          is_locked=is_locked,
        File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 728, in __init__
          device.__init__(self, *args, **kwargs)
        File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 234, in __init__
          self.update_aes(key)
        File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 238, in update_aes
          backend=default_backend())
        File "C:\ProgramData\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\__init__.py", line 15, in default_backend
          from cryptography.hazmat.backends.openssl.backend import backend
        File "C:\ProgramData\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\openssl\__init__.py", line 7, in <module>
          from cryptography.hazmat.backends.openssl.backend import backend
        File "C:\ProgramData\EventGhost\plugins\Broadlink\cryptography\hazmat\backends\openssl\backend.py", line 16, in <module>
          from cryptography import utils, x509
        File "C:\ProgramData\EventGhost\plugins\Broadlink\cryptography\x509\__init__.py", line 8, in <module>
          from cryptography.x509.base import (
        File "C:\ProgramData\EventGhost\plugins\Broadlink\cryptography\x509\base.py", line 23, in <module>
          from cryptography.x509.extensions import Extension, ExtensionType
        File "C:\ProgramData\EventGhost\plugins\Broadlink\cryptography\x509\extensions.py", line 10, in <module>
          import ipaddress
      ImportError: No module named ipaddress
      
Thanks
Roman

User avatar
Medy
Experienced User
Posts: 177
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Broadlink plugin - test version

Post by Medy » Tue Oct 20, 2020 6:41 am

ohh sheesh anothe package... included it ....
this is fixable too ... Its just another package you need to copy into the folder... hopefully there are not more ... thx for testing


I will upload it when im home if thats the case


... the first error is normal you can igonore it..
Last edited by Medy on Tue Oct 20, 2020 7:04 am, edited 1 time in total.

*Roma*
Posts: 23
Joined: Thu Mar 13, 2008 5:13 pm

Re: Broadlink plugin - test version

Post by *Roma* » Tue Oct 20, 2020 6:59 am

Ok, thanks.

Post Reply