Giter VIP home page Giter VIP logo

node-red-contrib-better-sonos's People

Contributors

rolf-m avatar shbert avatar torinnguyen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-better-sonos's Issues

Uncaught exception

Getting a crash.

22 Oct 16:09:02 - [red] Uncaught Exception:
22 Oct 16:09:02 - TypeError: Cannot read property 'destroy' of null
at C:\Users\max.node-red\node_modules\node-red-contrib-better-sonos\sonos\SonosHelper.js:74:27
at C:\Users\max.node-red\node_modules\sonos\lib\sonos.js:795:7
at Parser. (C:\Users\max.node-red\node_modules\sonos\node_modules\xml2js\lib\xml2js.js:489:18)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Object.onclosetag (C:\Users\max.node-red\node_modules\sonos\node_modules\xml2js\lib\xml2js.js:447:26)
at emit (C:\Users\max.node-red\node_modules\sax\lib\sax.js:624:35)
at emitNode (C:\Users\max.node-red\node_modules\sax\lib\sax.js:629:5)
at closeTag (C:\Users\max.node-red\node_modules\sax\lib\sax.js:889:7)
at Object.write (C:\Users\max.node-red\node_modules\sax\lib\sax.js:1436:13)

play mp3

Hi Im traying to play a local .mp3 file that i have created from google tts
i have made a http endpoint but when i try to play it on sonos it says cant play wrong coded

im getting Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Seek"

Code heritage

Hi,
thanks for taking up this project. And thanks for taking my code fork.
I was not the author, but had the same problem, the original author doesn't seem to react any more. I needed the volume "up and down" functionality and was able to code this.

Could you check/implement the grouping and ungrouping, this seems to be implemented in the underlaying node-js, but I was not able to implement this.
I'm not the good coder, but will continue to help where I can :-)
By the way, you didn't copy my "get_volume" node, to read the current volume setting.

Regards, Rolf

Add Spotify Tracks

Hi There, thank you for maintaining this node!

I have been tinkering around a bit and find myself getting errors when adding songs from spotify.

So from my sonos Controller it looks like this:

image

Then I went to node and got myself the status from the current playlist which looks like this:
image

So I thought to add a track from Spotify, the only thing to do would be executing a node that plays a song from this uri: x-sonos-spotify:spotify%3atrack%3a20nDYyRNL4u5Kukzy1pL6z?sid=9&flags=8224&sn=2

But when I Try this the only result is:

image

Do you have any Idea, what I am doing wrong?

Wrong results of SONOS Status

Without changing anything on SONOS side (playing different songs, stopping or starting something or changing the volume of any speaker) I receive different results by the node.

Sometimes i get this wrong result:
{"topic":"","payload":"4WRJh9","_msgid":"85e03441.410e28","track":{"title":"4WRJh9","artist":null,"album":null,"albumArtURI":null,"position":0,"duration":0,"albumArtURL":null,"uri":"x-rincon-mp3radio://http://addrad.io/4WRJh9"},"volume":27,"normalized_volume":0.27,"state":"stopped","muted":false}
This is a radio stream.

sometimes i get the correct result:
{"topic":"","payload":"Folge 2: Mama geht zur Arbeit - Teil 1","_msgid":"ea301846.8655e8","track":{"title":"Folge 2: Mama geht zur Arbeit - Teil 1","artist":"Leo Lausemaus","album":"Folge 2","albumArtURI":"/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0I2lEtYmvaoq6LqKN3Cuiv%3fsid%3d9%26flags%3d8224%26sn%3d3","position":92,"duration":149,"albumArtURL":"http://192.168.178.58:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0I2lEtYmvaoq6LqKN3Cuiv%3fsid%3d9%26flags%3d8224%26sn%3d3","uri":"x-sonos-spotify:spotify%3atrack%3a0I2lEtYmvaoq6LqKN3Cuiv?sid=9&flags=8224&sn=3"},"volume":37,"normalized_volume":0.37,"state":"paused","muted":false}
This is the latest song in the player in status "paused".

Is there an issue with sonos players which are sometimes linked to a group?

Search not working

When pressing the "search Button", no device is found/show.
Manualy entering the Sonos ID will let me control the device, but randomly not only the chosen but all sonos devices are addressed

Cannot join group unless leader / co-ordinator is known

I have a flow configured so that I can ask Alexa to join a zone to another that is already playing, however, this will generate the following error if the zone isn't the group leader / co-ordinator:

Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"

It's not really possible to keep track of the leader, especially if I use another flow to leave the group as the leader then passes to another unpredictable zone.

Seek position

Great plugin, started using it few days, no issues so far. Really looking forward to the playlist and TTS functionality.

One thing that I see it not able to do and not on the todo list is the seek position of the song (like to be able to set it with with a slider, right now I can only read and display it)

Add grouping function

First, thank you for this great module.
It miss only a group function. Is there a way to do this?

Specify which sonos device with input parameter

I'd like to use one control node to control any of my sonos speakers. I'd like to be able to specify which speaker as an input parameter to the control node. So { topic: "B8-E9-37-83-10-26:2", payload: "playpause" } or { topic: "Sonos One", payload: "playpause" } should affect the specified speaker.

Using command join for grouping

How can I use the join function?
I was able to use leave but not the join function.
Would it be possible to provide an example (code)

kind regards
Andreas

Volume Down not working

Volume Down control not working. In file sonos-control.js line 128 change " _volfkt = "vol_up"; " to " _volfkt = "vol_down"; "

installation error

4 Nov 22:28:22 - [info] Installing module: node-red-contrib-better-sonos, version: 0.1.9
4 Nov 22:28:56 - [info] Installed module: node-red-contrib-better-sonos
4 Nov 22:28:59 - [info] Added node types:
4 Nov 22:28:59 - [info] - node-red-contrib-better-sonos:better-sonos-config
4 Nov 22:28:59 - [info] - node-red-contrib-better-sonos:better-sonos-control : SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode (line:4)
4 Nov 22:28:59 - [info] - node-red-contrib-better-sonos:better-sonos-status : SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode (line:4)
4 Nov 22:28:59 - [info] - node-red-contrib-better-sonos:better-sonos-queue : SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode (line:4)
4 Nov 22:28:59 - [info] - node-red-contrib-better-sonos:better-sonos-get-queue : SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode (line:4)
4 Nov 22:29:28 - [info] Stopping flows
4 Nov 22:29:28 - [info] Stopped flows
4 Nov 22:29:28 - [info] Waiting for missing types to be registered:
4 Nov 22:29:28 - [info] - better-sonos-status

better sonos config can't find sonos amp

When hitting search button to find series number for my sonos amp nothing appears. Ive punched in my serielnumber manually but when running my flow i just get the message "device not found"

Does the songs config not work with the songs amp ?

Sonos Control Volume_set command not working

i have a problem getting the vol_set cmd to work. i try to implement a slider vor the volume inside my dashboard. i looked over the code and dont really understand what is meant by

//Use payload values only if config via dialog is empty

i just connect the slider with the sonos control which is set to vol_up but the code under line 224 is not working as the data is in the payload and not in the node and node.volume_value is empty and never filled with any value

Config node not appearing in node red palette after installation

I have installed the package and I have 4 of the 5 nodes available in the node red palette, however the config node is missing which means I can't use the other ones. Looking in the palette manager the config node has a dashed square box next to it, indicating that there is some problem. When the node red service starts on my Rasp Pi 3 there do not seem to be any errors except for their being an issue with [serial port] is this relevant or not ?

Group functionality

Add a feature where you are able to form, disband or joining devices to groups.

Documentation

Forgive me if I've just somehow missed the link, or I'm looking in the wrong place, but where is the latest full documentation for node-red-contrib-better-sonos.
I'm on version 0.1.21 which appears to be the latest version but the info page for the better-sonos-queue node still says "This node is currently under development to make it more user-friendly"
I'm particularly interested in how to fill in the "Song URI" field.
We've not seen an update for over a year, is this project dead now?

Join stops NodeRed

After pushing the Join command, NodeRed stop with this errors:
Found Sonos device B8-E9-37-5F-A7-72:6 at 192.168.20.47 1 Nov 18:47:57 - [red] Uncaught Exception: 1 Nov 18:47:57 - TypeError: Cannot read property 'find' of null at getTopology (/home/pi/.node-red/node_modules/sonos/lib/sonos.js:619:31) at /home/pi/.node-red/node_modules/sonos/lib/sonos.js:1077:7 at Parser.<anonymous> (/home/pi/.node-red/node_modules/xml2js/lib/parser.js:303:18) at emitOne (events.js:116:13) at Parser.emit (events.js:211:7) at SAXParser.onclosetag (/home/pi/.node-red/node_modules/xml2js/lib/parser.js:261:26) at emit (/home/pi/.node-red/node_modules/sax/lib/sax.js:624:35) at emitNode (/home/pi/.node-red/node_modules/sax/lib/sax.js:629:5) at closeTag (/home/pi/.node-red/node_modules/sax/lib/sax.js:889:7) at SAXParser.write (/home/pi/.node-red/node_modules/sax/lib/sax.js:1436:13) at Parser.exports.Parser.Parser.parseString (/home/pi/.node-red/node_modules/xml2js/lib/parser.js:322:31) at Parser.parseString (/home/pi/.node-red/node_modules/xml2js/lib/parser.js:5:59) at Object.exports.parseString (/home/pi/.node-red/node_modules/xml2js/lib/parser.js:354:19) at Request._callback (/home/pi/.node-red/node_modules/sonos/lib/sonos.js:1062:12) at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13)

This is my sketch:
[{"id":"aaeabd.e374654","type":"better-sonos-control","z":"ecc2de2b.8c965","confignode":"164fdcf2.cb59bb","name":"","mode":"","track":"","volume":"","volume_value":"","x":480,"y":160,"wires":[]},{"id":"ca4a84ea.beff28","type":"inject","z":"ecc2de2b.8c965","name":"","topic":"Bathroom","payload":"join","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":290,"y":160,"wires":[["aaeabd.e374654"]]},{"id":"164fdcf2.cb59bb","type":"better-sonos-config","z":"","name":"Bedroom","serialnum":"B8-E9-37-5F-A7-72:6","ipaddress":""}]

Where could the problem be?
Andrea

Play webradio with a button

Hi folks
Is it somehow possible to direct play a webradio? I tryed with entering a stream in the queue node, but there ocures a error.

Thanks for your suport and good work!

image

Control

Where can I find an example of the json object to pass to the control node? You mention better documentation, where can we find said documentation? Thank you!

Return format of Status Node, enhancement

It would be nicer to have all the status within the msg.payload
Right now, only the current track is returned in payload. This is not so nice if you want to use the other information for further processing. Payload can carry a complete object, so it would be nicer to have everything in there

Queued song doesn't get metadata

Trying to inject (as a string) an URI into Queue and it doesn't work.

Direct Play - says request success, but the song is not queued
Queue Next - says request success and basically stops playing

Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Seek"

Hi,
When using a Sonos Queue node with a https reference to localhost (using the IP of the host) I get below error. If I point to a http address on the internet for playing a MP3 doorbell file it works fine - I would however like to have it locally to minimize latency and not to be dependent on internet connection. I can access https://1.2.3.4:8123/local/doorbell/doorbell1.mp3 in the browser and the MP3 doorbell plays fine as expected.

Hope you can help. Thanks a lot :)

KR
Torben

18 Dec 12:28:40 - [info] [better-sonos-queue:33a738af.d038b8] Direct play URI: https://1.2.3.4:8123/local/doorbell/doorbell1.mp3
18 Dec 12:28:40 - [error] [better-sonos-queue:33a738af.d038b8] Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Seek"
Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Seek"
at Request._callback (/config/node-red/node_modules/sonos/lib/sonos.js:216:23)
at Request.self.callback (/config/node-red/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (/config/node-red/node_modules/request/request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/config/node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
18 Dec 12:44:16 - [info] Stopping flows

Volume up/down not working

The volume up and down functions are not working.
You are giving back the wrong variables to handleSonosApi function. you are transmitting "_volume" but you should transmit "volume_val" wich would be the new calculated target volume value.
please correct...

Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1

Hi all,

I am using "Sonos Control" but it seems I am getting the following errors for the respective commands:

"Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Pause""
"Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Next""
"Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Previous""
  • Play
  • Stop
  • Mute
  • Unmute
  • Volume Up
  • Volume Down

seem to all work. Just the others throw error messages:

22 Sep 20:49:46 - [error] [better-sonos-control:7997c9b0.f7e378] Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Next"
Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Next"
    at Request._callback (/home/pi/.node-red/node_modules/sonos/lib/sonos.js:216:23)
    at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/pi/.node-red/node_modules/request/request.js:1163:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/pi/.node-red/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)

Do you have any ideas what the problem could be and how I can solve it?

Thanks!

Christoph

Again: Error HTTP response code 500 ... pause

Hello!
I got the HTTP response error 500 as well. See picture.
B85636EF-A69D-4FF2-B4E6-FF05B2F98A40

I got several Sonos Players as you can see. Only the newer devices like the Sone One (with Alexa) or the Sonos Play:5 throw the error. I think the command to send a playpause to them is incorrect.
Older players like the Sonos Play:1 works fine.

Can you help please?

Regards,
David

Switch Group (Media Room) to TV in

Is it possible to switch a group to TV in (optical in of #playbar)?
It would be a great feature to select input options for devices like playbar, play 5 or others

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.