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

[Feature] Toggle lights with physical switch connected to GPIO #37

Open
oglodyte opened this issue Oct 26, 2017 · 6 comments
Open

[Feature] Toggle lights with physical switch connected to GPIO #37

oglodyte opened this issue Oct 26, 2017 · 6 comments

Comments

@oglodyte
Copy link

Allow light to be controlled (on/off) from the wall toggle switch for the backwards compatibility with non-geek family members.

Had to do this to meet minimum WAF.

Have simple working code that I wanted to share, but could not push it to new branch in this repo. Is it not allowed or it is my ignorance issue?

@Philje123
Copy link

For my WAF I have a mix of Hue lights, dimmer switches, livingwhites remote and google home.

Are you running Home Assistant or similar?

If Hue were to get some Hue lights and remotes there is some custom code you can install that listens for remote button presses and can then activate MQTT lights like Arilux/MagicHome controllers.

@oglodyte
Copy link
Author

hi @Philje123,

thank you for your comment.

Yes, I'm running HA, but the point is to make it smart with 0 impact on the users who do not care about it's smartness. If there was a wall switch to turn it, it just have to continue working as usual. And as reliable.

Those remotes are only useful if they can replace wall switch. IMO the only remote that is aesthetically acceptable is Lutron Pico and that still scores lower on WAF than existing plain toggle switch. Then you need to have Lutron's Pro hub and too many points of failure in the chain overall to call it reliable.

So what I typically do when adding ESP8266-baseed controller - I wire existing toggle switch to the GPIO pin on the same controller, so that it can be used to toggle whatever it controls on/off wether or not WiFi, HA or MQTT services are available.

@Philje123
Copy link

I get exactly what you mean now.

So you could basically wire up a toggle switch between say GPIO0 and Vcc so every time it is switched on or off if toggles the RGB lights?

That would be a really nice feature and sure pretty easy to code in... but I've no idea how. I'm pretty new to all this arduino/mqtt stuff and learning as I go.

@oglodyte
Copy link
Author

Right. It is actually fairly easy change. I have it working with my LC11 pretty well. If you are interested I've just put it here:
oglodyte/Arilux_AL-LC0X
I'm also new to this and just having fun learning.

@rvt
Copy link

rvt commented Mar 3, 2018

Would it be possible to use a eeprom to keep track of last light state when it was emitting? Then when the device detects a start it will simply go on, regardless of what mqtt states? SOmething similar to what the Ikea ights do when power is toggled...

@rvt
Copy link

rvt commented Mar 18, 2018

Here is a branch where this issue is solved https://github.com/rvt/Arilux_AL-LC0X/tree/redesign

What it does is when the less where off and you power off/on it will lookup the last color setting and brightness in EEPROM and turn on the device with these settings making operation feel a bit more natural. Also handy if your mutt broker is down.

Note: It´s not a drop-in replacement because color model is changed from RGB to HSB and some things are changed to follow this design. It should be easy to convert though.
If there is really a need for RGB model I can see what I can do but I just assumed that all control software (openHAB, Home assistant etc) can output HSB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants