Broadlink RM support

Currently I use HA-Bridge and the included Broadlink option to send RF and IR commands. but this requires another server running on my RPi or a dedicated Pi for HA-Bridge.
I’d like to eliminate the need for HA-Bridge and the extra server.
I have found multiple sample code in java and python both of which I know nothing about so things have been going slow trying to create something. Using code found here: https://github.com/mjg59/python-broadlink I’ve had success.
This is done using the files in the CLI folder.
I’m still playing so not sure if I’ll require a interface, custom widgets or both at this point.
It maybe possible to just create a program and use a generic light switch or dimmer widget.
I’ve not attempted to learn any new code but have successfully sent (armed and disarm) codes to my X10 security console with the Broadlink and a terminal input using code already learned elsewhere.

I managed to create a C# script which uses a generic light or switch widget. The program does a Broadlink discovery at each HG service start so finding the connection info is automatic.
I’ve only been testing this with RF code I’ve already captured and don’t intend on adding the learn function to this so someone else may wish to take this further.
I’ll test IR code sending later on but see no difficulty in sending as long as the code is correct.

for users wishing to play with this here is whats needed
1: Broadlink sending device see the above link in OP for what is supported
2: Python 2.7 the files are not formatted correctly for Python3
3: the Broadlink driver use sudo pip install Broadlink some users may need to install pip first.
4:make the folder HGbroadlink in /home/pi/
5:Copy files broadlink_discovery and broadlink_cli from https://github.com/mjg59/python-broadlink/tree/master/cli to your just created folder.
6: in stall Broadlink.hgx file in HG device and things.
1024-Broadlink_RM.hgx (5.2 KB)

7: restart HG service so Broadlink info is discovered and saved

Once the program is running you can add modules to your UI as with other devices .Once added you need to configure each module with the on/off codes by selecting
Broadlink RM under Features/Options

Although it is possible to learn IR and RF codes using the command line the program doesn’t do this. you need to find, discover codes and save them to be pasted into the on/off options for each device you wish to control.

I did a bit more work on this and created a separate program just for finding the Broadlink info(DiscoverBroadlink). I had hoped this would speed up the sending of the codes if I manualy added them as options. Although this did speed up the sending I think using HA-Bridge is still faster. However I use this separate program a lot as I have it cycle every 5 mins looking for the broadlink and if it doesn’t find it the display lets me know. Maybe adding a sound notification would also be of benifit.
Although the power addaptor fits snug into an outlet it seems my dog (or ghost) is unplugging it on me. I’ll post the program once I finish my morning coffee.

1027-DiscoverBroadlink.hgx (1.8 KB)
This program also requires a new widget to display properly although the HG status widget will work.Adding this widget I made to HG is what is coded in the programtuicemen_tools_info.zip (67.9 KB)