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

[MINI-TUTORIAL] - simple http-api vd and Alexa HA Bridge setup


AutoFrank

Question

Hi,

 

Hopefully this will be replaced in a few months with direct control of Sonos from Alexa through a native skill supplied by Sonos themselves

In the meantime if you are using the http-api and have the HA bridge running then this may provide a stop gap for you if you require one

 

This compilation builds on work from a number of people including @morpheus75, @lennypenny, @matt1981 and others.

 

This solution has two parts and both will be needed for each zone you have.

1 - A simple sonos VD to provide limited control over a player. (volume, mute, play, pause, favorites and playlist access) There is no main loop code (as we are not displaying status) and should be light enough on your system

2 - The commands for the VD that will need to be entered into the bridge

 

There are three files included below

  1. The sonos VD ( required for step 1 below)
  2. A summary of the commands that with a simple find/replace will work for you (required for step 2 below)
  3. A outline of how to structure the entries in the HA bridge and what the alexa verbal commands are for each function (required for step 3)

 

Lets get started....

 

Step 1 

Import the VD and add a name (should match the name of player in sonos) IP address (of sonos-api) and Port (normally 5005)

You will need to customise the VD for your favorites and playlists.

Modify and confirm all is working, Make note of the VD id number

 

Screenshot of VD and a suggested icon

 

Please login or register to see this attachment.

     

Please login or register to see this image.

/monthly_2017_05/591c435741141_sonosalexa.png.e30a970ccfc2f4bfffe7f3918139178c.png" />

 

Step 2

Open Commands file attached in your preferred editor

  • Replace the text user with your email  (something like auto.frank%40gmail.com)
  • Replace the text password with your password, (something like JackBox$)
  • Replace the text hc2ipaddress with the ip of your HC2 (something like 192.168.1.45)
  • Replace the text VDid with the id of your VD created above (something like 245)

 

You will also need to modify the HA bridge entry names (#8 to # 13) to match the favorite and playlist changes you made in step 1

This will then give you the command strings that you will need for your system that need to be entered into your HA bridge

 

Step 3

Enter the commands into the HA bridge. @morpheus75 has an excellent video on how to add entries to the HA Bridge

I have added a link to the youtube video below - skip to timeslot 27:00 for the part that outlines how to add an entry to the bridge.

 

Files

Step 1 Virtual device : 

Please login or register to see this attachment.

Step 2 document: 

Please login or register to see this attachment.

Step 3 document: 

Please login or register to see this attachment.

Adding HA Entries: 

Please login or register to see this attachment.

 

Hope this will be of use to forum users

_f

Edited by AutoFrank
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi Guys,

I have just noticed that the Amazon Fire 7" and 8" is due to be launched on June 7th with "Alexa" on board.  I am not particularly interested in buying yet another tablet but will the Fibaro App run on the Fire? or is the Fire OS so different to Android?

 

Also, for the record, at the moments Amazon has dropped the Price of the Echo Dot to £44.99 for those wishing to buy some.

 

L

Edited by lennypenny
added 8" device
Link to comment
Share on other sites

  • 0

Good workaround - Such a shame you cannot associate echo(s) to rooms .

 

 I  have a dot in some of my main rooms so it is frustrating that"location" isn't a property the echo can communicate ... "turn on Sonos" could default to Sonos in current room so a much more natural voice interface.  Look forward to some real echo software updates from Amazon that recognise often used as a network of dots... rather than lots of rather short lived crude skills!

 

good solution for now thanks for sharing!

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.

×
×
  • Create New...