pjjameso Posted December 28, 2023 Posted December 28, 2023 (edited) Used the demo and it worked fine for six days. Purchased NS and now does not discover any of the sonos players. Have discovered, deleted, reinstalled, booted Polisy multiple times to no avail. Have attached log, any thoughts? ST-Sonos_12-28-2023_115350-AM.zip Edited December 28, 2023 by pjjameso
bpwwer Posted December 28, 2023 Posted December 28, 2023 No idea what happened. The trial is simply a different license, you get the same plug-in for both the trial and the production version. I'd suggest deleting and then re-installing as it seems confused over what speakers have been discovered.
pjjameso Posted December 28, 2023 Author Posted December 28, 2023 Thanks Bob, Have done this multiple times even using different slots. Have rebooted Polisy serveral times before and after the NS was installed. Im stumped at this point. Not sure if the following entries from the log would help 2023-12-28 11:14:37 error: POLY: Queue Message Queue Processor process error caught. Currently processing 1: TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at initializeCustomParams (/var/polyglot/pg3/ns/000db95d9b48_10/st-sonos.js:165:35) at Interface.<anonymous> (/var/polyglot/pg3/ns/000db95d9b48_10/st-sonos.js:78:3) at Interface.emit (node:events:513:28) at Interface._onMessageQueued (/var/polyglot/pg3/ns/000db95d9b48_10/node_modules/polyinterface-v3/lib/Interface.js:416:16) at dataq.process (/var/polyglot/pg3/ns/000db95d9b48_10/node_modules/polyinterface-v3/lib/Queue.js:28:26) at /var/polyglot/pg3/ns/000db95d9b48_10/node_modules/polyinterface-v3/lib/Queue.js:37:16 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2023-12-28 11:14:38 error: POLY: Node db87bfe not found 2023-12-28 11:14:38 error: POLY: Node 8b16614 not found 2023-12-28 11:14:39 error: POLY: Node c0ea726 not found 2023-12-28 11:14:39 error: POLY: Node c0ea726 not found 2023-12-28 11:14:39 error: POLY: Node afa4fca not found 2023-12-28 11:14:39 error: POLY: Node afa4fca not found 2023-12-28 11:14:39 error: POLY: Node afa563a not found 2023-12-28 11:14:39 error: POLY: Node afa563a not found 2023-12-28 11:14:39 error: POLY: Node c0ea6ed not found 2023-12-28 11:14:39 error: POLY: Node c0ea6ed not found 2023-12-28 11:14:39 error: POLY: Node 8b16614 not found 2023-12-28 11:14:39 error: POLY: Node 8b16614 not found 2023-12-28 11:14:39 error: POLY: Node c0ea6ed not found 2023-12-28 11:14:39 error: POLY: Node c0ea6ed not found 2023-12-28 11:14:39 error: POLY: Node a0916de not found 2023-12-28 11:14:39 error: POLY: Node a0916de not found 2023-12-28 11:14:39 error: POLY: Node c0ea726 not found 2023-12-28 11:14:39 error: POLY: Node c0ea726 not found 2023-12-28 11:14:39 error: POLY: Node 8041df3 not found 2023-12-28 11:14:39 error: POLY: Node 8041df3 not found 2023-12-28 11:14:39 error: POLY: Node 822d6a0 not found 2023-12-28 11:14:39 error: POLY: Node 822d6a0 not found 2023-12-28 11:14:39 error: POLY: Node afa4fca not found 2023-12-28 11:14:39 error: POLY: Node afa4fca not found 2023-12-28 11:14:39 error: POLY: Node afa563a not found 2023-12-28 11:14:39 error: POLY: Node afa563a not found 2023-12-28 11:14:39 error: POLY: Node 8041df3 not found 2023-12-28 11:14:39 error: POLY: Node 8041df3 not found 2023-12-28 11:14:39 error: POLY: Node a0916de not found 2023-12-28 11:14:39 error: POLY: Node a0916de not found 2023-12-28 11:14:39 error: POLY: Node db87bfe not found 2023-12-28 11:14:39 error: POLY: Node db87bfe not found 2023-12-28 11:14:42 error: NS: undefined 2023-12-28 11:14:43 error: NS: undefined 2023-12-28 11:14:47 error: NS: undefined 2023-12-28 11:14:48 error: NS: undefined 2023-12-28 11:14:49 error: NS: undefined 2023-12-28 11:14:50 error: NS: undefined 2023-12-28 11:14:55 error: NS: undefined 2023-12-28 11:14:57 error: NS: undefined 2023-12-28 11:14:59 error: NS: undefined
bpwwer Posted December 28, 2023 Posted December 28, 2023 Please increase the log level to debug for the node server and try restarting it. It seems like it things some nodes were created but they no longer exist and that's why it reports all those errors. Deleting and re-installing should clear out any old configuration/data, but without seeing the log with debug enabled, it's impossible to tell what is really happening.
pjjameso Posted December 29, 2023 Author Posted December 29, 2023 Thanks for taking a look at this... ST-Sonos_12-29-2023_74022-AM.zip
bpwwer Posted December 29, 2023 Posted December 29, 2023 After reviewing the log, the code and running various experiments. It appears that it is unable to discover any speakers on the network. There doesn't appear to be anything wrong with the plug-in. Based on the nodes not found messages, it looks like it did discover speakers at one time but that it can no longer see them.
pjjameso Posted December 30, 2023 Author Posted December 30, 2023 (edited) Thanks Bob, Only thing that changed was the latest update to pg3x. Could that be the cause? Interesting in the log it has found the MAC addresses and the names of the units but will not create the individual nodes. Wonder if there is someway I could create them manually. If someone has a working system would you mind letting me know the node information in Polisy so I can create the node there. Update: was able to add Family Room to Polisy but didnt create node in PG3x., guess its a one-way deal only. Interesting that if in Polisy I set the volume to a level the request shows up in PG3x log as being received. 2023-12-30 15:18:31 debug: NS: Message Received: { command: { address: '8b16614', cmd: 'SVOL', value: '17', uom: '51', query: {} } } 2023-12-30 15:18:31 error: POLY: Node 8b16614 not found The log actually shows the family room unit playing and does indicate the actual volume level when I change it up or down. ST-Sonos_12-30-2023_23418-PM.zip Edited December 30, 2023 by pjjameso
bpwwer Posted December 31, 2023 Posted December 31, 2023 No, you can't create the nodes manually. It's strange that it does seem to get updates from the speakers but can't seem to discover them to create the nodes. I don't have any Sonos devices and took over the node server so that it wouldn't get removed but I don't really have any way to test things. It should be starting another process that handles the communication and discovery and maybe it's not running? I see the same type of behavior but since I don't have anything that can be discovered, I expect that. In the log it shows: 2023-12-30 14:33:35 info: NS: Discovering 2023-12-30 14:33:35 error: NS: undefined 2023-12-30 14:33:35 info: NS: No Zones Discovered And the second line "NS: undefined" seems to be saying it's not getting a proper response from the helper program that discovers the speakers. There are quite a few other folks that run this node server but I don't have access to the names of those that have purchased it. 1
pjjameso Posted December 31, 2023 Author Posted December 31, 2023 (edited) Bob, Appreciate your help. Guess Im out of luck at this point. One more question, any idea who is supporting the Sonos NS, perhaps they would be willing to add the join/leave/group functionality. Thought I saw you name attached to this NS in the store too. Edited December 31, 2023 by pjjameso
bpwwer Posted January 1 Posted January 1 There's one more thing you can try. I posted an update to your ticket and I'll copy the same here. When the node server is installed, it should download the node-sonos-http-api package and install it in the node server's home directory. Then when the node server starts, the first thing it does is spawn a process to run node-sonos-http-api. If that process isn't running, the node server will not be able to discover any speakers and will not create any nodes. You can verify that the node-sonos-http-api process is running with a web browser or from the Polisy command line. From a web browser http://<polisy_ip_address>:5005 On my system I get the following response: Quote {"status":"error","error":"No system has yet been discovered. Please see https://github.com/jishi/node-sonos-http-api/issues/77 if it doesn't resolve itself in a few seconds."} Which seem correct given that I don't have Sonos devices. From the Polisy command line, running "ps auxww | grep sonos" should show node-sonos-http-api is running. If the helper is not starting/running, I would suggest deleting the node server and then do a fresh install of the node server. If that doesn't work, UDI will have to review the installation logs and investigate why the helper isn't starting.
bpwwer Posted January 1 Posted January 1 On 12/31/2023 at 5:59 AM, pjjameso said: Bob, Appreciate your help. Guess Im out of luck at this point. One more question, any idea who is supporting the Sonos NS, perhaps they would be willing to add the join/leave/group functionality. Thought I saw you name attached to this NS in the store too. I have "ownership" of the Sonos NS as well. The original author abandoned it and I converted it to work with PG3. But, since I don't have any Sonos devices, I'm only able to provide limited support and can't really make enhancements. If someone else does want to take over updating and supporting it, they can contact me about doing so.
pjjameso Posted January 3 Author Posted January 3 (edited) Thank you, as expected here is the result... Of course the log show all of my sonos units but none in Polisy.... Ugh ST-Sonos_1-3-2024_43455-PM.zip Edited January 3 by pjjameso
bpwwer Posted January 4 Posted January 4 Yeah, the helper node-sonos-http-api program isn't running. My guess would be that it didn't get installed properly but there's nothing I can do to check that. Someone from UDI would have to remotely access your system and check the install logs.
bmercier Posted January 4 Posted January 4 (edited) I reproduced this problem on eisy. If you are familiar with ssh, here's how to resolve the problem. The instructions below are used to complete the installation of node-sonos-http-api, which is used by the ST-Sonos plugin. From a command prompt, ssh to your eisy: ssh admin@eisy.local Default password is admin Confirm that node-sonos-http-api is now working: curl http://localhost:5005/ You should be getting a connection error. Go to the folder where plugins are installed: cd /var/polyglot/pg3/ns Check the list of plugins installed: ls -l You need to know in what slot the plugin is installed. You can check in the PG3 Dashboard. Go to the plugin folder: cd <uuid>_<slot> The easiest is to copy paste the folder name you obtained from ls -l in step 3 Go to the node-sonos-http-api folder: cd node-sonos-http-api Install node-sonos-http-api pre-reqs: sudo npm install Start node-sonos-http-api: npm start Restart the plugin from the PG3 dashboard. It should now be working. When rebooting eisy, it appears that node-sonos-http-api is also restarted. You can use these instructions until a permanent fix is made to the plugin. UPDATE: Node server has been fixed, uninstall and reinstall the plugin. You may have to restart PG3 if you are reinstalling before the update is refreshed from the store. Edited January 4 by bmercier Plugin has been fixed. 1 1
Solution bpwwer Posted January 4 Solution Posted January 4 I just publish a new version with a change to do the npm install as part of the node server install. If you re-install version 1.0.11 it should work now. 1 1
pjjameso Posted January 5 Author Posted January 5 Thanks Bob! You are awesome, works perfectly again.
bpwwer Posted January 5 Posted January 5 Thanks for letting me know it works, sorry it took so long to figure out the problem.
Recommended Posts