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

How to make Sonoff THs internal hardware button/switch functional again? #7

Open
lev2k opened this issue Oct 16, 2018 · 2 comments
Open

Comments

@lev2k
Copy link

lev2k commented Oct 16, 2018

When I don't need the PID Control, (which, by the way, works absolutely great for me), I would like to use Sonoffs internal hardware button/switch again.
I know, I can turn on/off the relay via MQTT commands, but when using the button, the relay switches off again, immediately after pressing it.
I've also tried a rule like: "rule on button1#state do publish cmnd/sonoff-TH16/PID_MANUAL_POWER toggle endon"
But "toggle" only works, if the relay is in "on" state.
Any ideas?

@colinl
Copy link
Owner

colinl commented Oct 16, 2018

I don't think you will be able to do this inside the THnn as the timeprop s/w will repeatedly force the relay to the state it wants. However, if you have node-red or openhab or something similar running somewhere then you could configure the TH to send the button state via MQTT and when you see that, put the pid into manual and adjust the manual power to either 1 or 0 to switch the relay on or off.

@colinl
Copy link
Owner

colinl commented Oct 16, 2018

You could also use this technique to make a long press put it into manual mode, then use quick press to change the state, and long press again to put it back into auto.

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