-
Hi hklages, I'm using your nodes andi It's working fine. I have the following situation with the volume control: With two buttons I can increase or decrease the volume via group.adjust.volume (payload: +3 or payload: -2). The volume is also adjusted accordingly However, I always get the following error:
Am I making a mistake here or is there another explanation for the error output? Best wishes Ralf |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi Ralf, it executes this and that command only works when send to the coordinator (the boss player). |
Beta Was this translation helpful? Give feedback.
-
@svrooij Stephan, all group.* commands are special: First the coordinator is identified and then the command is send to that coordinator - similar to you "manager" implementation but without using subscriptions instead just a soap request ahead. As the volume is adjusted (so the command works) it could be a time out or because of multiple messages. The command needs some time as several players are involved (how many?) @ralfhille What version of sonos-plus do you use? How many player do you have? Can you send your flow and the output of "household.get.groups". |
Beta Was this translation helpful? Give feedback.
-
Hi hklages, What a hell - while compiling an example I noticed that the connections between the affected nodes were sometimes duplicated. I couldn't see that visually at first. I use node-red version 2.2.0 and node-red-contrib-sonos-plus version 6.3.0 on a Raspberry Pi 4 Model B Rev 1.4. In any case, this resulted in a message being sent two or three times to the sonos node. The sonos node then issued the error message. After I recreated the connections between the nodes, the whole thing now looks very good. Only if you now press the button as wildly comes from time to time again the error message. I use the sonos nodes in a very generic scenario. So there is only one universal sonos node which is used by all flows. The incoming message to the sonos node always contains a playerName and all other parameters for the desired action.
But enclosed are the example flows.Here you only have to create one sonos config node. In the node "db_scene_ba" the real playerName must be entered, to which the commands refer. Regarding the duplicate connections between the nodes I will ask Google if there is a bug in node-red or what could be the reason. Thanks a lot |
Beta Was this translation helpful? Give feedback.
-
Hi Ralf. Great - so we have one root cause for the error message. Looking at your flows: It is very(!) uncommon to write a JavaScript function into a global variable and then call that as a function. That may cause additional messages. I suggest that you replace all these calls with standard Node-RED nodes such as change, switch, template, link. Weiter gehts in Deutsch, das ist schneller: Beispiele: Bei "simulate a incoming mqtt message" brauchst du wahrscheinlich switch nodes und vielleicht auch die template node. In der switch node gibe es expressions (JSONATA), mit dem man die split Function nutzen kann. Hier sind weitere Bespiele komplexe Bespiele. Du findest sie in Node-RED import examples/node-red/flows/ neben denen von Node-RED allgemein. Gern helfe ich - direkte email ([email protected]). Update 2022-03-10: Im Falle von Szenen könnte man in einer global variablen den Szenennamen (als key) und die Szenenparameter (alles im JSON) speichern und dann abrufen. Das ist "üblich". Grüße aus der Nähe von München, Henning |
Beta Was this translation helpful? Give feedback.
-
Hello Henning, I agree with you about the design of my implementation. This is the first approach to better manage and change the huge amount of sensors, buttons and scenes. If I need some advice I will contact you with a private mail. Thanks again for the support. Ralf |
Beta Was this translation helpful? Give feedback.
Hi hklages,
What a hell - while compiling an example I noticed that the connections between the affected nodes were sometimes duplicated. I couldn't see that visually at first.
I use node-red version 2.2.0 and node-red-contrib-sonos-plus version 6.3.0 on a Raspberry Pi 4 Model B Rev 1.4.
In any case, this resulted in a message being sent two or three times to the sonos node. The sonos node then issued the error message.
After I recreated the connections between the nodes, the whole thing now looks very good.
Only if you now press the button as wildly comes from time to time again the error message.
I use the sonos nodes in a very generic scenario. So there is only one universal sonos node…