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

Re: Broadlink plugin - test version

Post by Medy » Tue Oct 20, 2020 6:24 pm

*Roma* wrote:
Tue Oct 20, 2020 6:14 pm
After moving cffi_backend file - EG successfully detected the rm mini 3:

Code: Select all

Model : RM mini 3
Device Network Adress : ('192.168.50.205', 80)
Broadlink.Discovery.Completed
But when I try to learn IR code - I get this error:

Code: Select all

Exception in thread Thread-838:
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 369, in threaded_learning_ir
    selectedDevice[0].auth()
  File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 276, in auth
    check_error(response[0x22:0x24])
  File "C:\ProgramData\EventGhost\plugins\Broadlink\broadlink\exceptions.py", line 97, in check_error
    raise exception(error_code)
AuthenticationError: Authentication failed
Thanks
Roman
Ohh this is looking good then. At least all seems to be in place now and the program is running...

The authentication stuff should be the last hurdle ...
ON my device it doesnt happen ... but I read that it can happen on some devices...
https://github.com/mjg59/python-broadlink/issues/377

but this is fixable ... sadly you will need to stick to eventghost only in that case ...

It involves a few steps
1. reset the device
2. connect to the device
3. run setup()


I will implement this .... to make it painless... was going to anyway...

But as mentioned in the link you can try this
Factory reset the device.
Open Broadlink app and connect the device to your local network.
STOP. Do not finish the setup. Close the app.

then it might work

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

Re: Broadlink plugin - test version

Post by *Roma* » Tue Oct 20, 2020 6:32 pm

But as mentioned in the link you can try this
Factory reset the device.
Open Broadlink app and connect the device to your local network.
STOP. Do not finish the setup. Close the app.

then it might work
Ok, I will try.

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:36 pm

*Roma* wrote:
Tue Oct 20, 2020 6:32 pm
But as mentioned in the link you can try this
Factory reset the device.
Open Broadlink app and connect the device to your local network.
STOP. Do not finish the setup. Close the app.

then it might work
Ok, I will try.
Thanks for the testing ... if there are any further issues .. I may get myself a rm 3 mini for the challenge and definitely get things running for that device...

Already struggled long and hard to get this far getting things to run in eventghost wasnt that pleasant :D...
Definetnly wouldnt touch this kind of deprecated project again if it wasnt in my own interest xD....

But getting the rm 3 mini , rmpro plus and maybe the rm4 pro running would definetly make some ppl happy. And I would like that :D

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

Re: Broadlink plugin - test version

Post by *Roma* » Tue Oct 20, 2020 7:09 pm

After resetting and connecting to the local network - I stopped to get Authentication error.

Now when I try to learn IR code - I getting the following messages:

Code: Select all

IR_Learning Mode Started
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Discovery Ended
I sending the IR code but nothing happens.

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 7:49 pm

*Roma* wrote:
Tue Oct 20, 2020 7:09 pm
After resetting and connecting to the local network - I stopped to get Authentication error.

Now when I try to learn IR code - I getting the following messages:

Code: Select all

IR_Learning Mode Started
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Learn IR - Send your IR-Signal now
Discovery Ended
I sending the IR code but nothing happens.
hmm can you repeat the learning and make sure the app / phone is off ... just in case
I dont know how agressive this thing is ....

I would have assumed it works at this point ... since your device was found ... it is a good sign.

Can you see a LED turning on when the learning starts ?
And then turning off when discovery ends ?

if it does it means it is succefully authenticated and learning mode is working.
At that point data should be picked up

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

Re: Broadlink plugin - test version

Post by *Roma* » Tue Oct 20, 2020 7:57 pm

hmm can you repeat the learning and make sure the app / phone is off ... just in case
I dont know how agressive this thing is ....

I would have assumed it works at this point ... since your device was found ... it is a good sign.
I repeated when the phone was off - without success.
Can you see a LED turning on when the learning starts ?
And then turning off when discovery ends ?

if it does it means it is succefully authenticated and learning mode is working.
At that point data should be picked up
LED is off when the learning starts!

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 8:14 pm

I have one last thing we can try ... its just a wild guess though

If that doesnt work I need to order the thing and go in hard ....

1. replace that __init__py I attached with the __init__.py from
program data / plugins / broadlink / broadlink/ __init__.py
(its the broadlink folder inside the broadlink folder)

make a backup of that file and put it back if it didnt work ....


Basicly it just a extended compatibilty list from the latest release .... might not do anything ...
Attachments
__init__.py
(40.55 KiB) Downloaded 7 times

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

Re: Broadlink plugin - test version

Post by *Roma* » Wed Oct 21, 2020 4:48 am

With the attached file - I get the following error message:

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 "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 204, in discover
          device = gendevice(devtype, host, mac, name=name, is_locked=is_locked)
        File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 106, in gendevice
          dev_class, model, manufacturer = get_devices()[dev_type]
        File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 48, in get_devices
          0x648b: (sp4m, "SP4M-US", "Broadlink"),
      NameError: global name 'sp4m' is not defined

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 » Wed Oct 21, 2020 6:09 am

*Roma* wrote:
Wed Oct 21, 2020 4:48 am
With the attached file - I get the following error message:

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 "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 204, in discover
          device = gendevice(devtype, host, mac, name=name, is_locked=is_locked)
        File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 106, in gendevice
          dev_class, model, manufacturer = get_devices()[dev_type]
        File "E:\PROGRAMS\EventGhost\plugins\Broadlink\broadlink\__init__.py", line 48, in get_devices
          0x648b: (sp4m, "SP4M-US", "Broadlink"),
      NameError: global name 'sp4m' is not defined
Ok never mind ... cant do more at his point ... sadly ... Dont know what it is exactly that is not working ... I would just have to guess .. have to go deep ...

Will try add Manual setup Today .... maybe this fixes things ....but idk really ...
(Just ordered the thing from amazon ... if it doesnt work I can send it back if need be xD)

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

Re: Broadlink plugin - test version

Post by *Roma* » Wed Oct 21, 2020 1:42 pm

Will try add Manual setup Today .... maybe this fixes things ....but idk really ...
(Just ordered the thing from amazon ... if it doesnt work I can send it back if need be xD)
Good :)

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 » Wed Oct 21, 2020 3:30 pm

*Roma* wrote:
Wed Oct 21, 2020 1:42 pm
Will try add Manual setup Today .... maybe this fixes things ....but idk really ...
(Just ordered the thing from amazon ... if it doesnt work I can send it back if need be xD)
Good :)
Scheduled to arrive Saturday.... so slow @amazon.. will let you know If get it running ....
Thanks again for your patience and feedback with this...

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 24, 2020 11:29 am

*Roma* wrote:
Wed Oct 21, 2020 1:42 pm
Good :)

Greetings ,

Got the device ... aaaaannnnd ... it looks like its going to work.

There are rm minis 3 out there with older and a newer firmware...
So may add smth that detects what version you have ...basicly my own "Compatibilty Check"
into the code of tested/confirmed devices.

Maybe I can migrate to the latest library version which addresses a lot of these compatibility issues ...
Edit : Cant migrate to the latest version easily ... its fully going for python 3 and dropping 2.7 ...
which means I would need to rewrite lots of code / the whole thing almost probably ...
...


In any case ... I already got the device successfully into learning mode(LED TURNS ON) ... by only making a few adjustments ...

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

Re: Broadlink plugin - test version

Post by *Roma* » Sat Oct 24, 2020 1:36 pm

When the plugin will be ready - I will happy to test :)

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 24, 2020 7:49 pm

*Roma* wrote:
Sat Oct 24, 2020 1:36 pm
When the plugin will be ready - I will happy to test :)
Well its looking not good :D...
There is a issue with authorisation .. that keeps blocking the device ....
figuring this out myself ... would take ages ... so I opened an issue ...

Thats all I can do ....

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 25, 2020 11:09 am

*Roma* wrote:
Sat Oct 24, 2020 1:36 pm
When the plugin will be ready - I will happy to test :)
But I may be able to reslove this if I get help ... its just .. the library , functionlity is not documentent ...
May just take a while ...

I have to literally wild guess or hope someone had the same issue before :D .... which then got explained by a devloper

Post Reply