Fixed update of led bug and GPIO16 support #2110
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.