Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Martin
    @martin072
    your example is fine if Spotify is the only music source to use, but I use multiple like tunein, stingray etc. I know tunein and spotify are supported in the api, but I was just wondering if there was a way to send back the uri from the status message so it can resume playing again.
    Jimmy Shimizu
    @jishi
    @martin072 Not at the moment. Preferably it would help to have like a "preset snapshot" that you can feed back into the preset action. Then you can take the snapshot, do whatever you want for as long as you want, then just restore the snapshot. I already use it like that internally for the TTS, but it isn't built to be exposed as an http call, so it requires some re-engineering.
    Sean Phelan
    @Nerdvana2
    Hi Jimmy - let me start by adding my thanks to the long list above :) I've just installed and configured (on a Pi 2); most features are fine but I can't get 'clip' working.... I consistently get the following errors:
    2019-02-02T13:32:11.433Z ERROR
    TypeError: Buffer.alloc is not a function
    at FileTokenizer.AbstractTokenizer (/home/sean/node-sonos-http-api-master/node_modules/strtok3/lib/AbstractTokenizer.js:7:33)
    at new FileTokenizer (/home/sean/node-sonos-http-api-master/node_modules/strtok3/lib/FileTokenizer.js:23:28)
    at /home/sean/node-sonos-http-api-master/node_modules/strtok3/lib/index.js:38:24
    at tryCatch (/home/sean/node-sonos-http-api-master/node_modules/es6-promise/dist/es6-promise.js:409:12)
    at invokeCallback (/home/sean/node-sonos-http-api-master/node_modules/es6-promise/dist/es6-promise.js:424:13)
    at publish (/home/sean/node-sonos-http-api-master/node_modules/es6-promise/dist/es6-promise.js:398:7)
    at flush (/home/sean/node-sonos-http-api-master/node_modules/es6-promise/dist/es6-promise.js:128:5)
    at nextTickCallbackWith0Args (node.js:419:9)
    at process._tickDomainCallback (node.js:389:13)
    Any suggestions as to how to debug/fix/avoid? Thanks; Sean
    Sean Phelan
    @Nerdvana2
    Ah.... apparently Buffer.alloc was added in Node 4.5.0 and I was running v4.2.6 :( Trying the upgrade now.....
    Sean Phelan
    @Nerdvana2
    OK; upgrading node.js from the old "legacy" version fixed my problem. And, for anybody following the same path: "Use n module from npm in order to upgrade node". See https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version for more background.
    Lee Collings
    @leecollings
    Hey @jishi, it's been a while. I stopped using Domoticz and your tool, but now I've come back to it, but I'm having some issues trying to install, wonder if you wouldn't mind giving your two cents?
    Jimmy Shimizu
    @jishi
    @leecollings sure, what issues are you facing?
    @Nerdvana2 thanks for reporting, I'll see if I can fix it or update the documentation. Might make sense to start targeting a never version of node, 4 starts to be quite old now.
    JDogg016
    @JDogg016
    So different way of asking the same question. Is there a command to ungroup all speakers regardless of how they have been previously joined.
    Jimmy Shimizu
    @jishi
    @JDogg016 why can't you just send ungroup to every player?
    JDogg016
    @JDogg016
    I am running a home automation system that allows the ability to send an GET command upon the occurrence of a trigger. However, I am limited to one single command. I thought something like https://localhost:5005/ungroup would do the trick, but it does not seem to do so. Also, this could come in handy in the reverse. Imagine a single command to group all speakers in a home and a single command to ungroup all speakers.
    Jimmy Shimizu
    @jishi
    You can add your own actions that internally loop through the players if you know some Javascript
    freeyland
    @freeyland
    Would also like the in group all as it happens that speakers stay grouped when using Spotify connect. After message is played, speaker stays connected. When you want to continue playing with spotify onnect you need toungroup in Sonos app
    JDogg016
    @JDogg016
    Agreed. Throughout the day people will group/ungroup speakers. A perfect automation would have the goups reset themselves to their defaults each day by unpairing everything and then regrouping everything.
    Jimmy Shimizu
    @jishi
    A single ommand to group is already achievable with presets. I'm still not convinced that an ungroupall is as useful as you claim, because once thst exist there is always gonna be someone who want to ungroup everything except 1 player, and so on. If you want me to whip up a custom action that ungroups all players, I can do that and then you can customize it as much as you like.
    JDogg016
    @JDogg016
    I see your point about users warning a custom feature. However, while I too want to custom feature the idea that I can simply ungroup everything and then start over is almost as good a solution as a customer future without having to go through the headache of developing a custom feature.
    Sorry for the typos. Let’s try again, I understand about users wanting a custom feature to u group all except 1. It was simply the idea of being able to group all and ungroup all would be simpler than multiple commands. In other words, a user with multiple Sonos speakers can create many grouping possibilities. The ability to ungroup all relieves the user of trying to go in and figure out the complexity of groups created by other users.
    TheMegamind
    @TheMegamind
    I'm new to this and probably missing something obvious, but is there a way for a activate a Preset so that it either pauses or does not start the music for the group? I initially thought "state": "stopped", would do this but apparently I misunderstand its function.
    Jimmy Shimizu
    @jishi
    @TheMegamind I just checked the code, and it will just not start playback, but if its playing it will just leave it as is. Why can't you follow up with a pause call?
    Not really sure why you would group players if the intention isn't to play anything though?
    TheMegamind
    @TheMegamind
    We use a particular grouping at night when we go to bed. We then want to return to a different, default grouping overnight so that when my wife listens to her stations (invoking them via Alexa) early in the morning the various bedroom speakers are already excluded. The problem is that when we change to the AM default preset , the speakers that were paused by the PM default preset DO start resume playing whatever they were playing the night before. I've been testing it this morning and have been able to replicate the behavior. A pause command is impractical as my home automation system requires a 20 second delay between web requests.
    TheMegamind
    @TheMegamind
    Still unable to resolve the issue with presets resuming play on speakers excluded from the preset. Any thoughts?
    JDogg016
    @JDogg016
    Here's one that would be neat (if possible). I have a Beam connected to my Apple TV (4th gen). I also have an Gen 1 Amplify that I group with the Beam. When I use my apple tv remote, the volume of the Beam adjusts up and down without issue. Is there a way through the API I could simultaneously adjust the volume of the amplify? Even better, to adjust the volume of the amplify so that for every +2 on the Beam the increase is +1 on the amplify? For instance, if I increase the volume from 10 to 20 on the Beam (assuming the Amplify is at 5) the Amplify would go from 5 to 10?
    Jimmy Shimizu
    @jishi
    @JDogg016 You can add it with custom code, or if you write something own that listens to the web-hooks. It's an interesting idea though.
    It is similar to the lock-volumes function, but instead of setting the volume of the current player, you just set it on a different player, https://github.com/jishi/node-sonos-http-api/blob/master/lib/actions/lockvolumes.js
    JDogg016
    @JDogg016
    Oh I should have been a programmer instead of a lawyer (at least for this project)
    OscarAssael
    @OscarAssael
    Hello, i want to play a favorites song or playlist, but i don't know how the API SONOS do that.
    Jimmy Shimizu
    @jishi
    @OscarAssael just invoke /player name/favorite/name of favorite
    You might need to replace spaces with %20 depending on how you are invoking the url.
    In a browser the spaces are fine, but you should use %20 as escape sequence for a space in urls
    OscarAssael
    @OscarAssael
    If it's a specific song, can i play it?
    Jimmy Shimizu
    @jishi
    Favorites only trigger predefined favorites that you have created in the Sonos app.
    Not sure what you are asking
    OscarAssael
    @OscarAssael
    @jishi Thanks, right now i can to play my favorites songs.
    OscarAssael
    @OscarAssael
    i have other question, can i play a song from my hard disc?
    Jonathan Taaffe
    @jrtaaffe
    I see options to access and clear the queue. However, I'm wondering adding individual songs to the queue. Does the API have options that allow for browsing of my library and adding, re-ordering and removing from the queue without a predefined playlist?
    Manuel
    @epsmae

    Hi to all Sonos Fans,

    I have a question regarding album and track thumbnail for spotify playlists.

    I get the url for the album or playlist image over the "AbsoluteAlbumArtUri", which works fine.
    The track image is available on the "albumArtUri", however the ip address is missing on the current track.

    For the current track it looks like:

    albumArtURI":"/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4U93TIa0X6jGQrTBGTkChH%3fsid%3d9%26f

    And for the next track:
    albumArtURI":"http://<PlayerIP>:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4U93TIa0X6jGQrTBGTkChH%3fsid%3d9%26f

    I can prefix the player IP and port on the current track "AlbumArtUri" however I don't get the ip adress directly from the api. I can only extract it from the next track if one is available.

    Do I miss something? Thanks in advance for your support.

    David
    @dangenendt
    Hey Folks... Thanks for this great repo.
    But one question:
    Is there still a problem with TTS and Resuming playback of a playlist?
    I have a playlist started with the sonos app... now when im using TTS via "/MyRoom/say/Hello%20my%20friend", the playback stops, the tts gets outputed but after that nothing happens... the playlist is not restarted.
    Is this still an issue in the repo or did i make a mistake somewhere?
    Thanks!!
    Jimmy Shimizu
    @jishi
    @dangenendt Sorry for the late reply. It is supposed to work, but sometimes it is a bit brittle. If you are running the latest version, please provide more info. How did you install it? I haven't made a good job doing releases, most people just checkout the latest master branch from github.
    camilador
    @camilador
    Hi, I'm having issues testing the repo. I get the "no system has yet been discovered message". I have firewall disabled and I added a settings.json file with { disableIpDiscovery: true }. What else should I do? I have only one sonos speaker set up.
    Jimmy Shimizu
    @jishi
    @camilador Does the official Sonos controller work on the same machine? You need to provide more info, what are you running it on, your network setup etc
    Joe I/O
    @joeio
    Hey guys, anybody knows if you can specify a "linein" source inside a preset file? If so, what would be the JSON syntax?
    DaveMe81
    @DaveMe81
    Hi folks, since today I got an Sonos Beam. When I have TV as source for it, how can I get this status? When I do /room/state The is status is still the radio and paused playback.
    Jimmy Shimizu
    @jishi
    @DaveMe81 It should have status PLAYING and the uri should be set to the uri for line-in. If not, something seems broken.
    @joeio Yes, you can, see jishi/node-sonos-http-api#373 for details.
    MAX VORSTADT
    @MAXVORSTADT23_twitter
    Hello, dear Community ;) I would like to know, how i can add "GOOGLE MUSIC" credentials settings.json file? I need it for thumb up & thumb down ... thank you.
    MAX VORSTADT
    @MAXVORSTADT23_twitter
    hey, anybody knows how we can send a http-command for "Thumb up" & "Thumb down"? Cant understand why we can send commands like: shuffle, volume, group rooms, play, stop ... but we cant send commands for "likes" or "dislikes" but i can see the "thumb up & downs" Buttons in Sonos-UI ;( thank you
    Joe I/O
    @joeio
    @jishi Thanks, works perfect!