-
Notifications
You must be signed in to change notification settings - Fork 635
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
Fixed update of led bug and GPIO16 support #2110
Conversation
Do you build with BROKER_SUPPORT disabled? See GPIO16 stuff is useful, but I am not seeing LED actually checking anything via |
I do compile with BROKER_SUPPORT disabled, probably that's why it didn't work for me. About the gpio, you are right, it just took me time to make the led work, I got confused and thought its the gpio change that solved it, but the gpio change just helped me debug it in the terminal because without that change I was not able to control the 16th pin. |
code/espurna/relay.ino
Outdated
@@ -383,7 +383,7 @@ void _relayProcess(bool mode) { | |||
if (_relay_sync_locked && needs_unlock && changed) { | |||
_relaySyncUnlock(); | |||
} | |||
|
|||
ledUpdate(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove this.
LED_SUPPORT
can hard-depend on BROKER_SUPPORT
then? see dependencies.h & led mode (which can actually be disabled, removing ledUpdate
symbol)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats correct, just making it depend on BROKER would solve the problem👍.
its ok to remove this line...
I bought ZSP-001 Device
https://templates.blakadder.com/ZSP-001.html
When I tried to configure it, I couldn't, because Espurna ignored GPIO16 on setup (which caused the led (LED2) not to function on that specific device).
I also saw that Xose noticed this issue before (#376) but didn't change anything about it.
Anyhow I have added support for the GPIO16.
What I also noticed is that when I choose "Follow Switch#" on LED configuration tab it didn't function at all, as far as I saw the only function that supposed to update the led status according to the relay status is
ledUpdate
and its not being called anywhere but from MQTT, so I have added a call to it after every relay status change. that solved the problem for me.