nfarina / homebridge-sonos

Sonos plugin for homebridge: https://github.com/nfarina/homebridge
153 stars 52 forks source link

Not detecting Sonos device #49

Closed Smith8154 closed 1 year ago

Smith8154 commented 7 years ago

I have one Sonos in my house and have been trying to set it up in this plugin for hours without any luck. This is the message I am seeing in my log file:

[1/23/2017, 11:32:54 PM] Registering accessory 'homebridge-sonos.Sonos'
[1/23/2017, 11:32:54 PM] ---
[1/23/2017, 11:32:54 PM] Loaded config.json with 1 accessories and 0 platforms.
[1/23/2017, 11:32:54 PM] ---
[1/23/2017, 11:32:54 PM] Loading 1 accessories...
[1/23/2017, 11:32:54 PM] [Sonos] Initializing Sonos accessory...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
┌────────────┐
│ xxx-xx-xxx │
└────────────┘
[1/23/2017, 11:32:54 PM] Homebridge is running on port 51826.
[1/23/2017, 11:33:15 PM] [Sonos] Ignoring request; Sonos device has not yet been discovered.
[1/23/2017, 11:33:15 PM] [Sonos] Ignoring request; Sonos device has not yet been discovered.
[1/23/2017, 11:33:18 PM] [Sonos] Ignoring request; Sonos device has not yet been discovered.
[1/23/2017, 11:33:20 PM] [Sonos] Ignoring request; Sonos device has not yet been discovered.
[1/23/2017, 11:33:23 PM] [Sonos] Ignoring request; Sonos device has not yet been discovered.

Here is my config.json file:


    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "xxx-xx-xxx"
    },

    "description": "This is an example configuration file with all supported devices. You can use this as a template for creating your own configuration file containing devices you actually own.",

      "accessories": [
        {
          "accessory": "Sonos",
          "name": "Sonos",
          "room": "Living Room"
        }
      ]
    }
lellis2k commented 7 years ago

Did you have any luck with this, I'm wondering how this connects to the speaker and how it knows which is the right one, is it "accessory" or "name" that has to be the actual name assigned to the speaker by the app?

favl commented 6 years ago

You have to provide the same room-name in the config.json as it's called in your Sonos App (Not the HomeKit room name). E.g.: HomeKit Room = Living Room Sonos App room = Room "room": "Room" will make it find it. Otherwise your config.json looks fine. Maybe you'd want to add "mute": true to actually make it do something ✌️