nfarina / homebridge-sonos

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

Solution to the speaker service like HomePod? #62

Open morphix9 opened 5 years ago

morphix9 commented 5 years ago

Hey guys, I see that there have been numerous forks of homebridge-sonos, unfortunately most of them having no proper description. Is there a fork/solution that finally exposes the Sonos as a 'speaker' in HomeKit (like they do for HomePod). Have the latest updates (iOS 12,...) bring anything new? Having heard of any success in the last year...

nfarina commented 5 years ago

Hi! I don't believe it is possible to expose a service that resembles anything like HomePod unfortunately.

It's true that HomeKit does have a service called "Speaker" but it's more for things like Cameras and Doorbells, not for representing a device that can play music.

Lots more discussion here: https://github.com/ebaauw/homebridge-zp/issues/36

iRayanKhan commented 5 years ago

@nfarina This person did it: screen shot 2018-11-20 at 11 58 41 pm Link: https://github.com/KhaosT/HAP-NodeJS/issues/504

nfarina commented 5 years ago

I looked through that thread and I can't find conclusive evidence that this "Speaker" service will allow you to accomplish anything with Siri. If HomeKit Accessory Simulator allows you to make a Speaker and if iOS understands commands to play/pause and control volume, that would be very promising. You could try it and see? I can try it myself a bit later.

iRayanKhan commented 5 years ago

Haven't had a chance to dabble with the service, but it should act just like a HomePod, AirPort Express, or Apple TV, in which when pressing it, it will toggle said music player. Now my theory of this being translated is my Onkyo speakers down stairs have AirPlay 1 and using HomeBridge and this speaker service, it will toggle it and allow volume adjust over Wi-Fi. Instead of using a a light bulb to do the volume. Siri can toggle AirPlay speakers.

iRayanKhan commented 5 years ago

In that persons scenario he must have used a fake-plugin, but his repo's don't show him making this public. If anyone else browsing trough this thread has a fake-water-valve plugin please link me if not I can make one.

iRayanKhan commented 5 years ago

@nfarina after doing some research, Yes the speaker should add it's self to HomeKit and pressing the icon will just toggle the speaker. The way this would probably integrate into plugins would be to add the speaker accessory and using the speakers IP address send play/pause commands.

{
      "platform": "AP2Speaker",
      "Ip": "10.0.0.6",
     "name":"Back Yard Speakers"
    }

And will expose it's self in control centre as a speaker that can be controlled.

morphix9 commented 5 years ago

@nfarina after doing some research, Yes the speaker should add it's self to HomeKit and pressing the icon will just toggle the speaker. The way this would probably integrate into plugins would be to add the speaker accessory and using the speakers IP address send play/pause commands.

{
      "platform": "AP2Speaker",
      "Ip": "10.0.0.6",
     "name":"Back Yard Speakers"
    }

And will expose it's self in control centre as a speaker that can be controlled.

So this is it? Just adding this to the platform part of the config?

iRayanKhan commented 5 years ago

No, the plugin itself needs to be updated. I was just saying if there was an AirPlay2/Speaker plugin, that would be it’s config and do it over IP.