Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

[SCENE/VD] Minimote Custom Sonos Remote


AutoFrank
 Share

Question

Hi,

Here is a project to create a dedicated sonos room remote using a minimote remote control.

One of my kids asked if they could have a simple remote for the sonos player in their bedroom and this is what I created

I use the sonos-http-api but I'm sure it could be adapted for the other methods to control sonos with the HC2

 

This is what we are creating ...

 

Please login or register to see this attachment.

 

4 single press functions pre-programed 

  • Vol-, Vol+ are self explanatory
  • PlayPause - this cycles between play and pause. If no music is selected (like just after a player powers up)  then this button will select one of the radio favourites and start playing
  • Favorites - allows you to cycle through your radio favorites with each button press.(more on this later)

 

4 long press functions can be programed

  • These can be anything from starting a scene to selecting line in
  • In the remote I created, the ling press functions are Sat Line In, ungroup zone, start Bedtime scene and one empty.

 

Lets get started.....

The solution has two parts 

A scene to interpret the button press and direct them to a VD

Both scene and the VD are included at he bottom of the post. I use the one scene to interpret two minimote remote controls so adjust as you see fit

You only need one scene even if you use multiple remotes/rooms and but you will need one VD per room

 

Please login or register to see this image.

/monthly_2017_10/OfficeSonosRC.PNG.e48f194e31c1fd3b964820cec8cb1f24.PNG" />

 

If you don't use a HomeTable, please comment out this line wherever you see it

Please login or register to see this code.

SCENE CONFIGURATION

At the start of the scene amend with the ID of your minimote device id's to trigger the scene

Please login or register to see this code.

Adjust the references to the target Sonos RC VD(s)

Please login or register to see this code.

Adjust the reference (851 below) to the remote at the start of each remote block of code

Please login or register to see this code.

And that's it for the scene.....

 

VD CONFIGURATION

This VD has the 4 single press functions programmed and the place to program the 4 long button presses as well

Import the VD and add the IP address and port (probably 5005) of your sonos-htti-api and name and select room accordingly

Please login or register to see this attachment.

 

In the code for Button 1 to 4 amend the sonos player name to suit your player

Please login or register to see this code.

Button 4 contains a table with your favorites

Amend the name in quotes in the table to match your sonos setup

Please login or register to see this code.

fav1.PNG.d2c13648c86db182e5f0bdad0e4875f3.PNG

The code cycles through 5 favorites but can easily be adjusted to cycle through less or more

 

You also need a place to store the current favorite and I use my Hometable for this by adding a entry to the respective room

Add the highlighted entry to each room you have a remote for.

 

Please login or register to see this attachment.

 

Adjust the Button 4 code to match this reference

Please login or register to see this code.

If you don't use a HomeTable contact me and I'll help you create a global to do the same thing

 

The final part is then to add functions to Buttons 5 to 8 that represent long presses of buttons 1-4

You don't need to if you don't want to

 

I created these icons - There  not great and if somebody has another one I'll gladly swap out

59e3bf92afcd7_MinimotePlay3.png.7706a0d901b27453d612a3101b8cd43a.png   59e3c20ae45cc_MinimoteCentralScnene.png.3d588aa3a9bbb7874858dee51b50a65c.png

for VD                               for Scene

 

That's it :-) 

 

Hopefully this will be of use to a couple of forum users,

 

_af

 

Please login or register to see this attachment.

Please login or register to see this attachment.

Edited by AutoFrank
  • Thanks 1
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 1
  • Inquirer
  • 11 minutes ago, mrtn said:

    Any chance you could help with cycling through favourites without a HomeTable please?

     

    Something like the following should work - you'll need a global variable to store the fav (I've called it fav below)

     

    Please login or register to see this code.

    I'm not at home so I can't verify on my HC2 but it's probably close... :-)

    give it a whirl...

     

    Link to comment
    Share on other sites

    • 0
    On 10/15/2017 at 8:47 PM, AutoFrank said:

    Hi,

    Here is a project to create a dedicated sonos room remote using a minimote remote control.

    One of my kids asked if they could have a simple remote for the sonos player in their bedroom and this is what I created

    I use the sonos-http-api but I'm sure it could be adapted for the other methods to control sonos with the HC2

     

    This is what we are creating ...

     

    Please login or register to see this attachment.

     

    4 single press functions pre-programed 

    • Vol-, Vol+ are self explanatory
    • PlayPause - this cycles between play and pause. If no music is selected (like just after a player powers up)  then this button will select one of the radio favourites and start playing
    • Favorites - allows you to cycle through your radio favorites with each button press.(more on this later)

     

    4 long press functions can be programed

    • These can be anything from starting a scene to selecting line in
    • In the remote I created, the ling press functions are Sat Line In, ungroup zone, start Bedtime scene and one empty.

     

    Lets get started.....

    The solution has two parts 

    A scene to interpret the button press and direct them to a VD

    Both scene and the VD are included at he bottom of the post. I use the one scene to interpret two minimote remote controls so adjust as you see fit

    You only need one scene even if you use multiple remotes/rooms and but you will need one VD per room

     

    Please login or register to see this link.

     

    If you don't use a HomeTable, please comment out this line wherever you see it

    Please login or register to see this code.

    SCENE CONFIGURATION

    At the start of the scene amend with the ID of your minimote device id's to trigger the scene

    Please login or register to see this code.

    Adjust the references to the target Sonos RC VD(s)

    Please login or register to see this code.

    Adjust the reference (851 below) to the remote at the start of each remote block of code

    Please login or register to see this code.

    And that's it for the scene.....

     

    VD CONFIGURATION

    This VD has the 4 single press functions programmed and the place to program the 4 long button presses as well

    Import the VD and add the IP address and port (probably 5005) of your sonos-htti-api and name and select room accordingly

    Please login or register to see this attachment.

     

    In the code for Button 1 to 4 amend the sonos player name to suit your player

    Please login or register to see this code.

    Button 4 contains a table with your favorites

    Amend the name in quotes in the table to match your sonos setup

    Please login or register to see this code.

    Please login or register to see this link.

    The code cycles through 5 favorites but can easily be adjusted to cycle through less or more

     

    You also need a place to store the current favorite and I use my Hometable for this by adding a entry to the respective room

    Add the highlighted entry to each room you have a remote for.

     

    Please login or register to see this attachment.

     

    Adjust the Button 4 code to match this reference

    Please login or register to see this code.

    If you don't use a HomeTable contact me and I'll help you create a global to do the same thing

     

    The final part is then to add functions to Buttons 5 to 8 that represent long presses of buttons 1-4

    You don't need to if you don't want to

     

    I created these icons - There  not great and if somebody has another one I'll gladly swap out

    Please login or register to see this link.

       

    Please login or register to see this link.

    for VD                               for Scene

     

    That's it :-) 

     

    Hopefully this will be of use to a couple of forum users,

     

    _af

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

     

    Thanks @AutoFrank ! Much appreciated.

     

    Any chance you could help with cycling through favourites without a HomeTable please?

    Link to comment
    Share on other sites

    • 0

    Hi @AutoFrank I just made a start with something similar for our keyfob. 

    Will probably "borrow" some parts of your code! ;)

     

    Jim

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 minutes ago, jimicr said:

    Will probably "borrow" some parts of your code! ;)

    borrow away :-)

     

    Link to comment
    Share on other sites

    • 0

    Excellent! Cheers - I will give it a go and post back later

     

    Working code below - credit to @AutoFrank

     

    Please login or register to see this code.

     

    Edited by mrtn
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 hours ago, mrtn said:

    Excellent! Cheers - I will give it a go and post back later

     

    Working code below - credit to @AutoFrank

     

    Please login or register to see this code.

     

    super :-)

     

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...