Broadlink plugin - alpha version

Questions and comments specific to a particular plugin should go here.
User avatar
Sem;colon
Plugin Developer
Posts: 813
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Broadlink plugin - alpha version

Post by Sem;colon » Sun Jan 17, 2021 1:08 pm

Wow, so fast, awesome! :o
Thanks a lot, I need to try it! :)

As for the dev environment.. yeah, that can be a little annoying.. but to be fair, if you program something in a compiler language, you also need to compile and run it to perform tests, so it's pretty much the same steps. Main difference here is that you have to switch between your IDE and EventGhost instead of doing the debugging from the IDE directly. IDK, never was a big issue for me ^^° anyways, what I heavily do for debugging is using the EventGhost built in Python shell, that way you can find the issue or test changes much faster than restarting EG all the time ;)
If you like my work, Image me a drink :wink:

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

Re: Broadlink plugin - alpha version

Post by Medy » Sun Jan 17, 2021 2:05 pm

Sem;colon wrote:
Sun Jan 17, 2021 1:08 pm
Wow, so fast, awesome! :o
Thanks a lot, I need to try it! :)

As for the dev environment.. yeah, that can be a little annoying.. but to be fair, if you program something in a compiler language, you also need to compile and run it to perform tests, so it's pretty much the same steps. Main difference here is that you have to switch between your IDE and EventGhost instead of doing the debugging from the IDE directly. IDK, never was a big issue for me ^^° anyways, what I heavily do for debugging is using the EventGhost built in Python shell, that way you can find the issue or test changes much faster than restarting EG all the time ;)
mhh nice tip with the python shell ... though im not sure how you are using the shell to make things easier.
WHat convenience does it bring you ?


I could mayybe imagine copy paste function code into the shell and run it there ?


WHat happens to me is usually there is a a tiny thing missing ... you know how it is ... stuff never works on first try :D.....
then I need to make the change restart eventghost ... for every change I make ... just because I missed a comma or smth ... its ridiculus

since eventghost seems to need a restart to recognize the changed code in the init.py

This usually is not that big of an issue when I write the whole stuff outside of eventghost first without any plugin reference ... so I can test it in the ide.... but for small changes ... this is very annoying ... idk

User avatar
Sem;colon
Plugin Developer
Posts: 813
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Broadlink plugin - alpha version

Post by Sem;colon » Mon Jan 18, 2021 6:25 pm

Well, it's a very quick and dirty implementation ^^
It's still not possible to delete or rename IR codes, right?
Medy wrote:
Sun Jan 17, 2021 2:05 pm
I could mayybe imagine copy paste function code into the shell and run it there ?
Pretty much :D
And "explore" objects and their current values without the need to print debugging information.

But yeah, that doesn't work for syntax errors..
As far as I know EG 0.5 complies plugins on startup AND when you open the "add plugin" dialog. So you might be able to debug syntax errors just by opening that dialog..
If you like my work, Image me a drink :wink:

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

Re: Broadlink plugin - alpha version

Post by Medy » Tue Jan 19, 2021 9:56 am

Sem;colon wrote:
Mon Jan 18, 2021 6:25 pm
Well, it's a very quick and dirty implementation ^^
It's still not possible to delete or rename IR codes, right?

Ill add a rename / delete action later :D ...
can do this without changing the format ... so an update will not break things when it comes .

So you should be able to start using this without worry

you could rename the existing ones for now in the ir.json file yourself by replacing "command:"0" with command : "mycommand" for example "

User avatar
Sem;colon
Plugin Developer
Posts: 813
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Broadlink plugin - alpha version

Post by Sem;colon » Thu Jan 21, 2021 6:25 pm

Hi Medy,
Thank you, I thought so, but it's good to have the confirmation :D

After learning some more codes I now came to a point where something is not working.
I'm not sure if you can do anything about it with the Lib you are using, or if it's a hardware limitation.

I have a device here, it's a BD player from Phillips.
For each 2nd button you press on the remote, the remote sends an alternative code. The BD player itself doesn't accept two times the same code in a row, it wants the alternative code every 2nd time.

When I learn an IR code with the broadlink, it's writing the code instantly after the button is pressed the first time, so at that point it can't know that there is another alternative code for the same action and well, it's also not working with my BD player for that reason :(

(That alternative code can surely be calculated from the original code somehow)

LIRC can handle the behaviour..

I don't know, but maybe there's a option for that in the Lib?
If you like my work, Image me a drink :wink:

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

Re: Broadlink plugin - alpha version

Post by Medy » Fri Jan 22, 2021 10:52 am

IF there is a different pattern . I could probably create a alternative learning mode to pick up the alternative signal.
Since you said it is a different one every second button press


Or you somehow trick the setup by starting it when you are able to send the 2nd command ?

there is a test tool out there ... I think its called broadlink manager or smth. With it you could maybe test what gets recorded.

User avatar
Sem;colon
Plugin Developer
Posts: 813
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Broadlink plugin - alpha version

Post by Sem;colon » Sun Jan 24, 2021 9:16 am

Yes, I don't know exactly in what way it is different, but there are two slightly different signals sent by the remote.
It's really like a second type of code; let's say you sent the "up" command from type 1, it executes the action. Then you send the same code again 3 times - it does nothing. Even if you then send the "down" command from type 1 it does nothing, but when you send the "down" command from type 2 it will execute the action.

I guess you could work around it with a different learning mode in the plugin to capture both codes and then have a binary variable to determine which code to send on an action independent level, but I wonder if the hardware itself, or the Lib you are using, already has something in place to cover this odd IR protocol?
If you like my work, Image me a drink :wink:

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

Re: Broadlink plugin - alpha version

Post by Medy » Sun Jan 24, 2021 2:51 pm

Sem;colon wrote:
Sun Jan 24, 2021 9:16 am
Yes, I don't know exactly in what way it is different, but there are two slightly different signals sent by the remote.
It's really like a second type of code; let's say you sent the "up" command from type 1, it executes the action. Then you send the same code again 3 times - it does nothing. Even if you then send the "down" command from type 1 it does nothing, but when you send the "down" command from type 2 it will execute the action.

I guess you could work around it with a different learning mode in the plugin to capture both codes and then have a binary variable to determine which code to send on an action independent level, but I wonder if the hardware itself, or the Lib you are using, already has something in place to cover this odd IR protocol?
Maybe its just a matter of reapeatably sending the same command ... I remember on my parents TV you
have to hold donw the "power on" button on the remote for the tv to turn on ...

I dont know any specifics about that ... ... Havent seen this in any ir remote app ive used so far either ...
Unless I know exaxtly what is going on I cant solve this.

if it realy is a different command on a second press .. you should be able to catch it ..

Recording and sending a single command is how the offical app works ... and the library as well...
so there definetly is no support for such behavior as you describe it.

I would try sending the same command with a short delay to test the theory

It doesnt make sense to me why there would be a second signal.... and I kinda doubt that is even a thing .. there must be smth else going on.

Are you using offical remotes ? You could try use a smarth phone appp if it has a ir blaster ... using anyremote app ....

User avatar
Sem;colon
Plugin Developer
Posts: 813
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Broadlink plugin - alpha version

Post by Sem;colon » Sun Jan 24, 2021 5:15 pm

I agree it sounds rather odd when you look at it as a unit directional protocol, but when you assume it as a bidirectional protocol it can make sense!
I did some research and found this: https://automata.cs.ru.nl/BenchmarkBRP/Description
It's saying that one bit of the code is alternating in order to provide an acknowledgement. (Even though it looks like it has been implemented as a unit directional protocol in my case, as I can only see a blaster on the remote)
This would fit to my observation..

Yes, it works when I use the original IR remote and also when I use a Logitech Harmony universal remote or LIRC. They all seem to support that protocol somehow. (when the protocol is really known by the device, I think it's not a big thing to toggle one specific bit if the code every other time)
If you like my work, Image me a drink :wink:

smbs
Posts: 21
Joined: Fri Apr 28, 2017 2:28 pm

Re: Broadlink plugin - alpha version

Post by smbs » Sun Feb 07, 2021 11:47 pm

I intend to buy a rm?? (not sure which model is supported by existing plugin thats my question)to work with EG
My home theatre is completely controlled by my ir remote using EG plugin "PHX01RN".
As i understand it using this new plugin I could use my Android phone instead of the remote.
I see on Aliexpress there are rm3 rm4 rm3 mini pro rm4 pro--which is compatible with the existing plugin--I would like both Wifi and IR support.
Hope someone can help
Many thanx

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

Re: Broadlink plugin - alpha version

Post by Medy » Mon Feb 08, 2021 9:36 am

smbs wrote:
Sun Feb 07, 2021 11:47 pm
I intend to buy a rm?? (not sure which model is supported by existing plugin thats my question)to work with EG
My home theatre is completely controlled by my ir remote using EG plugin "PHX01RN".
As i understand it using this new plugin I could use my Android phone instead of the remote.
I see on Aliexpress there are rm3 rm4 rm3 mini pro rm4 pro--which is compatible with the existing plugin--I would like both Wifi and IR support.
Hope someone can help
Many thanx
so far rm3 mini and rm 3 pro+ are confirmed to be working from previous years.


the pro + is the one im using ..which supports rf and ir signals
the rm3 mini only supports ir

https://de.aliexpress.com/item/40003147 ... hweb201603_
(labeled as "new" version)

atm you only need the app for the inital setup to pair the devices to your home wifi ... after that you can delte the app and use eventghost .
I will try implement a manual method where you need no app at all at some point.

smbs
Posts: 21
Joined: Fri Apr 28, 2017 2:28 pm

Re: Broadlink plugin - alpha version

Post by smbs » Mon Feb 08, 2021 1:39 pm

@Medy
Thanx for your help
I ordered the pro as per the link u sent me
Many thanx again

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

Re: Broadlink plugin - alpha version

Post by Medy » Mon Feb 08, 2021 1:45 pm

smbs wrote:
Mon Feb 08, 2021 1:39 pm
@Medy
Thanx for your help
I ordered the pro as per the link u sent me
Many thanx again
Hopefully it works ... cant know for sure if its a "new version".
Let me know how it goes.

smbs
Posts: 21
Joined: Fri Apr 28, 2017 2:28 pm

Re: Broadlink plugin - alpha version

Post by smbs » Tue Feb 09, 2021 12:18 pm

Medy wrote:
Mon Feb 08, 2021 1:45 pm
smbs wrote:
Mon Feb 08, 2021 1:39 pm
@Medy
Thanx for your help
I ordered the pro as per the link u sent me
Many thanx again
Hopefully it works ... cant know for sure if its a "new version".
Let me know how it goes.
@Medy
Sent you PM hope u received it

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

Re: Broadlink plugin - alpha version

Post by Medy » Sat Feb 13, 2021 10:32 am

smbs wrote:
Tue Feb 09, 2021 12:18 pm
Medy wrote:
Mon Feb 08, 2021 1:45 pm
smbs wrote:
Mon Feb 08, 2021 1:39 pm
@Medy
Thanx for your help
I ordered the pro as per the link u sent me
Many thanx again
Hopefully it works ... cant know for sure if its a "new version".
Let me know how it goes.
@Medy
Sent you PM hope u received it
Just pick up any rm pro + or rm 3 mini you can get and try it out ... send it back if doenst work ;) ...
If its not some super brand new model with changed hardware .. chances are it will work and it is in the list of supported devices.

There is cli tool which lets you record and send command from you console.
https://github.com/mjg59/python-broadli ... master/cli
Since Eventghost can run command line ... It is possible to use this and having a better support for latest models ....

I may write a tutorial on how to make this with work eventghost ... and create some kind of hybrid plugin that just utilizes the command line tool.

That way there would be no support issues a(yoyu could probably order a rm 4 pro from amazon and would probably work) and I wouldnt have to update the code to be python 2.7 compatible.... all the time...

I think I will do that when I have time .... seeing there are people who like to use this plugin and struggle finding the right device to use.
That should be a pretty good solution for this plugin to keep working with eventghost ... and kinda self update itself for support with latest broadling devices.... Otherwise I just would have to keep recommended out of stock items at some point

Dunno when though .... sometime this year is my best guess .... have another project atm im playing with ... also have to deal with school stuff :D

So atm I would probably try to find some used rmpro plus on ebay ... or buy a rm3 mini from amazon if you only need ir signals...

Post Reply