Skip to content

Fix for unreliable wake-up port detection + DHCP and retry options#6

Open
freddieleeman wants to merge 3 commits intoPaesslerAG:masterfrom
freddieleeman:patch-1
Open

Fix for unreliable wake-up port detection + DHCP and retry options#6
freddieleeman wants to merge 3 commits intoPaesslerAG:masterfrom
freddieleeman:patch-1

Conversation

@freddieleeman
Copy link
Copy Markdown
Contributor

After some tedious debugging I've discovered that the detection of the wake-up port is unreliable. When this happens (wakeupStatus == 0) the script checks if either of the ports is (still) HIGH.

I've also added retry functions that are useful when WiFi or MQTT broker are unreliable or temporarily down. The script saves the state, sets a (configurable) time-based deep-sleep and tries to send the message again.

DHCP can now be configured (true/false) for people that do not want to reserve a static IP address.

I've been using this code for a few months now and have not had any issues since.

Added DHCP / static IP options
Added timer-based retry functions on WiFi / MQTT failures
Fixed the style formatting
Added DHCP enable/disable option, retry functions and fix for when the board does not provide the correct port that triggered the wake-up.  When this happens the script checks if either port is still HIGH. I've been using this code for a few months now and had no issues since.
typo in variable
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

Successfully merging this pull request may close these issues.

1 participant