Please login or register.

Login with username, password and session length

Author Topic: Controling a Broadlink RM from linux  (Read 11966 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Controling a Broadlink RM from linux
« on: March 18, 2018, 05:26:26 AM »

With HA-bridge finally able to send RF and IR commands directly to a Broadlink (no extra server required) I thought it was time to visit this.
Many run HA-Bridge on a PI so I figured it wouldn't be to difficult to setup.
I wanted to set this up on my MK802 android TV stick however any of the Linux versions for it are hard to find and aren't supported any more  B:(
I'm not new to Linux but not experienced with it either.
I put a copy of Debian on a thin client which has no CD rom, this took some doing but I finally succeeded :)%
I haven't figured out how to have HA-Bridge start on boot up yet ::) :' but can get it running :)%
Once up this will give me Alexa control of my X10 devices and all other IR devices here with no PC interface required.

Logged
Please Read Topic:
General Forum Etiquette
Before you post!

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Controling a Broadlink RM from linux
« Reply #1 on: March 18, 2018, 10:47:58 AM »

With HA-bridge finally able to send RF and IR commands directly to a Broadlink (no extra server required).........
.....Once up this will give me Alexa control of my X10 devices and all other IR devices here with no PC interface required.

Since the available Broadlink "skill" allows for IR use... with nothing other than Alexa and a Broadlink device. I assume some sort of computing device is required to get the X10 RF from the Broadlink device.

It would be helpful... at least to some (I am not there yet) if a RBPi could run as a companion device.... to something like the WM100. Congratulations!
Logged
Home Automation is an always changing technology

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Controling a Broadlink RM from linux
« Reply #2 on: March 18, 2018, 06:10:31 PM »

I see they recently released a new model. Pi3Model B+. For the same $35 cost.
Faster processors and memory. Along with a 2.4GHz and 5GHz WiFi interface and POE if you add a PoE Top Hat.
https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/

Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #3 on: March 18, 2018, 06:54:09 PM »

With HA-bridge finally able to send RF and IR commands directly to a Broadlink (no extra server required).........
.....Once up this will give me Alexa control of my X10 devices and all other IR devices here with no PC interface required.

Since the available Broadlink "skill" allows for IR use... with nothing other than Alexa and a Broadlink device. I assume some sort of computing device is required to get the X10 RF from the Broadlink device.

It would be helpful... at least to some (I am not there yet) if a RBPi could run as a companion device.... to something like the WM100. Congratulations!
Actually a PC isn't needed to learn or send x10 RF, the app eControl (and I believe IHC) will do it though I've not used the IHC for other then IR with Alexa
However neither of those apps allow Alexa control of RF (Yet)
The GitHub  HA-bridge pages contain lots of PI users posts and the HA-Bridge readme is geared more towards PI setup so setting up on a PI should be a simple task.

I still plan to attempt getting my MK802 running this, once I've brushed up and refreshed my memory of Linux.
The MK802 once goes to sleep losses video and a reboot is needed to bring it back. Not a big deal once the bridge is set up as no monitor will be needed then.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #4 on: March 18, 2018, 07:02:46 PM »

I see they recently released a new model. Pi3Model B+. For the same $35 cost.
Faster processors and memory. Along with a 2.4GHz and 5GHz WiFi interface and POE if you add a PoE Top Hat.
https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/
I actually was contemplating playing with a PI however the MK802 is about the same size as the pi zero in a case.
I did have this (MK802) running linux and controlling X10 with a cm15 prior to getting a Broadlink.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #5 on: March 18, 2018, 08:17:18 PM »

What most users have a problem with in the HA-Bridge is the script calls.
Long time Linux users shouldn't have a issue  with creating these.
However the new Broadlink section makes adding Broadlink scripts very simple.
HA-Bridge discovers your Broadlink RM for you so all you need to do is paste in the on/off/dim action codes and click "Build Item" :)%
Unfortunately HA-Bridge doesn't discover your IR or RF codes so you'll have to get them from some where else. :(
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #6 on: March 20, 2018, 03:41:03 AM »

I finally figured out how to get this running as a service and to auto load on start up.
I now remember why I stopped playing with Linux not all versions use the same commands in the terminal and each flavor places things in different folders B:(
I had hoped what I learned playing with this on my thin client I could use in the MK802 but that's not going to be the case. :(
Seems once I get over one hurdle there is another. >*<
Loading Ha-Bridge as a service works every boot up  :)% however it is no longer seeing my Broadlink  RM B:(
I was hoping this may be a delayed load but not so.
Disabling then re-enabling the Broadlink support does get HA-Bridge to see the Broadlink but if this needs to be done each reboot the project is a failure.  ::) :'
Maybe I've uncovered a bug in HA-bridge.
I'll have to test this out on my Win machine
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #7 on: March 28, 2018, 01:11:32 AM »

Finally got this working on my EEE box :)%
I ended up using a Ethernet connection Wi-Fi connection was just to slow connecting and was always throwing an authorization input screen. (not good for something intended to run unintended and with out a monitor)
It is possible to set a delay in the HA-Bridge service connection which may have something to do with the WI-FI.

I initially had issues with Alexa seeing configured devices as well but I narrowed it down to the Emulate Hue Hub Version #. I changed this to match the HA-Bridge settings of my Windows setup.
I currently only have codes learned for House Codes "A" & "L", L being for my log home.
While playing with this I've been also trying to implement this on the MK802 but so far I'm having issues with installing java.
I may end up picking up a PI at some point for this to implement at the off grid cottage (if I fail to get the MK802 working).
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #8 on: March 29, 2018, 10:03:25 PM »

My issues with Alexa not discovering devices appears to have been a problem on Amazons side B:(
My changing the Emulate Hue Hub Version # and it working was just a coincidence  ::) :'

The HA-Bridge will not (currently learn) IR or RF codes so you need to find those using something else.
I used the RM Bridge app for Androids which creates a web interface that you can open for learning and testing command codes http://rm-bridge.fun2code.de/rm_manage/
If you go this route:
Discovering RF or IR codes
When you setup the RM Bridge app take note of the IP and port# as well take note of the username and passwords as you'll need them.
1: Click on create new codes
Step one
2: type in the IP and port info to connect to the RM Bridge
3: click load devices this should bring up a login screen.
4: type in your log in info and click enter
Step two
if successful above your Broadlink should appear for selection  select it and got to Step Three
Step Three
Simply follow the instuctions
once a code is found you can test it before moving on to the next.
Codes will get saved

Once you have codes learned you can go back to the main page then select export code shortcuts
Step one:
The info for your broadlink should get transfered over so no additional login will be needed. Click export
Step two: all your codes will appear and will look something like this:
[{"data":"6e00340111341234113511341234113511341134120004da0001198c11121134123411121112113412121112113412111211113511351111123411341211111211121112111311121111121112341135113412341134113511341234110004db0001198c11121134113511121112113511121112113411121112113511351112113411351112111211121112111211121112111211341234113412341134123411351134120004db0001198c11121134113511121112113511111211123412111211123312341112113511351112111211111212111211121112111211351134113412341134123411351134110004dc0001188c12121134113511121112113412111112123411121112113511341112123411341211121112111211121112121112111112341135113411351134123411351134110005dc00000000","mac":"34:ea:34:c7:91:3b","name":"A9 on"},{"data":"6e00060111050f1f1312113511341212111112351112111311121112121112341235111211351135113511351134120004df00011f8c12111235113511121112123411131112113511121212113412341113113412351112111211351113111211121112111311341234121211351135113511351135110004df00011e8d11121135113511121211123511121112113511121211123412341212113511351112121112341211121211131111121211351234111212341234113511351234120004df00011d8d11121135113511121113113411121212113511121113113411351212113511341212111211351112121112121112111311341235111211351134123412341234120005dc0000","mac":"34:ea:34:c7:91:3b","name":"A9 off"}]
Note: this is just the learned code for A9

Adding codes to HA-Bridge
Now in HA-Bridge you need to place the data code for the On command (I colored green) and the Off (colored red)
in the Broadlink info  for on and off, I've not played with dim as yet as I rarely use dim commands any more.
Once you have the info in place check the box to the right of the broadlinks IP, then click "Build item".
A new screen will open where you can edit the name changing it from the default name of your broadlink do the name of the device you wish to control
Once that is done click "Update Bridge device" that will take you to the device screen from which you can test the on/off commands.

Alexa control

This is as simple as telling Alexa to discover devices
If the AWS  is working correctly  ::) :' your devices will be discovered and ready for voice control. :)%
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Controling a Broadlink RM from linux
« Reply #9 on: August 08, 2018, 09:27:39 AM »

My issues with Alexa not discovering devices appears to have been a problem on Amazons side B:(
My changing the Emulate Hue Hub Version # and it working was just a coincidence  ::) :'
I discovered AWS was not always the issue here!  B:(
I found setting up a IP reservation in your router is needed for several new Wi-fi devices, especially if your accessing them from something local. Setting reservations in your router is better then setting a static IP on the device and some IOT have no way to set a static IP. This is the case with the Broadlink RM.

 This sounds difficult to do however it is very simple once you find the location to enter it in your router you just need to know the Mac address of the device.
Many but not all devices have the Mac address printed on the device. B:(
Many routers will display IPs and info of connected wi-fi device mine however never seems to display all if it displays any. B:(
Luckily there are other ways to do this easiest is probably software there are apps for smartphones to do this which I find the most handy. you can also do this from Windows with simular IP/port scanners s well as from the command line.

I'm sure you can also do this from the terminal window in Linux but I've not tried this yet a google search should turn up the how to. ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.