Broadlink plugin - alpha version

Questions and comments specific to a particular plugin should go here.
*Roma*
Posts: 23
Joined: Thu Mar 13, 2008 5:13 pm

Re: Broadlink plugin - test version

Post by *Roma* » Sat Oct 31, 2020 7:22 pm

Medy wrote:
Sat Oct 31, 2020 7:13 pm
*Roma* wrote:
Sat Oct 31, 2020 6:30 pm

Edit : You coud also try to unplug and replug your broadlink device so it reboots.[/code]
Done - without success.

As I mentioned before - when I replace the plugin with the old one - it's finds the device.

Idk man ... I just tested this with a fresh system ... works like a charm ... except it gave me the error with no module named cifi_backend. which we already moved in your case ... for me it works.... on 2 different pcs


The only thing that comes to mind being different on your end ... is you not having python installed separately like I do ...

But that doesnt make sense to me atm ... so I would need more testers now...
I can run the plugin with debug prints, so you can see what is the problem.
Can you prepare such plugin?

george tirebuyer
Experienced User
Posts: 60
Joined: Sun Apr 28, 2013 12:25 pm

Re: Broadlink plugin - test version

Post by george tirebuyer » Sat Oct 31, 2020 7:45 pm

I tried the plugin on a different win 10 box and it finds the RM3 just fine. Same error though. I can get it to send IR but the learning doesn't seem quite right. Is there a way of pasting a known pronto hex code?

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

Re: Broadlink plugin - test version

Post by Medy » Sat Oct 31, 2020 7:58 pm

george tirebuyer wrote:
Sat Oct 31, 2020 7:45 pm
I tried the plugin on a different win 10 box and it finds the RM3 just fine. Same error though. I can get it to send IR but the learning doesn't seem quite right. Is there a way of pasting a known pronto hex code?

So you can learn and send and it works ?


Yes atm its abit strange that the learning starts right away when adding the learn action ...
its just that way for testing atm ... it saved me pressing the same button while development...


Atm you could just go into the the .json file for and copy codes in there yourself

You can find it here C:\Users\(your username)\AppData\Roaming\EventGhost\plugins\Broadlink

you can modify the ir.json to add your commands if you keep the correct hex format

as of now .. im still printing the learned bytes to the console .. so you could also easily copy paste it into a hex converter and then into the json file

george tirebuyer
Experienced User
Posts: 60
Joined: Sun Apr 28, 2013 12:25 pm

Re: Broadlink plugin - test version

Post by george tirebuyer » Sat Oct 31, 2020 8:15 pm

I am definitely sending IR. Is it supposed to learn by pointing the original IR remote at the RM3 or by selecting a button in the phone app. The original remote doesn't learn any thing. The phone app generates some code but the send IR doesn't perform the learned function. Just generates some IR.

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

Re: Broadlink plugin - test version

Post by Medy » Sat Oct 31, 2020 8:16 pm

*Roma* wrote:
Sat Oct 31, 2020 7:22 pm
Medy wrote:
Sat Oct 31, 2020 7:13 pm
*Roma* wrote:
Sat Oct 31, 2020 6:30 pm

Edit : You coud also try to unplug and replug your broadlink device so it reboots.[/code]
Done - without success.

As I mentioned before - when I replace the plugin with the old one - it's finds the device.

Idk man ... I just tested this with a fresh system ... works like a charm ... except it gave me the error with no module named cifi_backend. which we already moved in your case ... for me it works.... on 2 different pcs


The only thing that comes to mind being different on your end ... is you not having python installed separately like I do ...

But that doesnt make sense to me atm ... so I would need more testers now...
I can run the plugin with debug prints, so you can see what is the problem.
Can you prepare such plugin?

Maybe you could try another fully fresh install of event ghost like I did ...
There are no errors happening on your end ... so I really dont know why your device doesnt show up ...




Step by step installation : https://imgur.com/a/9XnySxE

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

Re: Broadlink plugin - test version

Post by Medy » Sat Oct 31, 2020 8:18 pm

george tirebuyer wrote:
Sat Oct 31, 2020 8:15 pm
I am definitely sending IR. Is it supposed to learn by pointing the original IR remote at the RM3 or by selecting a button in the phone app. The original remote doesn't learn any thing. The phone app generates some code but the send IR doesn't perform the learned function. Just generates some IR.

Please have a look at this https://imgur.com/a/9XnySxE

You dont need the phone app to learn. You point your remote at the rm mini yes ...
if its in learnign mode the white led on the rm mini should be on ...

You start the learning by adding the "Learn Ir" Action in eventghost. (But before that it must have already found your device)
Can you confirm it found your device ?


When you add the Learn Ir Plugin action .. it will start printing that you should "Send your Ir Signal now "
... then you send your signal ... and it should print that it recorded your signal ....

... if all that worked ... you can add the Send Ir plugin action and select and send your recorded command

let me know to which point you got ...
1. Did your device get printed like shown in the pictures (Model : rm min 3 ( THIS IS IMPORTANT
2. were you able to see the "Send your Ir Signal now " print
3. Was the command learned ?

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

Re: Broadlink plugin - test version

Post by *Roma* » Sat Oct 31, 2020 9:15 pm

Ok, found the problem, please add the following code to the scan function:

Code: Select all

    if local_ip_address is None:
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.connect(('8.8.8.8', 53))  # connecting to a UDP address doesn't send packets
        local_ip_address = s.getsockname()[0]
This code is from the old plugin you posted.

The modified plugin:
__init__.py
(50.88 KiB) Downloaded 15 times
Now the device is found:

Code: Select all

Model : RM mini 3
Device Network Adress : ('192.168.50.205', 80)
Dev-Type : 0x5f36
Locked :False
Broadlink.Discovery.Completed

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

Re: Broadlink plugin - test version

Post by *Roma* » Sat Oct 31, 2020 9:21 pm

Learning and Sending IR commands works! :) Thanks!

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

Re: Broadlink plugin - test version

Post by Medy » Sat Oct 31, 2020 9:37 pm

*Roma* wrote:
Sat Oct 31, 2020 9:15 pm
Ok, found the problem, please add the following code to the scan function:

Code: Select all

    if local_ip_address is None:
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.connect(('8.8.8.8', 53))  # connecting to a UDP address doesn't send packets
        local_ip_address = s.getsockname()[0]
This code is from the old plugin you posted.

The modified plugin: __init__.py

Now the device is found:

Code: Select all

Model : RM mini 3
Device Network Adress : ('192.168.50.205', 80)
Dev-Type : 0x5f36
Locked :False
Broadlink.Discovery.Completed
Great that you found this .... I moved a bunch of code over ... so I guess there was a possibility for something going wrong there ... though since its working on my end perfectly .... I discarded that thought ... and thought smth else may be wrong on your end ...

Sry for that ...
Also im not familiar with the debug stuff you mentioned ... smth I need to look into in the future

also I need to look this fix over .. I remember changing smth on those lines ... but I already forgot what it was about.....intersting to see ... but not today ... im sleepy now xD

Does the learning and the rest work now ? That would be great .. Im kinda tired of working with this library :D ... So many tripwires
Last edited by Medy on Sat Oct 31, 2020 9:49 pm, edited 1 time in total.

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

Re: Broadlink plugin - test version

Post by Medy » Sat Oct 31, 2020 9:46 pm

*Roma* wrote:
Sat Oct 31, 2020 9:21 pm
Learning and Sending IR commands works! :) Thanks!
OHHH ... thats great to hear ... Thanks for all the feeback and patience .. I added a Credit Section to the first post :D

george tirebuyer
Experienced User
Posts: 60
Joined: Sun Apr 28, 2013 12:25 pm

Re: Broadlink plugin - test version

Post by george tirebuyer » Sun Nov 01, 2020 5:20 pm

After much trial and lots of errors I was able to learn and transmit IR. I have the new Red bean RM3 mini. It is extremely hit or miss in the learning IR mode. I tried using the phone app and nearly gave up and I my still have a defective unit. I finally got it to learn a button using the phone app. I tried again using the plug in and I got it to learn and correctly transmit IR. Is there a trick to pointing the remote in learn mode or is my Red Bean nearly blind?

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

Re: Broadlink plugin - test version

Post by Medy » Sun Nov 01, 2020 8:07 pm

george tirebuyer wrote:
Sun Nov 01, 2020 5:20 pm
After much trial and lots of errors I was able to learn and transmit IR. I have the new Red bean RM3 mini. It is extremely hit or miss in the learning IR mode. I tried using the phone app and nearly gave up and I my still have a defective unit. I finally got it to learn a button using the phone app. I tried again using the plug in and I got it to learn and correctly transmit IR. Is there a trick to pointing the remote in learn mode or is my Red Bean nearly blind?

There are a couple of improvements in the upcoming release ... though not really related to recording IR Signals ...

For me recording is smooth ... and I only have to point the ir roughly in the direction of the rm 3 mini ....

There might be some more hidden bits in the code that have a impact ... and its hard for me to trace what it is ... since im hopping between python versions ... as someone who doesn't know the differences of those versions yet xD .....

Cant guarantee its stable for everyone and every device type .... but for everyone that succecfully got stuff working or not so good working
I would apriciate if you leave a comment with your
Model and Dev: type

So I can add this to the first post and maybe adress those issues down the line...

If you dev-type is mentioned in the tested list ... then its pretty much-guarenteed stuff works

george tirebuyer
Experienced User
Posts: 60
Joined: Sun Apr 28, 2013 12:25 pm

Re: Broadlink plugin - test version

Post by george tirebuyer » Mon Nov 02, 2020 3:10 pm

Thanks for getting this to work. Learning is definitely defective in my unit. Is there a way to use discrete codes downloaded from various sources?

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

Re: Broadlink plugin - test version

Post by Medy » Mon Nov 02, 2020 4:09 pm

george tirebuyer wrote:
Mon Nov 02, 2020 3:10 pm
Thanks for getting this to work. Learning is definitely defective in my unit. Is there a way to use discrete codes downloaded from various sources?
does your device get discovered ?
Does it print your device name ?

george tirebuyer
Experienced User
Posts: 60
Joined: Sun Apr 28, 2013 12:25 pm

Re: Broadlink plugin - test version

Post by george tirebuyer » Mon Nov 02, 2020 5:45 pm

Yes it gets recognized as RM3. I'm certain the receive ir is messed up in my rm3 since it is extremely flaky in detecting IR in the learning mode in the phone app too. Also discrete codes are available on line for most devices and I've been using them with USB-UIRT. They can't be learned since they aren't in the consumer remote that comes with the receiver. I'm hoping to get the RM3 to be a WIFI equivalent. I tried pasting codes from the USBUIRT plugin but no good. I'm wondering if there is some conversion taking place some where.

Post Reply