Roku Support

If you are this determined to have it then you are more than welcome to take the work above and write the binding for it. Time is precious and this isn’t the highest thing on my list considering I have something that meets my own needs.

Very well. I consider your decision made.

I just wish you had said so from the start rather than being all wishy-washy about it. If you don’t want to do it then just say so. You aren’t waiting for it to be perfect, you just don’t want to do it. That’s fine. Just don’t make others think you are working on something or planning on working on something and scaring off other developers who don’t want to stomp on your toes.

You developed this. You “own” it (yes, it is open source but I can’t come up with a better word). No one is going to develop a binding based on it without your explicitly saying you will not be doing so yourself. It’s common politeness not to jump ahead of the “owner” of the code. By being wishy-washy you prevent any further progress in that direction. I had time over the Christmas break to develop this into a binding. I didn’t because I didn’t want to stomp on your toes. How many other developers have done the same? We could of had a binding by now.

Please add to the top of the OP something along the lines of “If someone wants to turn this into a binding they are welcome to do so as I have no interest in developing a binding.”

Given the amount of time you spend replying to every post on this forum, I’m sure clearing up some time won’t be too complicated. You really should get over yourself.

For ANYONE who wants to develop this into a binding, have at it.

It’s awfully hard to code a binding on one’s phone. 90% of my postings on this forum come in downtime from my phone.

You have been sitting on this effectively preventing anyone else from working on it out of common decency and community guidelines and somehow I’m the bad guy.

I see both sides of this but let’s be a community and support each other. I haven’t implemented anything with this yet because, well, time is precious. I’d love to see this as a binding but I haven’t seen a ton of people asking for it. I appreciate the leg work of figuring out the protocols and all that. Maybe work together on the binding? It sounds like morph is possibly interested in learning how. Just my two cents.

I agree with DMize and I also 2nd the binding. It would be great if someone created this. I do not have the expertise to do it, so if anyone else is capable and has the time, it would be appreciated.

i think a binding would be just peachy as i have several rokus

1 Like

There is already a decent amount of work done on a Roku binding here. Looks like development has been stagnant for almost a year, and seems to also be caught up in the review process for approval.

I’ve taken the code from this thread and deployed it in my OH environment. Slowly rolling out testing for controlling the Roku functions on my Rokus…

Having said that, yes, I would vote for a “formal” binding. I wonder what the reason for the binding that was developed 10 months ago has not been reviewed and sits stagnant.

Regards.

Mike

3 Likes

There are not enough reviewers and the same people who are reviewing are also developing.

It might be worth pinging the pr by adding a comment and asking what the holdup is. It might have just been lost in the shuffle. I do see there is at least one conflict that needs to be resolved.

1 Like

Can you post a link to the binding on git?

@Thedannymullen - see the “pr” link in Rich’s post (quoted below).

1 Like

I am interested in this binding. I have 2 TCL Roku tv’s and 2 Roku streaming sticks.

I’d test it, if someone could post a jar file.

1 Like

Same here. Where do I start?

I gave up on this binding and now I use EXEC and CURL for each command. The Roku external control API is very easy to follow. https://sdkdocs.roku.com/display/sdkdoc/External+Control+API#ExternalControlAPI-query/apps

I know this is not the best solution, but it is simple and works very well for me.

Here is sample of my Bedroom Roku .items list (note I use static IP’s for all my devices).

/*Master Bedroom */
Switch RokuMBHome "Roku MB Home" (gROKU_ALL,gROKU_MB) 	{ exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/home]"}
Switch RokuMBUp "Roku MB UP" (gROKU_ALL,gROKU_MB)	{ exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/up]"}
Switch RokuMBDown "Roku MB DOWN" (gROKU_ALL,gROKU_MB)	{ exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/down]"}
Switch RokuMBLeft "Roku MB Left"  (gROKU_ALL,gROKU_MB)	{ exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/left]"}
Switch RokuMBRight "Roku MB Right" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/right]"}
Switch RokuMBSelect "Roku MB Select" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/select]"}
Switch RokuMBReplay "Roku MB Replay" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/replay]"}
Switch RokuMBRewind "Roku MB Rewind" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/rewind]"}
Switch RokuMBFastFW "Roku MB FastFW" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/fastforward]"}
Switch RokuMBPlayPause "Roku MB PlayPause" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/play]"}
Switch RokuMBOptions "Roku MB Options" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/keypress/options]"}
Switch RokuMBNetflix "Roku MB Netflix" (gROKU_ALL,gROKU_MB) { exec=">[*:curl -d '' http://10.200.200.71:8060/launch/12]"}
Switch RokuMBAmazon "Roku MB Amazon" (gROKU_ALL,gROKU_MB) 	{ exec=">[*:curl -d '' http://10.200.200.71:8060/launch/13]"}
Switch RokuMBVue "Roku MB PS Vue" (gROKU_ALL,gROKU_MB)	{ exec=">[*:curl -d '' http://10.200.200.71:8060/launch/93374]"}
Switch RokuMBPlex "Roku MB Plex" (gROKU_ALL,gROKU_MB)	{ exec=">[*:curl -d '' http://10.200.200.71:8060/launch/13535]"}
Switch RokuMBPandora "Roku MB Pandora" (gROKU_ALL,gROKU_MB)	{ exec=">[*:curl -d '' http://10.200.200.71:8060/launch/28]"}

I then have a widget created in Habpanel to simulate the remote and APP buttons.

For any automation, it can be done in the rules, here is an example of when the lights turn on, I pause the Roku

rule "MBLightPauseRokuON" when

Item MBLight changed from OFF to ON

then

executeCommandLine("curl -XPOST http://10.200.200.71:8060/keypress/play")

logInfo("Lights", "MB Light On, Roku paused")

end
2 Likes

Wow, that’s exactly what I’m looking for… however, I’ve added those lines to my .items file (edited to fit with my home setup and Roku IP address) and they show up as openHab items to link to in HabPanel, but when I press a button, nothing happens. I copied and pasted the curl statement for play/pause from the .things file into a terminal and the Roku responded. I just cannot get it to work from HabPanel on any of the other UIs. Do I need to install or configure any bindings or transforms? Any help gratefully received!

You will need the Exec https://www.openhab.org/addons/bindings/exec/ binding installed.

Thanks BK, I have that installed and still nothing happens… I’ve done a completely fresh install and still cannot get anything to happen when I press the switch associated to (e.g.) play. :frowning: Will have to keep reading and searching.

Can you please share your habpanel widget?

It’s not pretty, and mostly hijacked from other people projects…I am sure someone on here can clean it up and make it better. I use as a widget or habpanel template

<style>

  
  .glyphicon.glyphicon-chevron-left {
    font-size: 40px;
  }
  
    .glyphicon.glyphicon-chevron-up {
    font-size: 40px;
  }
    .glyphicon.glyphicon-chevron-right {
    font-size: 40px;
  }
    .glyphicon.glyphicon-chevron-down {
    font-size: 40px;
  }
    .glyphicon.glyphicon-chevron-left {
    font-size: 40px;
  }
  
      .glyphicon.glyphicon-home {
    font-size: 40px;
  }
  
      .glyphicon.glyphicon-ok {
    font-size: 40px;
  }
  
        .glyphicon.glyphicon-certificate {
    font-size: 40px;
  }
  
          .glyphicon.glyphicon-repeat {
    font-size: 40px;
  }
  
            .glyphicon.glyphicon-backward {
    font-size: 40px;
  }
  
               .glyphicon.glyphicon-play {
    font-size: 40px;
  }
              .glyphicon.glyphicon-forward {
    font-size: 40px;
  }
                .glyphicon.glyphicon-info-sign {
    font-size: 40px;
  }
  
left {
    float: left;
    width: auto;
    padding: 10px;
}

  center {
    float: left;
    width: auto;
    padding: 10px;
}
  
   right {
    float: left;
    width: auto;
    padding: 10px;
}
  
rr {
  	float: left;
  	width: auto;
  	padding: 10px;
  }

  rrr {
  	float: left;
  	width: auto;
  	padding: 10px;
  }

  
</style>
Living Room Roku
<section>
 <left>
       <div class="row" style="margin-top: 15px; margin-left: 0px; margin-right: 0px" ></div>
<div ng-if="itemValue('RokuMBRight').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBRight', 'ON')">
  <span class="glyphicon glyphicon-info-sign"></span> 
  </button>
</div>
   
   
      <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>  
   <div ng-if="itemValue('RokuMBLeft').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBLeft', 'ON')">
  <span class="glyphicon glyphicon-chevron-left"></span> 
  </button>
</div>
   
      <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>  
   <div ng-if="itemValue('RokuMBReplay').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBReplay', 'ON')">
  <span class="glyphicon glyphicon-repeat"></span> 
  </button>
</div>
   <br></br>
         <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>  
   <div ng-if="itemValue('RokuMBRewind').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBRewind', 'ON')">
  <span class="glyphicon glyphicon-backward"></span> 
  </button>
</div>
   

   

  
  </left></section>
  
 
<section>
 <center>
    <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>  
<div ng-if="itemValue('RokuMBUp').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBUp', 'ON')">
  <span class="glyphicon glyphicon-chevron-up"></span>  
  </button>
</div>
       <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>  
<div ng-if="itemValue('RokuMBSelect').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBSelect', 'ON')">
  <span class="glyphicon glyphicon-ok"></span> 
  </button>
</div>
     <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>  
<div ng-if="itemValue('RokuMBDown').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBDown', 'ON')">
  <span class="glyphicon glyphicon-chevron-down"></span> 
  </button>
</div>
   <br></br>
        <div class="row" style="margin-top: 15px; margin-left: 0px; margin-right: 0px" ></div>  
<div ng-if="itemValue('RokuMBPlay').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBPlay', 'ON')">
  <span class="glyphicon glyphicon-play"></span> 
  </button>
</div>
</center></section>

<section>
<right>

 <div class="row" style="margin-top: 15px; margin-left: 0px" ></div>          
<div ng-if="itemValue('RokuMBHome').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBHome', 'ON')">
  <span class="glyphicon glyphicon-home"></span> 
  </button>
</div>     
  
     <div class="row" style="margin-top: 15px; margin-left: 0px; margin-right: 0px" ></div>
<div ng-if="itemValue('RokuMBRight').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBRight', 'ON')">
  <span class="glyphicon glyphicon-chevron-right"></span> 
  </button>
</div>
  
  
       <div class="row" style="margin-top: 15px; margin-left: 0px; margin-right: 0px" ></div>
<div ng-if="itemValue('RokuMBRight').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBRight', 'ON')">
  <span class="glyphicon glyphicon-certificate"></span> 
  </button>
</div>
  
  
  <br></br>
          <div class="row" style="margin-top: 15px; margin-left: 0px; margin-right: 0px" ></div>  
<div ng-if="itemValue('RokuMBFastFW').split(',')[2]!='0'">
  <button class="btn btn-lg" style="background: purple; color: white"
  ng-click="sendCmd('RokuMBFastFW', 'ON')">
  <span class="glyphicon glyphicon-forward"></span> 
  </button>
</div>
</right></section>

For the other buttons I simply use a switch in habpanel and point the icon to Custom URL and grab it directly from Roku , for example Netflix is http://10.200.200.71:8060/query/icon/12