Hi, I'm starting a new thread regarding this (old one here https://en.community.sonos.com/advanced-setups-229000/sonos-with-nodejs-my-attempt-33834) since that one grew out of hand.
I have made some major improvements to the simple HTTP API that I've built, and it now also comes with a pre-composed raspberry pi image that runs from a RAM-drive (based on AlpineLinux) for even simpler installation.
This software is useful for simple integration with home automation in mind, or for small hobby projects.
For more information, see http://jishi.github.io/node-sonos-http-api/
File issues at github https://github.com/jishi/node-sonos-http-api/issues
Have fun!
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.
Page 2 / 2
That sounds really odd. If the zones return an empty array, that means the system hasn't been discovered. Are you sure the application isn't constantly restarting for some reason? Try to get the output from stdout when running it, and file an issue at github for it, and I'll take a look.
Thanks so much for providing this API! It is really cool! I'm working on creating a node.js app with a scheduler to turn on my music automatically. I've noticed that occasionally when I give pause and resume commands to my sonos using my computer it will not do anything. If I try to hit the URL and do /zones or anything it will just return a blank array [] . Then, if I hit the play button on the actual sonos it will start working again and will receive commands. Is this a known issue or do you think something could be wrong with my sonos? My whole idea is based around my node server being able to wake up the sonos and start playing a specific playlist, so I would hope it would be possible.
Some of the latest addition include support for more TTS services. It now includes support for Microsoft Cognitive Services (Bing Speeh API), and the new AWS Polly service which has super natural sound in many supported languages. Seems like speech simulation has taken huge steps in the last few years.
Thank you I will !
However I can't get this to work anymore in the current version (using 1.1.5 ; but sorry, can't say exactly from which version onwards it broke). Grouping the two players still works, but when ungrouping I can't get the 'destination' player to keep playing what was originally on the 'source' player. It returns to its original content. (I guess something has changed about applyPreset of SonosDiscovery, but understanding the code is beyond my humble capacities...)
Jimmy can you bring the old behaviour back, pls ? (Or even better : include such a 'move' function in the API ?) Thanks !
This might be related to a change I made to fix another issue where "leave" didn't really do what one would expect. If you could file an issue on github regarding this, and also explain in detail what you actually want to achieve, I can take a look at it.
This was probably the change that broke your expected behavior: https://github.com/jishi/node-sonos-http-api/issues/245
In a previous version, I was able to "move" any music from one player to an other by grouping then after a few seconds ungrouping the first player (through sending appropiate presets). This used to work for all kinds of playlists, radio, even casting. (I had a handy button on my harmony remote, that triggered this action with a single click. Neat !)
However I can't get this to work anymore in the current version (using 1.1.5 ; but sorry, can't say exactly from which version onwards it broke). Grouping the two players still works, but when ungrouping I can't get the 'destination' player to keep playing what was originally on the 'source' player. It returns to its original content. (I guess something has changed about applyPreset of SonosDiscovery, but understanding the code is beyond my humble capacities...)
Jimmy can you bring the old behaviour back, pls ? (Or even better : include such a 'move' function in the API ?) Thanks !
However I can't get this to work anymore in the current version (using 1.1.5 ; but sorry, can't say exactly from which version onwards it broke). Grouping the two players still works, but when ungrouping I can't get the 'destination' player to keep playing what was originally on the 'source' player. It returns to its original content. (I guess something has changed about applyPreset of SonosDiscovery, but understanding the code is beyond my humble capacities...)
Jimmy can you bring the old behaviour back, pls ? (Or even better : include such a 'move' function in the API ?) Thanks !
In case anyone is interested, here is a new open-source offering built using jishi's node-sonos-discovery (which underlies node-sonos-http-api) and also available using a modified version of his pre-composed node-sonos-http-api raspberry pi image. Jishi, you enabled me to solve a major problem in my house!
"SonosAmpJuicePi"- solution for automatically powering on/off amps
https://en.community.sonos.com/advanced-setups-229000/sonosampjuicepi-solution-for-automatically-powering-onoff-amps-6756435
"SonosAmpJuicePi"- solution for automatically powering on/off amps
https://en.community.sonos.com/advanced-setups-229000/sonosampjuicepi-solution-for-automatically-powering-onoff-amps-6756435
I have made improvements to the Raspberry Pi image and added an auto-update feature. It will now install the latest stable release automatically without intervention.
The preset functionality is also improved significantly, and has now a presets-folder that will auto reload as soon as content changes. Since the whole /flash folder is exposed via samba, means that you can edit the files from your PC via regular filesharing. You can reach it via \\sonos or \\[IP of raspberry]
The preset functionality is also improved significantly, and has now a presets-folder that will auto reload as soon as content changes. Since the whole /flash folder is exposed via samba, means that you can edit the files from your PC via regular filesharing. You can reach it via \\sonos or \\[IP of raspberry]
Nice done. Installed this on raspberryPi Linux and works well. REST API is pretty nice and easy to use.
Thanks for all your hard work! Hopefully someone will integrate the Echo interface right into your Pi build, which would greatly simplify Echo voice control of Sonos.
Great to see you made some improvements. Can't wait to try out the new api.
Page 2 / 2
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.