anthonywebb / homebridge-cbus

CBus plugin for homebridge
MIT License
35 stars 20 forks source link

dimming memory or toggle #55

Closed DarylMc closed 6 months ago

DarylMc commented 7 years ago

@simonhac @anthonywebb It seems the Homebridge-CBus dimmer is a memory dimmer. It's a small matter but is there any way to make it toggle?

By the way thanks again for all the work done on this project. It has enabled me to get Homebridge-CBus running and I have a lot of confidence it is solid. I've done a complete rebuild at least 10 times to check, double check and learn some stuff. Made an image of a part build which makes it a lot easier. Now I just want to let it all run for a while.

I also have Clipsal Homegate software running on a Windows PC using remote CGate on the PI3 as well. Well done to everyone involved.

simonhac commented 7 years ago

@DarylMc by 'memory dimmer' do you mean that the dimmer returns to the previous level when toggled, rather than always go from 0% to 100%?

if so, this behaviour is intentional as this is what homekit expects (from my reading of the API and network traffic). i had to go to a bit of effort to make this work, but it makes sense to me -- if you've gone to all the trouble of setting a custom dim level and then turn the light off, it makes sense to me that when you switch it on it should go back to the same level.

however, others may disagree.

if there's a clear consensus for change, i'll put this on the list...

DarylMc commented 7 years ago

@simonhac CBus key inputs have the option to select toggle or memory dimming. I think both have a place where they are suitable for a task.

ElphaX commented 7 years ago

I might second this, I have at times gotten annoyed when turning on the kitchen lights it is dimmed to the level I made it earlier in the day - maybe a timed thing?

Could this be possible?

simonhac commented 7 years ago

there are a few options here:

i'd like to gather some consensus on the preferred path forward before sitting down to code. feedback please!

(option 4 is my least favourite as it complicates the behaviour, adds a lot of config and would be a pain to test, but it's definitely doable.)

DarylMc commented 7 years ago

@simonhac Now that I know your intended operation was to match homekit I do not require any changes. It is not too hard to set lights which have been dimmed to 100% by voice control or phone interface if you have it in your hand. If you are still going to do it I think option 4 is best.