Diff: RokuM500Automation

Differences between version 3 and previous revision of RokuM500Automation.

Other diffs: Previous Major Revision, Previous Author

Newer page: version 3 Last edited on May 17, 2019 6:52 pm by PhilHollenback Revert
Older page: version 2 Last edited on May 16, 2019 9:09 pm by PhilHollenback Revert
@@ -29,9 +29,9 @@
 Rinse and repeat for the remaining buttons on the page, if desired: 
 * Prev 
 * Stop 
 * Next 
-* RptOff 
+* ~ RptOff 
 * Shutoff 
 !Volume Control 
 For volume control, you POST a number between 0 and 100: 
 {{{ 
@@ -47,47 +47,58 @@
 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&PresetName%3F2  
-=KZYX+Philo+CA+Public+Radio&PresetLocation%3F2= http%3A%2F%2Fkzyx .mcn .org  
-%3A4000%2Fkzyxlive&PresetNum%3F2=2&PresetName%3F3=KEXP+Seattle+Public+Radio  
-&PresetLocation%3F3=http%3A%2F%2Flive-mp3-28 .kexp.org%2F&PresetNum%3F3=3  
-&PresetName%3F4=BBC+6+Music&PresetLocation%3F4=http%3A%2F%2  
-Fbbcmedia.ic.llnwd.net%2Fstream%2Fbbcmedia_6music_mf_p&PresetNum%3  
-F4=4&PresetName%3F5=KQED+SF+Public+Radio&PresetLocation%3F5=http%3A  
-%2F%2Fstreams2.kqed.org%2Fkqedradio&PresetNum%3F5=5&PresetName%3F6  
-=RadioParadise.com+-+Eclectic&PresetLocation%3F6=http%3A%2F%2F  
-www.radioparadise.com%2Fmusiclinks%2Frp_128.m3u&PresetNum%3F6=6&  
-PresetName%3F7=KCRW+Eclectic+24&PresetLocation%3F7=http%3A%2F%2F  
-kcrw.streamguys1.com%2Fkcrw_192k_mp3_e24&PresetNum%3F7=7&PresetName  
-%3F8=Groove+Salad+-+SomaFM.com&PresetLocation%3F8=http%3A  
-%2F%2Fwww.somafm.com%2Fgroovesalad.pls&PresetNum%3F8=8&PresetName%3  
-F9=Indie+Pop+Rocks%21+-+SomaFM.com&PresetLocation%3F9=http%3A  
-%2F%2Fwww.somafm.com%2Findiepop.pls&PresetNum%3F9=9&PresetName%  
-3F10=Boot+Liquor+-+SomaFM.com&PresetLocation%3F10=https%3A  
-%2F%2Fsomafm.com%2Fbootliquor.pls&PresetNum%3F10=10&PresetName  
-%3F11=Trancebase.fm&PresetLocation%3F11=http%3A%2F%2Flw3.mp3.tb-  
-group.fm%2Ftrb.mp3&PresetNum%3F11=11&PresetName%3F12=  
-KBOO+Portland+Community+Radio&PresetLocation%3F12=http%3A  
-%2F%2Flive.kboo.fm%3A8000%2Fhigh.m3u&PresetNum%3F12=12&  
-PresetName%3F13=KAZU+Monterey+Bay+Public+Radio&PresetLocation%3  
-F13=http%3A%2F%2Ficecast.csumb.edu%3A8000%2Flive128&PresetNum%3  
-F13=13&PresetName%3F14=KCRW+WorldNews&PresetLocation%3F14=http%3A  
-%2F%2Fkcrw.streamguys1.com%2Fkcrw_192k_mp3_news&PresetNum%3F14=14  
-&PresetName%3F15=SomaFM+Christmas+Lounge&PresetLocation%3F15=http  
-%3A%2F%2Fsomafm.com%2Fchristmas256.pls&PresetNum%3F15=15&PresetName  
-%3F16=The+Current+-+Minnesota+Public+Radio&PresetLocation%3F  
-16=http%3A%2F%2Fcurrent.stream.publicradio.org%2Fkcmp.mp3&PresetNum%3F  
-16=16&PresetName%3F17=KAZU+Montery+Bay+Classical&PresetLocation%3F17  
-=http%3A%2F%2Ficecast.csumb.edu%3A8000%2Flivehd2high&PresetNum%3F17  
-=17&PresetName%3F18=KGO+AM+Talk+Radio&PresetLocation%3F18=http%3A%  
-2F%2F18533.live.streamtheworld.com%3A80%2FKGOAM_SC&PresetNum%3F18  
-=18" http://hardrckn /Forms/SoundBridgePresets_1 
+redirect%2FKAPAFM.mp3&PresetNum%3F1=1 http://192 .168 .1 .45 /Forms/SoundBridgePresets_1 
 }}} 
  
-also need a separate page detailing the internet radio stations which currently work correctly , and how to find the regular http version of streams
+*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]] 

version 3

Overview

I am a long-time owner of a 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

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

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 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 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 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 Tangerine, but I haven't had much luck with them over the years.

For a number of years, you could use the free 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 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. http://streams2.kqed.org/kqedradio.

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



Our Founder
ToolboxClick to hide/show