Simpleremote for home cinema demonstration

This demonstration shows integration of few home cinema components under the simpleremote concept. It shows how a cumbersome task of using a traditional remote control device in the modern home cinema setup can be simplified with the help of Openremote platform.

The test environment consists of:

  • Samsung TV UE46D7000 – LAN controlled;
  • Bose AV35 Home Theater – RS232 controlled;
  • Ferguson Ariva Satellite receive – LAN controlled;
  • Openremote eBox – controls everything;
  • EnOcean USB300 and PTM200 devices from EnOcean starter kit – energy harvesting devices (battery less).

During the demo you see how switching the source with Bose universal remote can be accelerated by the EnOcean 2 buttons switch. This is in fact not a demo but a real application which I’m using in my home everyday. Once I’ve made it I don’t want to switch sources traditional way anymore and I’m planning to buy more EnOcean switches and add them to my setup.

The integration of all components were possible thanks to the open source Openremote middleware. Although not visible on video, Openremote is the brain sitting behind all of this. I’m using a customized version of Openremote because not everything which I’m showing in this video is possible with the standard build. However, my changes are backward compatible, meaning that all Openremote legacy code would run on my version too. I’m planning to contribute my customization as soon as possible.

From the technical point of view the most interesting part is the usage of rules in Openremote to change buttons behavior based on a sensor value.
Here is code snippet a rule used for the ‘Switch TV’ button:

rule "Switch TV"
when
  ($evt : Event(source=="Button BI On", value=="ROCKER_BO_1")
       or Event(source=="V_TV STATUS", value=="ON"))
   $src : Event(source=="V1 STATUS")
then
  if($src.getValue().toString()=="TV")
  {
    execute.command("TV.PRECH");
  }else{
    System.out.println("Switch to TV");
    execute.command("BOSE.SELECT_TV");
    execute.command("TV.SOURCE_TV");
    TimeUnit.MILLISECONDS.sleep(500);
    execute.command("V1 ON","TV");
  }
end

As you see the button function depends on the “V1 STATUS” sensor value which keeps the current selected source.

If you want to know more about this example please leave a comment.

2 thoughts on “Simpleremote for home cinema demonstration

  1. Well, I’ve spent quite a long time to get it working in a robust and correct way. Started with multiple rules and ended with the above code, which is the most robust. It is all tricky as there are some race conditions in switching devices and changing the button functionality. Moreover, the sleep command for 0.5s is just right to be able to remain in correct channel just after switching the source and be able to switch the channel just after it with the next click. During this experiment I’ve learned that the biggest challenge is during testing as this is distributed system with devices from different manufactures which never were meant to work together 😉

Leave a Reply