Skip to content
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

Volume up and down switch State #25

Closed
yanhaotan opened this issue Nov 20, 2018 · 9 comments
Closed

Volume up and down switch State #25

yanhaotan opened this issue Nov 20, 2018 · 9 comments

Comments

@yanhaotan
Copy link

The volume buttons are currently stateful buttons which makes them stay on after you trigger it, and it also triggers again when you turn it to off state(which is counterintuitive?)

A suggestion to switch them to stateless switch so they revert back to off after a one time trigger.

Also, +-10 seems like a huge leap to me personally would love to have it be +-5 instead if that's more sensible. Just my 2 cents.

Thank you for this awesome plugin!

@bschlenk
Copy link
Owner

I can look into the stateful behavior in a couple days, I just moved and my roku tv is still in storage.

It would makes sense to be able to configure the increment from the Homebridge config file too. And a default increment of 5 does sound more reasonable. I will look into changing this.

@yanhaotan
Copy link
Author

yanhaotan commented Nov 20, 2018

Hey,

Not gonna lie took me a while to find those stuff(total noob here), but here's the edited homebridge-roku.js file.

I've changed 'Power' to 'TV', so you can say "Turn Roku TV on/off" (much more intuitive than Power for me personally).

I've added a space to all the service switch so it's 'Roku HDMI 2' instead of 'RokuHDMI 2', the only thing I couldn't fix yet is the VolumeUp & VolumeDown but that's an easy fix in the Homekit app interface.

Edit: Pardon me for the formatting I have no idea how to work this thing.

@bschlenk
Copy link
Owner

Are you familiar with making pull requests? https://help.github.com/articles/creating-a-pull-request/
Typically you don't just paste code into a github issue. You would fork the repo, make a commit on your copy, and then create a pull request.

Also it is generally best practice to create a separate issue for each distinct request. This issue was initially about volume up and down switch state, but this is for the names used for each switch. I'm happy to incorporate these changes (at least for adding the spaces), but it would be better as a separate issue.

@yanhaotan
Copy link
Author

My apologies, I am really really new to GitHub (my first post actually), I'll look into the pull request and open up a separate issue for the names.

@bschlenk
Copy link
Owner

That's okay! Gotta learn somehow.

For the names, I just updated them to have spaces, but I'm not sure about changing power to TV. Is power exclusive to Roku TVs? It might make more sense to just remove Power so you can say "turn on roku", which is more accommodating if there are other Roku devices besides TVs which can be turned on and off.

@yanhaotan
Copy link
Author

Roku TV seems to work pretty well for me since I also have Fire TV that I cast from the Echo dot all the time I am used to saying 'TV' at the end of it.

But I don't see why not Roku itself won't work, not sure if Power if exclusive to Roku.

@bschlenk
Copy link
Owner

The prefix before each command is whatever name is set to in the config. It gets set to Roku if using the config generator, but it can be changed. You could change it to Roku TV, but then all the other commands would be prefixed with Roku TV too. This will be useful when I get around to better supporting multiple Roku devices. You could have one called Livingroom Roku and Bedroom Roku. With that in mind, I think changing it to just the name of the device would be best.

@bschlenk
Copy link
Owner

bschlenk commented Feb 4, 2019

The latest homebridge-roku let you set volumeIncrement and volumeDecrement in the config file, which is explained more in the readme.

With the latest iOS, 12.2, HomeKit will natively support televisions, so volume up/down will be a lot more intuitive. It will let you control your Roku tv from the apple tv remote on your phone, which lets you use your phone's volume buttons to control the TV volume. You can watch the progress of the changes here: #63. It will be a while before iOS 12.2 is released though, and those changes won't be merged in until after that.

@bschlenk
Copy link
Owner

bschlenk commented Jun 1, 2020

3.0.0-alpha.1 supports changing the volume increment, and with the control center remote, supports changing the volume with the phone's volume buttons.

@bschlenk bschlenk closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants