'node-ssdp API for Sonos is missing

I'm trying to figure out how to interact with the Sonos One using JavaScript; Sonos has developer guides and downloads for JavaScript but none of them work, because the node-ssdp project has been archived and is no longer available. Does anyone have a reference or a contact at Sonos through which we can access the devices directly? The cloud API works but is a lot heavier than talking to the devices directly over a LAN.



Solution 1:[1]

Okay, this ended up being a dumb question. Sonos apparently forked node-ssdp and hosted their own for a while, and the standard npm node-ssdp library works fine for this purpose.

Remove the node-ssdp dependency from the package.json, then:

npm i node-ssdp

Not everything works, because the Sonos samples in JS were written for very old versions of Node and have not been updated, but the base packages are fine.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joseph Ottinger