nfarina / homebridge-sonos

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

Expose sonos as "speaker" service? #44

Open anthonywebb opened 7 years ago

anthonywebb commented 7 years ago

Looks like attempts have been made at exposing sonos as both lightbulb and switch, but has anyone tried exposing it as a "speaker" service? Would that even work?

https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L2703

nfarina commented 7 years ago

I think this must be a new service - I hadn't noticed it until now! It looks appropriate, but I think the question is, does Siri support it yet?

anthonywebb commented 7 years ago

I dont know, but I'm willing to help you find out :)

nfarina commented 7 years ago

I just downloaded the latest (7.3) version of HomeKit Accessory Simulator and I don't see the service in there...I wonder where @KhaosT got it from :)

KhaosT commented 7 years ago

It's in the latest HAS release I believe, in order to support IP camera they have to expose that.

JotWee commented 7 years ago

there is HMServiceTypeSpeaker - any plans to modify the plugin? (and then additionally with manufacturer = SONOS)

bkonings commented 7 years ago

Hi, seems they moved the simulator into another download for xcode 8. Download Additional_Tools_for_Xcode_8.2 for the latest version. That simulator includes the speaker option.

Have not played with it yet since I don't have testdevice around.

norman-thomas commented 7 years ago

I just tried using Service.Speaker, sadly it only works with the Eve app, but not with the Home app (using iOS 10.2).

jak1502 commented 7 years ago

This plugin creates sonos as a service so can adapt to adding new speakers and includes scenes.

https://github.com/driskell/homebridge-sonos

drewcovi commented 7 years ago

Just tested with Siri and the emulator, definitely a mess right now. But I'd be surprised if they don't catch up within the next 6 months. Security Systems just started working with Siri this month.

stormshaker commented 7 years ago

Just saw the WWDC2017 announcement of the Speaker type in the Home app :)

roe1974 commented 6 years ago

any news here ?

roe1974 commented 6 years ago

as described in Apple HAP Specs .. speaker service should work in iOS 11 .... or not ? @nfarina .... did you tested it allready ? regards Richard

nfarina commented 6 years ago

I haven't tried it - if it works I'd love to add it to the plugin!

jp-lno commented 6 years ago

It seems that Speaker service work on iOS 11 but only with tierce app like Eve or Home by Matthias Hochgatterer. If you change service to Speakers, Apple Home show unrecognised accessory.

Hope Apple will activate speakers when HomePod will be available... I check all iOs Dev Beta but no way for the moment :/

See more about tierce App : https://github.com/ebaauw/homebridge-zp/issues/10

drewcovi commented 6 years ago

That post is nearly a year old. Has anyone run it in the simulator?

Fasani commented 6 years ago

Hi all,

The below fork is awesome enough, I just upgraded to it. Maybe it could just replace the current Sonos repo? https://github.com/driskell/homebridge-sonos

I had to uninstall homebridge-sonos and then npm install https://github.com/driskell/homebridge-sonos

Adjusted my config, removed my old speaker config from accessories and then added the following:

"platforms": [ 
    { 
        "platform": "Sonos",  
        "suffix": " Speakers",  
        "port": 50200,  
        "spotify_rincon_id": "2311",
        "scenes": {
            "Bob Dylan": {
                "playlist": "spotify:user:agent7even:playlist:24kmCXrDhl52XOrBtspqrc",
                "zones": ["Kitchen"]
            }
        }
    }
]

I got it up an running quickly, it auto discovered my devices and now I can say:

"Hey Siri, Bob Dylan". "OK, The Bob Dylan is on."

I created 5 voice commands using the config above, I created a new room called "Music", I moved all my switches to that room, here is how things are looking in the HomeKit app.

I can now create scenes in the HomeKit app and include any music switch I want, plus turning lights on and off etc.

Almost Perfect!

sonos

Fasani commented 6 years ago

@nfarina any thoughts on replacing the existing Sonos repo with this fork: https://github.com/driskell/homebridge-sonos

nfarina commented 6 years ago

@Fasani It looks great! I don't use Spotify and I still do use this repo even though it's extremely basic, so I don't want to replace it, however I would encourage @driskell to create his own non-forked repo and publish it to npm as a separate plugin. I will happily link to it from the README in this one!

wowthatisrandom commented 3 years ago

Anyone know if this still works?