Broadlink RM-PRO and A1 sensor

No not need, its standalone. Perhaps next month I will have free time and If nobody not start develops components, I will do.

Link to original mdule: https://github.com/mjg59/python-broadlink
It’s use MIT license, but this code is for python2. I change code for Python3 see upper post.

Thanks… finally some great news…

Is there some dummies way for using RM2 and A1 on HASS?
How long until we get a full integration on HASS interface such as…

Example configuration.yaml entry

broadlink:

  • device: ‘RM2’
    host ip: 999.999.9.999
  • device: ‘A1’
    host ip: 999.999.9.999

Will it be possible???
Thanks

1 Like

This example is not possible but I think possible will be:

broadlink:

  • device: ‘RM2’
    host: 999.999.999.999
    mac: xx:xx:xx:xx:xx
    name: ‘TV On’
    ir_packet: ‘packet’

Ok, I’m almost done sensor component. Tomorrow I will upload it.

4 Likes

Awesome!!!

Here is sensor.

Please, test it.

Support only RM2 Pro (Read data from temperature sensor) and EAIR A1 (Temperature, Noise and etc.)

Next is switch for IR commands but there will be a problem because there is no push button in home assistant… Switch is not good idea for IR or RF remote commands

2 Likes

I will buy EAIR (I only hve RM2 pro).
At the moment I use the command below to activate Broadlink RM2 Pro RF command (on hardware electric swtiches) and works perfectly. I have still to test IR

switch:
  platform: command_line
  switches:
    platter11_light:
      command_on: "curl -X GET http://192.168.1.50:7474/?cmd=%7B%2...."
      command_off: "curl -X GET http://192.168.1.50:7474/?cmd=%7B%22...."

I don’t understand whats is wrong with code and why not passed tests in GITHUB. Wow.
I apologize but until now I did not use GitHub

Thanks very much for that…
Finally awesome!
Could not test yet because I am not home…

About the RF and IR sending capability… I think we could use a assumed_state switch. We could set two different commands for the same switch, such as POWER ON OFF, VOL UP DOWN, CHANNEL UP DOWN.

Besides, we do not need a graphical interface for remote controls, we just need integrate IR and RF commands on automation actions… we already have the e-control interface for that…which is very limited…

There is no need having a switch or a button on the UI, Just the possibility of turning the tv off if left on with nobody home… or turning the AC on a preset cold or hot based on the room temperature…

But need would like to abandon the Android bridge need…

but how to get status?

but how to get status?

Impossible!
Unfortunately I think use switch is not a good idea. Better would be if there was a button.
All remote controls have buttons not switches :slight_smile:

In fact, there is no way to get status back from any IR device, unless you look at it, or check a sensor status changing, such as, turn on AC and check for the temperature variation…

On the other hand, we have RF devices as well, which can inform status or not. Most of them do not inform their status, therefore we need to use different RF signals for turning ON and OFF, what allows sending two or three times the same ON or OFF signal to make sure it had worked.
A RF device with toggle commands is useless for automation rules.

But that is a Whole RF/IR World problem!!!

For RF devices we have better alternatives, such as RFXTRX and RFLINK (which is already being added on HASS).

But for IR devices, Broadlink seems to be the best cost-benefit.

I think the problem about push, switch or assumed_state buttons should be solved later by creating a push button on HASS.

The best step forward will be let us free from android bridge.

The best way to control a IR device is and will allways be using the original remote control.
If we could just send a broadlink IR command throught as an automation action, would already be awesome!!! Even without a push button on the user interface.

I have a plenty of Livolo Switches (RF controlled with Toggle Button and OFF button - there is no ON Button), which I have controlled using switches.
I need two virtual switches for each lamp. One is toggle and the other is OFF.
The frontend interface is far from ideal, but it works… when everybody is out of home, I can turn all lights off (for sure) sending a toggle command twice for the OFF switches (I send twice to be sure it will work), and when Kodi pauses, I send a toggle command for the switch I want just once (sometimes it does not work).

OK, I start developing switch.

Example configuration will be:

switch:
  platform: broadlink
  host:
  mac: 
  switches:
     platter11_light:
       - command_on: 'packet'
       - command_off: 'packet'

At this stage unfortunately we will not have button.
For devices which some function are controlled with a single button (turn TV on/off) we can
set variables command_on and command_off with the same IR/RF packet.

3 Likes

Is it compatible with Broadlink Black Bean?

Great!

with command_line works perfectly for both IR and RF

1 Like

There is currently no established support for infrared universal devices…

There are few people trying to create that compatibility for Broadlink devices on this forum…

Certanly this would be the cheapest way to control unsmart IR devices:

I think in a few weeks we will see all Broadlink products full compatible with HASS…

2 Likes

with or without the Android Bridge running???

with, so far I don-t mind, because I do use an android phone as remote/HA client

Ok, I think is done:

Please test switch: http://pastebin.com/GuEtnUMM

Example configuration.yaml

switch:
  platform: broadlink
  host: 10.0.0.10
  mac: "B4:43:0D:C3:F8:42"
  switches:
    reciever:
      friendly_name: "Reciever"
      command_on: 'JgBYAAABJpMTEhM2ExISOBM3EzYTNxMSEjgTEhM2ExITEhMSEhMTNxISEzcTEhM3EzcTEhMSExISNxITEjgTEhMSEzYTNxM3EwAFFAABJUoSAAxNAAEmSRMADQU='
      command_off: 'JgBYAAABJpMTEhM2ExISOBM3EzYTNxMSEjgTEhM2ExITEhMSEhMTNxISEzcTEhM3EzcTEhMSExISNxITEjgTEhMSEzYTNxM3EwAFFAABJUoSAAxNAAEmSRMADQU='

command_on and command_off is a base64 encoded packet from broadlink (to be user friendly string :slight_smile: ). To sniff packets please use this tool: http://pastebin.com/gFB66sVM

Only change ip_addr and mac_addr with your in this tool and in configuration.

If everything is ok I upload to github.

And again: Sorry for my bad English. I start learning in next month :wink:

2 Likes

Newb here.

How to sniff packets. Can you give me some instructions? I am using windows