-
-
Notifications
You must be signed in to change notification settings - Fork 145
Description
DeviceDiscovery doesn't work for a deployed web application. No Sonos Device is found on the network.
Expected Behavior
A Device should be discovered when searching for the Device in this instance using DeviceDiscovery.
Current Behavior
Currently works in my local environment, but I've deployed my application. When I run this on a chrome browser the device is never discovered.
My application uses a Next.JS + React stack with express.
Possible Solution
Not 100% clear on how this works and I am definitely new to this. Do I need to set an environment variable here? How would I configure the production version to properly discover devices connected to an account etc.
This is more of a question, not a proposed solution, but I would appreciate all the help I can get here. Not clear on how DeviceDiscovery is actually working without being tied to any account or auth.
Sample code or executed example
This piece of code never works in the production instance.
const findDevice = DeviceDiscovery({ timeout });
findDevice.on("DeviceAvailable", async sonosDevice => {
....
})
Versions (and Environment)
Node version: "14.x"
node-sonos version: "^1.14.1"
OS: MacOS