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've taken a slightly different approach to this now....having one VD to control all speakers.

 

In general use I'd use the proper Sonos app to control speakers around the house, I only want it in HC2 so I can automate a few things when I want to. By using just the one VD I can still control each speaker individually by using a selectable global variable for the speaker name to switch to each speaker. I can do the same for grouping/ungrouping speakers also. This way I still have full automated control for scenes and other VD's as well and just one VD to keep up to date as new ideas and features become available.

 

It may also help me track down my issue.

Link to comment
Share on other sites

  • Topic Author
  • 1 hour ago, Desmo said:

    I've taken a slightly different approach to this now....having one VD to control all speakers.

     

    In general use I'd use the proper Sonos app to control speakers around the house, I only want it in HC2 so I can automate a few things when I want to. By using just the one VD I can still control each speaker individually by using a selectable global variable for the speaker name to switch to each speaker. I can do the same for grouping/ungrouping speakers also. This way I still have full automated control for scenes and other VD's as well and just one VD to keep up to date as new ideas and features become available.

     

    It may also help me track down my issue.

     

    Hi @Desmo

    Sounds like a good approach and will hopefully help expose the issue

    I don't really use a VD, apart from the one for all zones to see what is runnning periodically.

    my control is mostly for background automation, I find the presets very useful

     

     

    Link to comment
    Share on other sites

    And my new VD is......stopping after 17 minutes :/

    To the second.

     

    I think I'll go for the HC2 upgrade this weekend and see if that sorts it out.

    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, Desmo said:

    And my new VD is......stopping after 17 minutes :/

    To the second.

     

    I think I'll go for the HC2 upgrade this weekend and see if that sorts it out.

     

    Hi @Desmo

    The exact to 17 minutes is very strange indeed...

    I've been racking my brain on this one and have come up with two more possibilities

    - the api has logs, not sure which folder but I'm sure you'll find it if you poke around.

    - When it stops after 17 mins, if you reboot the Pi without touching the VD, does it start working again.

     

    -frank

    Link to comment
    Share on other sites

    Can't find anything of note in the logs and the VD doesn't work again after rebooting the Pi....surely it has to be an HC2 problem.

    Looks like an update is on the cars for the weekend.

    Link to comment
    Share on other sites

    @AutoFrank, The Google TTS wasn't included in the original Rpi image, it became available after updating the api. :)

    Just remove/ rename settings.json to get it to work

    Link to comment
    Share on other sites

  • Topic Author
  • 4 minutes ago, jimicr said:

    @AutoFrank, The Google TTS wasn't included in the original Rpi image, it became available after updating the api. :)

    Just remove/ rename settings.json to get it to work

     

    HI @jimicr

    Good catch .. how does it sound ?

    Link to comment
    Share on other sites

    For the dutch TTS it sounds like a female instead of  robotic.

    So it's an improvement for us :)

    Now I need to figure out how to make a play/pause button and change your weather scene from page 3 to get it work again.

     

    And the hardest job of them all: we have 1 Sonos device now, I need to convince the misses we absolutely need more ;)

    Link to comment
    Share on other sites

    So I restarted the VD today (still not updated HC2 yet) and it's been running for 45 minutes so far but get a feeling it will stop again soon.

     

    Anyhow, thought I'd pop up a pic of where my VD is at right now...

     

    Please login or register to see this attachment.

     

    Top area for information, L K B N are to select Lounge, Kitchen, Bedroom or Nursery for controlling them.

    Control and volume buttons are there, followed by some favourites scrolled with the "Next" button and chosen with "Select".

    Finally I have a section to Group/Ungroup players. Again, I can select the speaker using L K B N and then group or ungroup it.

    Link to comment
    Share on other sites

  • Topic Author
  • 13 hours ago, jimicr said:

    For the dutch TTS it sounds like a female instead of  robotic.

    So it's an improvement for us :)

    Now I need to figure out how to make a play/pause button and change your weather scene from page 3 to get it work again.

     

    And the hardest job of them all: we have 1 Sonos device now, I need to convince the misses we absolutely need more ;)

     

    @jimicr

     

    Yes, yes.. you definitely need more :-)

    I bought our first one (ZP100) in the US in 2006 and it is still working...

    Since then our sonos family has grown to 14 (mix or play1,3,5, zp80, zp90 ) and my original ZP100 is still working well. Not sure I can say that for many other 'devices' i have bought down through the years..

     

    The play/pause should be okay as there is a playpause command in the api - /room/playpause

    There is also separate play and pause commands

     

    Is this what you were looking for

    Link to comment
    Share on other sites

  • Topic Author
  • 10 minutes ago, Desmo said:

    So I restarted the VD today (still not updated HC2 yet) and it's been running for 45 minutes so far but get a feeling it will stop again soon.

     

    Anyhow, thought I'd pop up a pic of where my VD is at right now...

     

    Please login or register to see this attachment.

     

    Top area for information, L K B N are to select Lounge, Kitchen, Bedroom or Nursery for controlling them.

    Control and volume buttons are there, followed by some favourites scrolled with the "Next" button and chosen with "Select".

    Finally I have a section to Group/Ungroup players. Again, I can select the speaker using L K B N and then group or ungroup it.

     

    @Desmo

    That's looking very well :-)

    This is one of the things I really like about the api, lots of options and you can really customise a VD to suit your needs and system

    .. no stopping you now... assuming that that upgrade solves the 'stopping issue'

     

    if you happy to do at some time, it might be worth exporting the VD to this or another post with a brief explanation....

     

    Link to comment
    Share on other sites

    2 hours ago, AutoFrank said:

    if you happy to do at some time, it might be worth exporting the VD to this or another post with a brief explanation....

    I'll do that maybe once I've got this problem sorted :->

     

    So my VD ran for 52 minutes this morning before stopping so I've put a sleep command in the main loop to slow down the updates and so far it's been going for over 2 hours. I was just wondering if the amount of information was creating some kind of overload. If it keeps on running I'll slowly reduce the main loop delay until it remains stable.

    Link to comment
    Share on other sites

  • Topic Author
  • 3 minutes ago, Desmo said:

    I'll do that maybe once I've got this problem sorted :->

     

    So my VD ran for 52 minutes this morning before stopping so I've put a sleep command in the main loop to slow down the updates and so far it's been going for over 2 hours. I was just wondering if the amount of information was creating some kind of overload. If it keeps on running I'll slowly reduce the main loop delay until it remains stable.

     

    @Desmo

    How is the HC2 memory and CPU during all of this ?

    I've had several of these running concurrently with no issue

    Link to comment
    Share on other sites

    I don't think they're particularly stressed to be honest....RAM is at a constant 46% and CPU is between 0-30% with the odd spike to 50-60% and very occasional spike to 80%.

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, Desmo said:

    I don't think they're particularly stressed to be honest....RAM is at a constant 46% and CPU is between 0-30% with the odd spike to 50-60% and very occasional spike to 80%.

     

    Please login or register to see this attachment.

     

    @Desmo

    That's ruled that out .... 

    You could easily do a sleep up to 2 seconds.

    How is your network activity  ?

    .. running out of ideas here :-) hopefully the 4.11 upgrade will work

     

    BTW - I had a bit of a HC2 crash this morning (first in nearly 2 years) ..

    .. lucky I had good backups and a copy of all my source code in Zerobraine

    might worth making sure you're covered before the upgrade..

    Link to comment
    Share on other sites

    It's a shame there's not an easy way to export code for all scenes and VD's.

     

    edit.....VD stopped after 2.5 hours. Going to increase the sleep time and see if it runs longer.

    Edited by Desmo
    Link to comment
    Share on other sites

  • Topic Author
  • 10 minutes ago, Desmo said:

    It's a shame there's not an easy way to export code for all scenes and VD's.

     

    edit.....VD stopped after 2.5 hours. Going to increase the sleep time and see if it runs longer.

     

    hi @Desmo

     

    I believe you can with Krikroff's HC2 Tookit application but I have never tried the export.

    Details can be found here 

    Please login or register to see this link.

    Link to comment
    Share on other sites

    I've seen the toolkit about but never used it before. Just installed it and it's pretty good, got all my stuff backed up now so should anything catastrophic happen I've got some form of external backup :->

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