INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How To make a D.I.Y. single button remote  (Read 2116 times)

djfalstaff

  • Recent member
  • *
  • Posts: 43
How To make a D.I.Y. single button remote
« on: January 08, 2017, 11:35:32 am »

I answered a forum post earlier about using the REST service built into JRiver.
It got me thinking that it's probably a feature that most people would never touch.
In the connected world we now live in, it's getting easier to take advantage of such a powerful feature
so I figured I would give everyone a concrete example of what you can do with some of the things you already own.

We are going to make a single button remote for JRiver using a Flic Button from https://flic.io/
The device is a bluetooth button that you program using an app on your phone or tablet.
It has three activation events.
Single click, Double Click, and Hold
We want to preform the following actions.
Single click - play a playlist
Double click - Skip a track
Hold - Pause Playback

First we need to make sure the web service is running.
We can do that by going to Open Tools Then Options in menu.
Select Media Network from the left hand tree menu.
Turn on the Media Server.
Then click on the Open with web browser link under the MSWS (web service) menu
It should open up a page in your web browser with an address similar to
http://localhost:52199/MCWS/v1/

This page contains the list of commands you can send JRiver using it's REST service.
There are many examples commands for you to try.
Notice the word localhost in the web address?
Your PC knows how to get the right address for the JRiver REST service using that special keyword.
The issue is you might want to send these commands from another machine on your network.
To make that happen, we need your current IP Address for your PC where JRiver installed.
The easiest way is use Windows Key + R, then type cmd in the box and hit Ok
type ipconfig in the command prompt and hit enter.
Your current IP address is listed there.
Mine is 192.168.1.127
replace the word localhost in the address bar with the IP address you looked up like the following.

http://192.168.1.127:52199/MCWS/v1/

You should see the same information listed before when the web address was pointing to localhost.
This page teaches you how to build a URL to navigate to that will perform the desired action.

Let's create the URL for the single click event
First we need to query for all the playlists
We can do that by typing the following in a browser

http://192.168.1.127:52199/MCWS/v1/Playlists/List

Find the listing for the playlist you want to work with and get the ID number
My playlist has an ID of 324084034.

http://192.168.1.127:52199/MCWS/v1/Playback/PlayPlaylist?Zone=-1&ZoneType=ID&PlaylistType=ID&Playlist=324084034

Open the Flic app on your phone or tablet.
Pick the click event for your flic button and then Internet Request as the action.
Copy the url into the URL field and save.

Now let's do the double click event

http://192.168.1.127:52199/MCWS/v1/Control/MCC?Command=10003

Open the Flic app on your phone or tablet.
Pick the double click event for your flic button and then Internet Request as the action.
Copy the url into the URL field and save.


Finally, let's do the hold event

http://192.168.1.127:52199/MCWS/v1/Control/MCC?Command=10000

Open the Flic app on your phone or tablet.
Pick the hold event for your flic button and then Internet Request as the action.
Copy the url into the URL field and save.

We have our flic button stuck to the fridge in the kitchen to have some simple controls available while cooking.
Logged

astromo

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2251
Re: How To make a D.I.Y. single button remote
« Reply #1 on: January 08, 2017, 01:01:25 pm »

Cool piece of tech.

Nice.
Logged
MC33, Win10 x64, HD-Plex H5 Gen2 Case, HD-Plex 400W Hi-Fi DC-ATX / AC-DC PSU, Gigabyte Z370 ULTRA Gaming 2.0 MoBo, Intel Core i7 8700 CPU, 4x8GB GSkill DDR4 RAM, Schiit Modi Multibit DAC, Freya Pre, Nelson Pass Aleph J DIY Clone, Ascension Timberwolf 8893BSRTL Speakers, BJC 5T00UP cables, DVB-T Tuner HDHR5-4DT
Pages: [1]   Go Up