Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sarogersz
Visitor

Can Roku Apps Communicate with Web Services?

We are new developers, and wish to write a Roku app that can communicate over internet using web services, or even better, using MQTT.  Given that PLEX communicates across LAN to access digital media files, that is useful.  Our main concern at the moment is messaging however, not streaming, for using Roku as a UI device for other hardware/software systems.

I assume one of the developers here can answer that question?  We'd appreciate it!

As users, we love Roku and have standardized on it in our product planning (new software company) for a wide variety of reasons.  We will be doing development both internally and using consultants, but are just starting R&D (research).

Thanks in advance for any help.

Best, Stephen

PS if anyone knows a simple and fast way to locate files for the forum profile, please let me know.  I can post a file somewhere but I don't have a really convenient place right now.  If there is one, I'd love to know about it!  Nice to know at a glance if I'm logged in....
0 Kudos
5 REPLIES 5
speechles
Roku Guru

Re: Can Roku Apps Communicate with Web Services?

The short answer, if the roku couldn't communicate with web services, it wouldn't be a roku. It would be a DVR.

Is there a way you can ask your questions in a more non-theoretical way? Using actual real world examples, and such.

Plex plays media off your server. So you want a way to do that, or layer on top? If so, an app cannot access another app. You get one running app on your roku. If that is okay, then the next question is everything is possible within your imagination and skill.

But to ask for elaborate examples, this is why you cannot find them. If people can write apps like this, they already are doing this for a company that owns that code. This is why so many RGSA apps are closed source versus how open the SDKA apps were at first. Those first SDKA apps were built with licenses and initial code that required keeping that code open. This allowed everyone to catch up fast with each other. Now everybody wants to keep their secrets, to themselves. Even me.

Please ask again, when you either know more about what you intend to do, or how you intend to implement it.
0 Kudos
sarogersz
Visitor

Re: Can Roku Apps Communicate with Web Services?

Thanks for the confirmation on web services.  I have assumed the answer would be yes but am not yet  familiar enough with the API enough to determine if there are any restrictions on external services that can be used.  I have seen that the "external control" API seems to allow for outside programs to control a Roku app, but I didn't yet find any documentation (or google refs) on using Roku app as a UI to a program that executes elsewhere.  

We are building a product that is communicated with over a LAN using MQTT or http.  Similar to Plex, the goal is being able to use Roku to provide an OSD for our product, which is a service that controls hardware and provides data from database queries.  I just don't want to take anything for granted ahead of having an actual demo that proves out the model.  Almost everything on the web discusses Roku in terms of streaming channels. That is not our current goal.

We are starting this week on demo/prototype so can verify this before too long.

Thanks again.  I look forward to discussing the open source matter with you at some point if you'd like to engage offline.  I am interested in making open source contributions over time,but right now my focus is getting to market with a viable product.  We are developing our go to market  strategy and I think open source could be a component of that strategy,

Stephen
0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: Can Roku Apps Communicate with Web Services?

The networking abilities exposed from Roku BrightScript apps, outside of streaming APIs, are described at https://sdkdocs.roku.com/display/sdkdoc/roUrlTransfer.  This is the object a BrightScript app creates to start a HTTP/HTTPS request.  There is also https://sdkdocs.roku.com/display/sdkdoc/roStreamSocket which lets an application use raw sockets if HTTP is too limiting.
0 Kudos
ceannon
Visitor

Re: Can Roku Apps Communicate with Web Services?

I've been trying to get anything working with this topic but the device just crashes when I try to SetUrl.
It is almost like the function isn't available or I'm calling it from the wrong scope.
Bear in mind that I'm not a Roku developer. But, I have gotten everything else to work except the call to a web service.
Here's the offending code so far... any thoughts?

function getme() 
  request = CreateObject("roUrlTransfer")
  'request.SetPort(CreateObject("roMessagePort"))
  request.SetUrl("http://192.168.0.104:1880/query/2")
  html = request.GetToString()
  return html
end function
  
0 Kudos
ceannon
Visitor

Re: Can Roku Apps Communicate with Web Services?

I figured it out. I was calling it in the wrong place. I needed to use it in a Task.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.