-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for input selection #8
Comments
v0.2.23 provides basic support for Next Track and Previous Track. A new Track Change characteristic now shows in Eve (at the group service), with Up and Down buttons. It shows value 0, and it automatically resets to this value, 0.5 seconds after Up or Down has been pressed. Please let me know what you think. I've been struggling badly with the best way to provide this functionality in HomeKit. It would seem like HomeKit doesn't like configuration changes at all, so I cannot dynamically enable or disable Next and Previous buttons, like the Sonos app. Also, dynamically setting the maxValue property causes HomeKit to reject the whole configuration. I might "wrap" the tracks, i.e. move to track 1 when pressing Up while playing the last track, and move to the last track when pressing Down when playing the first track. I also added a Volume Change characteristic in v0.2.24, similar to Track Change to increment or decrement the volume. If you define a HomeKit scene in Eve setting this characteristic, you can activate it from a HomeKit automation in Apple's Home app, or assign it to a Stateless Programmable Switch button. I can now control my Sonos (Volume Up, Volume Down, Next Track, Previous Track) using a Trådfri remote! |
Hey, so I just got another Hue Dimmer Switch to use this volume feature. Works great when set up with the Eve app, however a push of the button only increments the volume with 1%. I'm not able to set it differently in the Eve app either, so is this a limitation of homebridge-zp, the Eve app, or Homekit itself? Thanks for an awesome plugin. |
The 1% is hard-coded in homebridge-zp. I haven't really tested if this is the best value. I'm no fan of yet another config.json setting, but this might be a good one. My idea was to use this in combination with |
Interesting! I don’t use the homebridge-hue plugin since I just use the built in HomeKit support, but I might just try that now, since that’s exactly what I wanted to do (the long press to keep increasing volume) |
I like the suggestion of implementing a I have an extra Hue Dimmer in the kitchen to control some non Hue lights, and facilitate Sonos play/pause controls. Currently my finger get sore having to click to ~20 times to crank up the volume when I'm in the mood for some louder music. |
As a suggestion for how to allow for a configurable % increase/decrease values, without resorting to another config.json value, how about allowing the Volume Change characteristic to accept a greater range of values? Currently setting the characteristic to 1 increases the volume by 1%, and setting to to -1 decreases the volume by 1%. Allowing for a greater range of values means, for example, you could set the Volume Change characteristic to 10 to increase the volume by 10%, or -23 to decrease the volume by 23%. This gives greater flexibility over a defined config.json value, and would allow for different accessories and scenes to change the volume with different granularity. |
Could do. Eve would display a slider instead of the Up/Down controls for Volume Change, but you would be able to set a larger step size in a HomeKit scene or automation. While taking bigger steps, you’d still need a press per step.
I’m not sure what you mean here. This cannot be implemented in homebridge-zp. The Hue dimmer switch sends a message every second while a button is held. deCONZ sends a notification for each message to homebridge-hue. Normally homebridge-hue issues a Long Press to HomeKit on the first notification. With the |
Whoops sorry, I misunderstood what you were suggesting. I thought you were thinking of implementing support for Hue Dimmers in homebridge-zp. On re-reading this, I now see this is not what you meant. |
- Allow values -10 to 10 for _Volume Change_, see ebaauw/homebridge-zp#8.
Change default (undocumented) `resetTimeout` to cope with larger range of allowed values for _Volume Change_, see #8.
In v0.3.8 |
Tested and it works great. Thanks for the quick addition! |
Please also include the new Amp for the TV input |
Happy to do so, but I need the model number, see #58. |
OK, it looks like it is: ZPS16 |
Add _TV_ characteristic for Amp, see #8
@ebaauw |
I still haven’t figured out how to expose input selection to HomeKit. I hoped I could use the Television service for that, but that seems like a dead end. It only seems to be visible in Apple’s Home app, not in other HomeKit apps. Also, it cannot be bridged, so you’d need to pair each zone separately to HomeKit, rather than just a single homebridge Bridge accessory. I could copy the mechanism, but than you’d select input 1, 2, 3, ... without any description. While that would work well in automations, it’s a lousy user interface, that wouldn’t pass the waf. I could create a write-only custom characteristic for each input, but that result in a lot of new custom characteristics, none of which would be supported by Siri nor by Apple’s Home app. It’s probably cleaner to expose an instance of a standard service per input (as Television does for the descriptions), so each input uses their own copy of the same characteristic (probably just Name and Active or something). That would lead to an additional tile in Apple’s Home app per input per zone. |
Actually, using a single number characteristic might be the least worse alternative. When combined with Track and/or a new string characteristic that displays the input, you would get feedback from Eve which number corresponds to which input. To use this in Apple's Home or Siri, you could create a (series of) HomeKit scenes (in Eve) to set the input to the numeric value corresponding to the input (from Siri and/or Home). Will try and give it a go this weekend. |
Is there a way to switch TV-Input On/Off on the new Sonos AMP ? TV shows up, but it is only text |
Not sure what you mean by switching the input On/Off? You select an input or play/pause the zoneplayer (through the On attribute of the Sonos service). Currently, there's no way to select any input (other than previous/next track). Once I'll have figured out how to expose input selection, I'll definitely include the TV input for devices that support it. Note that the TV characteristic reflects whether there's a signal on the digital audio input (presumably from the TV) and Track reflects whether the input is set to the digital audio. I don't know the new AMP, but the PlayBar doesn't support Play/Pause while on TV input. Consequently, there's no way to switch the Sonos service on or off while the input is set to TV. You can double-check whether the Sonos app displays Play/Pause for the new AMP, but I don't think it does. |
OK, I see, I mean selecting the TV input. Starting eg. music on Sonos switches the input automatically, but afterwards switching back to TV input is not possible. Except for when I switch the TV on if it was off before. |
How do you start music? homebridge-zp only issues a Play to start the currently selected input. |
yes that's the way, but the Sonos amp switches automatically to TV if I turn on TV and it switches to music if I start some music. |
Thanks for thinking about my request. I think the solution you suggested would work but would complicate things within the Home.app |
Airplay 2 is a protocol for streaming audio to a speaker. The speaker is relatively dumb, in that it just plays the stream. To control smarter speakers (like Sonos) you would need another protocol (like HAP) to set the speaker’s input. This would need an AppleTV-like service on the speaker, very much like they do for the HomeKit enabled smart TVs. I tried to fake that through homebridge-zp, see #62, but there are a lot of issues with that approach.
That’s not going to happen. I won’t supporting functionality in homebridge-zp that isn’t in the Sonos app.
I bought my Sonos players too soon: none of them support Airplay 2, but I would expect this functionality to be there already: the Sonos app does provide a setting to keep the group, when autoplaying digital audio input on my PlayBar or analogue audio input on my Connect. |
My current setup is a mixture of older Sonos speakers and newer AirPlay2 Sonos Speakers:
I’ve contacted Sonos directly regarding this. Fingers crossed 🤞🏼 |
So Sonos decides to inherit the Airplay 2 group as Sonos zone group after the non-Sonos Airplay 2 device has left. What happens if you first remove one of the Sonos players from the Airplay 2 group? |
After this, do they still show as two rooms in the Sonos app, or as one room? In other words: does Sonos recognise that the same Airplay 2 stream is connected to multiple zoneplayers and group them on the Sonos side (presumably to optimise the network traffic on Sonosnet and on your home network)? |
[email protected] supports input source selection from Apple's Home app, through the TV service in the Television accessory (see #62). TODO: provide next/previous input controls in the Sonos service. homebridge-zp supports up to 20 sources per zone player. In order these are assigned to:
These inputs are the same for all zone players, but only the applicable inputs will be shown. So if you have 1 rooms, there's 14 inputs available for favourites, even if only the Sonos Chime and Leave Group are shown. Please let me know what you think of this. |
Changed the grouping logic in v1.0.3. You can only select input in the TV accessory when it's on. However, when the zone player has no current input, or a short input (like a text to speech clip), it will switch back off, before you'll be able to select the input. Not sure if I can change that. Will add Next/Previous input source to the Sonos service though, so at least it can be selected from other HomeKit apps. Also, use up/down arrows in the widget for input selection. |
v1.0.5 supports changing input from Sonos service and from the Remote widges (up and down arrows). Note that the order of the inputs has changed: Group first, Sonos Chime last. |
As of v1.0.7, manually disabled input sources are skipped when cycling through input sources. |
Provide some basic support for selecting input. At least TV, Line-In, Sonos Favourites, and Next/Previous track.
The text was updated successfully, but these errors were encountered: