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


TUTORIAL - Sonos Remote VD (using node-sonos-api)


Recommended Posts

I reset the Nursery player last night and the debug stopped updating after just 17 minutes. I've just reset all players at the same time so I'll see how long they carry on for this time and see if they stop individually or all at the same time.

I'll check out your VD that monitors all the players and give that a go as well to see if it throws anything up.

 

Also, I recently had to reinstall everything from scratch on the Pi but had this same issue before so I'm guessing it's an HC2 problem rather than the Pi.

Edited by Desmo
Link to comment
Share on other sites

  • Topic Author
  • 49 minutes ago, Desmo said:

    I reset the Nursery player last night and the debug stopped updating after just 17 minutes. I've just reset all players at the same time so I'll see how long they carry on for this time and see if they stop individually or all at the same time.

    I'll check out your VD that monitors all the players and give that a go as well to see if it throws anything up.

     

    Also, I recently had to reinstall everything from scratch on the Pi but had this same issue before so I'm guessing it's an HC2 problem rather than the Pi.

    Hi @Desmo

    There is code in the first post but I use a StateTable to monitor lots of things and it's kinds messy, I need to rewrite it so it uses an array and iteration

     

    Here is a simpler approach and shouldn't take but a couple of minutes to put together

     

    Please login or register to see this code.

    Let me know how you get on

    -f

    Please login or register to see this attachment.

     

    Edited by AutoFrank
    Link to comment
    Share on other sites

    How strange is this.....all players stopped responding with updates at 17 minutes. They do still respond to any commands I send though, so control is still there, I just don't get any label updates.

    The all in one status VD is still running...will be interesting to see how long it runs for.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Desmo said:

    How strange is this.....all players stopped responding with updates at 17 minutes. They do still respond to any commands I send though, so control is still there, I just don't get any label updates.

    The all in one status VD is still running...will be interesting to see how long it runs for.

    Hi @Desmo

    Looks like you have a ghost in the machine :-(

    Could you check and post the following 

    • Version of sonos
    • Sonos player models 
    • Version of the api
    • Fw version of the hc2

     

    Any other anomalies on the hc2 you can see 

     

     

    EDIT - One other thing you could try is to delete the sonos VD and re-create (If not already tried)

    Could be a glitch when it as originally created and saving/updating is not clearing it...

     

    Thx 

    -frank 

    Edited by AutoFrank
    Link to comment
    Share on other sites

    I'll check all that info when I get home tonight. The multi-sonos VD stopped debugging after an hour.

    Link to comment
    Share on other sites

    @Desmo, did you try sending commands thru Chrome?

    I was playing around and no control was possible. Then I restarted Chrome and all worked again.

     

    Jim

    Link to comment
    Share on other sites

    Sending commands works just fine...it's getting the state updates that stop working. Things like current volume, playback state, track playing, etc.

    Link to comment
    Share on other sites

    Hey @AutoFrank, I got most working :)

    I edited the VD to have a volume slider and maybe when everything works I'm going to test this with @jompa68 ACWUT.

    The one thing I couldn't get to work is that the lblState is always empty.

    I changed it it playbackState and now it works!

     

    Just one question: how do I set the TTS to google??? voicerss works nice but I want to try google :)

     

    Thanks for this great VD.

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, jimicr said:

    Hey @AutoFrank, I got most working :)

    I edited the VD to have a volume slider and maybe when everything works I'm going to test this with @jompa68 ACWUT.

    The one thing I couldn't get to work is that the lblState is always empty.

    I changed it it playbackState and now it works!

     

    Just one question: how do I set the TTS to google??? voicerss works nice but I want to try google :)

     

    Thanks for this great VD.

     

    Hi @jimicr

     

    Glad you got it working :-)

    I found the slider very awkward even on the native sonos tablet app and that's why I used the volume buttons

    playbackState is correct. I pretified the state json and this shows you what you can display

    This is for a radio station

     

    Please login or register to see this code.

     

    I used to use VoiceRSS and recently switched to AWS Polly which is more natural sounding

    I've never used google but there is some info here that will probably help 

    Please login or register to see this link.

     (search for google about 2/3 way down the page)

    It looks like it doesn't need an api key

    Good luck with the google TTS - let me know how you get on...

     

    -f 

     

     

     

     

     

     

    Link to comment
    Share on other sites

    8 hours ago, AutoFrank said:

    Hi @Desmo

     

    Quote

     

    • Version of sonos - 7.1 (build 341637101)
    • Sonos player models - 2 x Play 1 as stereo pair, play 1, play 1, play 5
    • Version of the api - Not sure where to find version number but was only installed fresh last week so very recent
    • Fw version of the hc2 - v4.080

     

    Info in quote above :)

    Link to comment
    Share on other sites

  • Topic Author
  • 34 minutes ago, Desmo said:

     

     

    Info in quote above :)

     

    hi @Desmo

    Sonos is the same

    I'm running 4.110 on the HC2

    The api version is in the package.json file and is probably 1.2.6

     

    It sounds like the api is running okay and the only major difference is the HC2 fw

    I'll take a quick look in the HC2 changelog and see if there is any reference to a vd update issue

     

    Do you have any any plans to upgrade to 4.11 ?

     

    EDIT

    Did you try and delete the VD and recreate from scratch

    You could copy the code to your editor and then copy back...

     

    Edited by AutoFrank
    Link to comment
    Share on other sites

    Hey @AutoFrank,

     

    thanks for your reply, I can't find info about Google except that it might change from time to time. tried to remove te settings,json, make it an empty file ect...

    But that had the same outcome: I-need-to-reed-the-readme-about-an-API.mp3. So I'm sticking to voice rss for a while.

    Because by the looks of things Polly isnt available in the Netherlands.

     

    I looked in the debug but it doesn't hold all the same info as your prettified json. I'm missing the "stationName".

    Maybe that's a version issue, I installed the files yesterday as a prebuild Rpi image. maybe that's a bit behind :)

     

    Thanks for your help this far!

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, jimicr said:

    Hey @AutoFrank,

     

    thanks for your reply, I can't find info about Google except that it might change from time to time. tried to remove te settings,json, make it an empty file ect...

    But that had the same outcome: I-need-to-reed-the-readme-about-an-API.mp3. So I'm sticking to voice rss for a while.

    Because by the looks of things Polly isnt available in the Netherlands.

     

    I looked in the debug but it doesn't hold all the same info as your prettified json. I'm missing the "stationName".

    Maybe that's a version issue, I installed the files yesterday as a prebuild Rpi image. maybe that's a bit behind :)

     

    Thanks for your help this far!

     

    Hu @jimicr

    Crap .. yes polly is only available in the few places and its a surprise to get it in Ireland before others. These things are normally available on the Moon before they come to ireland.. :-)

     

    The precompiled prob contains and older version and I recall some changes around station name and artist

    If you feel up to it you could upgrade .. its reasonably fast if you follow my few steps.

     

    either way it good to get it working .. now comes the fun to see what else you can do

    I compile a morning greeting in our bedroom and the kids room that's a mixture of weather conditions, temp inside and date and time. I plan on expanding this to calendar events. I also have a coming home greeting (time, house temp and some other stuff and then resume all on the music) and leaving message (and actions - pause all) and a night greeting. .. lots of possibilities now that you have the control :-)

     

     

    Link to comment
    Share on other sites

    Turned out tht the prebuild Rpi is version 1.0.1,

    Just updated tot the latest git version 1.2.7 and had to change the syntax to get rid of the "+" -es :)

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 11 minutes ago, jimicr said:

    Turned out tht the prebuild Rpi is version 1.0.1,

    Just updated tot the latest git version 1.2.7 and had to change the syntax to get rid of the "+" -es :)

     

     

     

    @jimicr

    All good so  ??

    Link to comment
    Share on other sites

    4 minutes ago, AutoFrank said:

     

    @jimicr

    All good so  ??

    So far so good. Going to play further tomorrow. Have get out off bed at 4am and test a lot earhtleak switches in a hospital. 

    I know things are available late in Ireland most of the time, my dad was a corks man. 

     

    Goodnight

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, jimicr said:

    So far so good. Going to play further tomorrow. Have get out off bed at 4am and test a lot earhtleak switches in a hospital. 

    I know things are available late in Ireland most of the time, my dad was a corks man. 

     

    Goodnight

     

    @jimicr

    Cool... :-)

     

    Link to comment
    Share on other sites

    @AutoFrank...the api I'm using is 1.2.7. I will be upgrading the HC2 soon, possibly this coming weekend so will see if it makes a difference.

     

    I've deleted all but one of the VD's and once I get one running fault free I'll copy it across to more VD's one at a time.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Desmo said:

    @AutoFrank...the api I'm using is 1.2.7. I will be upgrading the HC2 soon, possibly this coming weekend so will see if it makes a difference.

     

    I've deleted all but one of the VD's and once I get one running fault free I'll copy it across to more VD's one at a time.

     

    @Desmo

    Let me know how it goes... this one is a real puzzler...

    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
    Reply to this topic...

    ×   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...