View Source:
RokuM500Automation
You are viewing an old revision of this page.
View the current version.
!!!Overview I am a long-time owner of a [[https://en.wikipedia.org/wiki/SoundBridge|Roku Soundbridge M500]] internet radio. You may have never heard of these devices - the Soundbridge was Roku's first foray in to streaming before they moved to video streaming. While the M500 was discontinued many years ago, it still works and in fact I use mine daily to listen to the radio. This post covers my attempts to understand how to control the M500 remotely, and provides some info about how to make one of these old devices work in the modern age. !!!Network Control The m500 is a device that sits on your network and can play internet radio streams. It runs a very simple web interface, so presumably it should be easy to automate. I spent an hour in the chrome dev console figuring out how to GET and POST data from and to it. The great thing is there is no authentication on the web interface, so you can just interact with it directly. I miss the early 2000s. You don't even need to bother with https (well actually, the m500 just can't do https). More on that later in the section about setting up internet radio stations on this device. Anyway, after futzing around with the dev console in chrome and with curl, I was able to figure out the following remote control commands. I leave them on this page in case someone else finds this useful. !!!Commands For reference, here's what the m500 main screen looks like: [[https://i.imgur.com/XocLisx.png|https://i.imgur.com/XocLisx.png size=50%]] Control of the device can be done by faking a click on each of the buttons, or submitting a value in the case of the volume control. This can all be done via standard http POST commands. First, the basic commands. The number after "x=" can vary, I think it's actually the x location on the button image where the mouse was clicked. That doesn't matter since each image only controls one function. !Play {{{ curl --data Play.x=1 http://192.168.1.45/Forms/SoundBridgeNP_1 }}} !Pause {{{ curl --data Pause.x=1 http://192.168.1.45/Forms/SoundBridgeNP_1 }}} !Others Rinse and repeat for the remaining buttons on the page, if desired: * Prev * Stop * Next * ~RptOff * Shutoff !Volume Control For volume control, you POST a number between 0 and 100: {{{ curl --data gPageVolume=80 http://192.168.1.45/Forms/SoundBridgeNP_2 }}} !!Presets Presets work the same basic way, although the format of the data you send is more complex. Here's what the presets page looks like: [[https://i.imgur.com/1mEFxLj.png|https://i.imgur.com/1mEFxLj.png size=50%]] And here's what a curl command to set the presets looks like: {{{ curl -v --data "PresetName%3F1=KAPA+FM+Hilo&SR_WP_PS_PLAY=Play&PresetLocation %3F1=http%3A%2F%2Fplayerservices.streamtheworld.com%2Fapi%2Flivestream- redirect%2FKAPAFM.mp3&PresetNum%3F1=1 http://192.168.1.45/Forms/SoundBridgePresets_1 }}} *HOWEVER* note that if you send that command to your Soundbridge, it will set the first preset and ERASE the rest. To really use this command, you need to send your entire set of presets in one command. Here's a [[http://www.hollenback.net/writings/set-roku-presets.txt|full curl command]] that sets all 18 presets at once. Setting the presets is important because it's the only realistic way to set up a Soundbridge to play internet radio streams these days. I'll provide more details on that later in this article and a list of radio stations I currently use. !!!Remote Control !!Phone App Prior to this investigation, I found an android app that allows you to remote control a Soundbridge on your network. So to be fair, I actually knew it was possible to do this, I just didn't know the details. That app is [[https://rcforsb.blogspot.com/|Remote for Soundbridge]] and it works great. I recommend you use it (and donate a few bucks to the developer!). !!Wifi IR Blasters Another remote control idea I'm planning on trying is a [[https://www.amazon.com/YTF-Conditioner-Controller-Compatible-Smartphone/dp/B07H46LJZK|wifi IR blaster]]. These things sit in your living room and fire remote control commands to devices. I have one of these but I haven't tried it yet. One reason I'm interested in this is it would allow me to easily switch on/off my Soundbridge and my receiver in concert. More to follow on this in the future. !!!Finding Stations A huge challenge with these old devices is finding music and streaming stations to play on them. The initial allure of the Soundbridge was that it could easily stream music from iTunes via Apple's proprietary DAAP protocol. That stopped working many years ago, as iTunes changed the protocol (and probably eventually abandoned it, for all I know). There are alternative open source DAAP servers such as [[https://github.com/snorp/tangerine|Tangerine]], but I haven't had much luck with them over the years. For a number of years, you could use the free [[http://www.radioroku.com|Radio Roku]] service to set your Favorite stations on your Soundbridge. This is separate from the 16 preset stations, and allows a very large number of stations to be stored on the Soundbridge. Unfortunately, I haven't been able to get Radio Roku to work for the last few years, because it relies on a java applet to talk to your Soundbridge. I eventually just gave up and stuck with using presets. In practice, 16 stations is enough for me. !!Finding unencrypted stations Another big issue with internet radio streams is that they have been moving to https, particularly in the last few years. Typically you feed your Soundbridge a .m3u playlist file url for a station. The Soundbridge downloads that file and then attempts to connect to the streams listed in it. Those streams have largely switched from http to http, so if you give a Soundbridge the m3u file, it won't play anything. Luckily, there's a workaround that generally works. As an example, let's look at the KQED live stream. If you look on their [[https://www.kqed.org/radio/audio-help/|audio help page]], you can find that url: http://streams.kqed.org/kqedradio.m3u . That url *will not work* with a Soundbridge. If you look in the file, you will see something like this: {{{ https://streams2.kqed.org/kqedradio }}} and as I said previously, https will not work with Soundbridge. Luckily, in all cases I've checked I've found that the servers still support http. Thus instead of using the m3u url in your Soundbridge presets, point at a http version of the stream instead, i.e. <code>http://streams2.kqed.org/kqedradio</code>. One thing you can't fix is when internet radio stations decide to move behind proprietary player apps. I've seen this happen a few times over the years, but so far I've been able to find reasonable alternative. !!My Stations As of May 2019, I have the following 16 stations programmed and working on my Soundbridge: |=Station|=URL| |KAPA FM Hilo|http://playerservices.streamtheworld.com/api/livestream-redirect/KAPAFM.mp3| |KZYX Philo CA Public Radio|http://kzyx.mcn.org:4000/kzyxlive| |KEXP Seattle Public Radio|http://live-mp3-128.kexp.org/| |BBC 6 Music|http://bbcmedia.ic.llnwd.net/stream/bbcmedia_6music_mf_p| |KQED SF Public Radio|http://streams2.kqed.org/kqedradio| |~RadioParadise.com - Eclectic|http://www.radioparadise.com/musiclinks/rp_128.m3u| ---- [[CategoryGeekStuff]]
Please enable JavaScript to view the
comments powered by Disqus.
HollenbackDotNet
Home Page
Popular Pages
All Categories
Main Categories
General Interest
Geek Stuff
DevOps
Linux Stuff
Pictures
Search
Toolbox
RecentChanges
RecentNewPages
What links here
Printable version
AllPages
RecentChanges
Recent Changes Cached
No changes found
Favorite Categories
ActionPage
(150)
WikiPlugin
(149)
GeekStuff
(137)
PhpWikiAdministration
(102)
Help/PageList
(75)
Help/MagicPhpWikiURLs
(75)
Blog
(69)
Pictures
(60)
GeneralInterest
(44)
LinuxStuff
(38)
Views
View Page
View Source
History
Diff
Sign In