Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Broadlink Rm2/pro #236

Closed
merlin051 opened this issue Nov 11, 2016 · 91 comments
Closed

Support for Broadlink Rm2/pro #236

merlin051 opened this issue Nov 11, 2016 · 91 comments

Comments

@merlin051
Copy link

Anyone know how to get the bridge to talk to a Broadlink IR/RF blaster?

@merlin051
Copy link
Author

Great, have you got this working fine?

@audiofreak9
Copy link
Collaborator

No, sorry to say I just Googled: "Broadlink IR/RF blaster API" and it seemed descent after quickly reading. It allows HTTP calls, which is what you are after.

@merlin051
Copy link
Author

Yeah I've already read that article, got to the point when I needed an a droid device as a other bridge and stopped reading.

@audiofreak9
Copy link
Collaborator

Yeah, even this github project requires an Android intermediary device: https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa

Sorry for the joykill!

@merlin051
Copy link
Author

I might have to write something to do this!

@audiofreak9
Copy link
Collaborator

If you can read Chinese (or translate) here is the SDK: https://drive.google.com/file/d/0B65vYtefY0h2aE1LdWF5RG9sX00/view

@merlin051
Copy link
Author

My Chinese is a little rusty.

@peadard
Copy link

peadard commented Nov 12, 2016

I spun up an android vm as I don't own an android and ran the bridge in that. The I used rm commander tools to generate the code. My home automation system then runs a batch file that contains the code. So far it works pretty well

@farhanito
Copy link

@tuspam
Copy link

tuspam commented Nov 28, 2016

Working via Android intermediary device and python broadlink also

@tyjtyj
Copy link

tyjtyj commented Jan 6, 2017

anyway to convert https://github.com/mjg59/python-broadlink to java ?

@buserror
Copy link

buserror commented Jan 7, 2017

+1 for a 'native bridge' -- the android tasker plugin doesn't work here anyway.... The broadlink is otherwise pretty nice, and very cheap; handles 433Mhz devices too which is quite cool.

@bwssytems
Copy link
Owner

@tyjtyj That is the basis of what I am looking into to be able to control a Broad link. The only thing is, what to control and how. It is an IR/RF/SmartPlug/SmartPowerStrip controller.

@tuicemen
Copy link

Add me to the list of users looking for this!

I've used the RM bridge management Page to learn IR device codes
http://rm-bridge.fun2code.de/rm_manage/index.html
Running the RM Bridge on an android TV box I can manually send signals to a device via the https short link however I can't get the HA-Bridge to send these.
Anyone got it working that way?

@merlin051
Copy link
Author

There are some python scripts kicking about but I haven't had the time to review them all yet. This should be possible.

It seems overkill to need an android running tasker for this to work.

@farhanito
Copy link

currently I am using broadlink-mqtt (https://github.com/eschava/broadlink-mqtt), another excellent project based on the python-broadlink.
since HA-Bridge also has support for mqtt, everything works nicely.

@merlin051
Copy link
Author

Farhanito,

Can you give us any more detailed information on this?

I've never used mqtt before. Do I need something running a mqtt broker?

Alexa > Habridge > Mqtt broker > Broadlink ?

@farhanito
Copy link

hi @merlin051,

yes, I'm running an mqtt broker (mosquitto) on the same machine (RaspberryPi) as HA-Bridge.
and then run the broadlink-mqtt script to make RM device subscribed to certain topics.

after that you can tell Alexa to publish commands to that topic via HA-Bridge

@merlin051
Copy link
Author

@farhanito

I think I'm missing something, and i think I've misunderstood what MQTT(Mosquitto) does.

I've got mosquitto installed and running as a service on my windows box( same machine running HA Bridge)

I was expecting some sort of interface where i can map devices/commands?

I've got python installed, i use it for my Orvibo s20 control scripts, not sure how I can feed the broadlink script you pointed out into my environment?

any guidance much appreciated.

@tuicemen
Copy link

tuicemen commented Feb 28, 2017

Not sure if the new version of the HA-Bridge helped but I can now send the links for IR signals to the RM Bridge ( https://play.google.com/store/apps/details?id=de.fun2code.android.rmbridge)
Alexa now turns on/off my TV

@merlin051
Copy link
Author

@tuicemen i really want to try and avoid setting up an adroid bridge to act as a middleman in an already complicated setup.

@tuicemen
Copy link

tuicemen commented Mar 1, 2017

@merlin051 As would I, but setting up another server using MQTT(Mosquitto) is even more complicated I feel.
Since I already had an Android TV box for streaming this was the best solution for me (for now).

@farhanito
Copy link

@merlin051
if you already have mosquitto running, then just run the broadlink-mqtt.
make sure you already installed the required python modules (paho-mqtt and broadlink)

here's my broadlink-mqtt config:

Type of device. Valid options are 'lookup', 'rm', 'sp1', 'sp2', 'a1'

device_type = 'rm' # I use rm

lookup parameters

lookup_timeout = 20
#local_address = '127.0.0.1'

parameters for direct connection

device_host = '192.168.31.108' # rm ip address
device_mac = 'B4:43:0D:xx:xx:xx' # rm mac

MQTT connection parameters

mqtt_broker = 'localhost' # default: 'localhost'
mqtt_port = 1883 # default: 1883
mqtt_clientid = 'broadlink'
mqtt_username = ''
mqtt_password = ''
mqtt_topic_prefix = 'rm3/'`

after that, you can try publishing an mqtt message for example

topic = rm3/tv/samsung/ON
content = record

this will make your rm goes into learning mode, ready to copy your remote button.
when finished, it will automatically save the code in a file (named ON) inside this directory

../broadlink-mqtt/commands/tv/samsung/ON

to execute the command, publish this message

topic = rm3/tv/samsung/ON
content = replay

good luck,

@merlin051
Copy link
Author

@farhanito thank you for your help.

I now have everything up and running. although I couldn't get the MQTT native stuff to work in HA Bridge. so I've just used a custom execution and [mosquitto_pub.exe] like this as a command:

C:\Program Files (x86)\mosquitto\mosquitto_pub.exe -t rm/soundbar/HDMI2 -m auto

any chance you can screenshot one of your devices config pages for me?

@Matt8119
Copy link

Matt8119 commented Mar 3, 2017

@farhanito sounds like you have mastered it!

a screenshot of your settings would be great! i've been racking my brain how to integrate my RM PRO also. i'm using FIBARO HC2 and everyone i have communicated with, said id have to install home assistant as "another" bridge just get this thing communicating with my two google home's...

@Matt8119
Copy link

Matt8119 commented Mar 3, 2017

@farhanito are you talking about this python module "eclipse/paho.mqtt.python" or this one "eclipse/paho.mqtt.java"?

@merlin051
Copy link
Author

@Matt8119 since I installed it using pip it's got to be paho.mqtt.pyhton I think.

@MyGreenBodhi
Copy link

@bwssystem
Great work on the bridge, any word on the progress for adding the broadlink to your bridge?

@bwssytems
Copy link
Owner

Nothing yet, still working on 5.0.0 issues

@bwssytems
Copy link
Owner

So, I am still having a moment here on whether this fits in this space. The ha-bridge wants to be able to find and call concrete things. In the RM2/3 world, you have to build these through learning and saving the ir packets. The ha-bridge is not a device level controller as many home auto systems already support device level.

@tuicemen
Copy link

I don't think the Bridge needs to learn and save there are any number of programs one can use to find the IR or RF packets.
The end user can place those in a on/off send.
From what I understand a uid needs to be sent with the commands or the RM will ignore the call.

@darth-hp
Copy link

@bwssytems FYI these Broadlink devices use the QUIC protocol https://en.wikipedia.org/wiki/QUIC

@quadhammer
Copy link

"Not sure if anybody is watching this but Broadlink have released a new app IHC and it provides integration between the Amazon Echo and the Broadlink unit."

As has been mentioned, this only works for InfraRed devices, so if the HA bridge could handle it with RF, that would be awesome.

Cheers!

@bwssytems
Copy link
Owner

So, OpenHAB supports Broadlink/RM2 and I have started the OpenHAB implementation. Since this is device level, I will leave that up to OpenHAB.

@tuicemen
Copy link

So we'll only see this if we use OpenHAB?

@bwssytems
Copy link
Owner

Yes. I'm trying to have the bridge be a bridge between it's Hue API and other Home Automation systems.

@quadhammer
Copy link

Other automation systems meaning OpenHAB, or nothing else? That's disappointing.

I guess it's time to look at the RM bridge, because after trying OpenHAB, I don't think it's anywhere near polished enough to consider switching to.

Just my opinion, of course, and thanks for your work.

@tuicemen
Copy link

OpenHAB as I understand it has its own hue interface so I'm not sure why OpenHAB users would need special HA-Bridge interfacing. Add me to the disappointed list.

I don't think most users were expecting the Bridge to learn and save IR and or RF codes we ( I ) just wanted to be able to send codes already found to the Broadlink directly with out requiring another server.

@bwssytems
Copy link
Owner

The unfortunate thing is there are a dozen different types of devices that everyone one wants and the work is already done in other systems. Just trying to get the most bang for the buck in additions. I'll keep this on the list and will look at putting this in.

@tuicemen
Copy link

tuicemen commented Dec 22, 2017

@bwssytems

I'll keep this on the list and will look at putting this in.

Thanks for that!
The way I see it the Broadlink is no different then the Harmony, Vera, or Hue hubs other Software systems have support for those and most likely pulled the code for HA-Bridge.

You done a great job on HA-Bridge and I don't think you should be improving someone else's work!
Adding support for a software is not what you should be doing!(sorry just my opinion) those softwares should be adding support for the HA-Bridge.
It isn't hard to add support for the HA-Bridge to a software if the developer is serious enough.
I and a few others have done it.
HA-Bridge will just get bloated with code that over 60% of users don't need or use if you keep adding support for other programs. I'm not sure why a user would stick with HA-Bridge if another system had the options they wanted.
Sorry If it sounds like I'm coming down hard on you and all your hard work that's not my intention.

@darth-hp
Copy link

I had a look for the QUIC protocol and found this for Java:
https://github.com/ssuman/Quic-Protocol
https://github.com/TheoCabannes/Implementation-protocol-Quick

@bwssytems
Copy link
Owner

There is a complete broadlink package for java already. https://github.com/mob41/broadlink-java-api

@bwssytems bwssytems added this to the 5.2.0 milestone Jan 18, 2018
@bwssytems
Copy link
Owner

This will be in v5.2.0. The next release candidate of 5.2.0RC6 will include it for testing.

@tuicemen
Copy link

Awesome!! You just made my day, week, month, & year!

@merlin051
Copy link
Author

I've switched to using hass.io and emulated_hue which still works with my Echos. I've got a friend with Google home and local hue traffic is now disabled, it's all cloud based.

@tuicemen
Copy link

@bwssytems when will RC6 be available?
I can't wait to test!

@bwssytems
Copy link
Owner

New Jar is out in thread #863

@tuicemen
Copy link

OK Have the new jar but unsure how the Broadlink is supported.
Don't tell me I need another server app :(

@alzzy
Copy link

alzzy commented Jan 28, 2018

Tuicemen any progress wrt testing this jar?

@tuicemen
Copy link

I've not been able to do to much as I've been busy with other things.
Since I've now about got them cleaned up I 'll spend more time on this. I have to look at port forwarding options for the Broadlink.

@bwssytems
Copy link
Owner

@quadhammer Have you tried the RC test jar yet? Want the vocal members of this request to test the implementation.

@tuicemen
Copy link

tuicemen commented Feb 5, 2018

Everyone who posted to this thread should be testing the RC build.
Currently it looks like only two of us are interested in its implementation. :(

If that's the case bwssystems might as well stop trying to implement it.

@peadard
Copy link

peadard commented Feb 5, 2018

Ill have a look at testing it tonight after work

@quadhammer
Copy link

@bwssytems Yes, I've tested it with no luck. I'll respond on #863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests