20221127 0000 Pre-Release Fixes for HA Header Toggle and REST Batch Command
Pre-release
Pre-release
nielsonm236
released this
29 Nov 21:47
·
60 commits
to master
since this release
This is the second attempt to address the Home Assistant Header Toggle issue, this time without QOS1 but instead extensive code changes to accommodate "Nagle's Algorithm" wherein MQTT commands are batched into single TCP datagrams. ALSO added the requested REST batch mode command.
Only the firmware executables are attached to this pre-release. Let me know if you see issues. I've tested extensively and will continue to test for another week or so before committing this as a full release.
Changes from the previous Pre-release:
- Deprecated the unsuccessful attempt to implement QOS1. QOS1 will not work in this application because the MQTT spec only allows QOS1 resend after a disconnect/reconnect.
- Deprecated the associated change that throttled the receipt of packets from the ENC28J60.
- Deprecated the "hot add" function for DS18B20 devices. If a new DS18B20 is physically added the Network Module will require a reboot to see it. This was necessary due to lack of memory to send HA Config messages after the initial boot processes complete.
- Addressed Issue #113 MQTT command rate limitation. Added MQTT message reconstruction and TCP packet continuation for MQTT PUBLISH messages that are "batched". This happens when, for instance, the Home Assistant Header Toggle button is used. Rather than sending a series of TCP packets each containing one PUBLISH message (one for each switch), the messages are sent in as little as one TCP datagram, sometimes split over two or more TCP packets. See https://en.wikipedia.org/wiki/Nagle%27s_algorithm for more information.
- Addressed Issue #112 Request to change output pins in "batch mode". Implemented for REST commands only at this time.
- Addressed Issue #126 Malformed REST commands produce garbage Browser page.
- Addressed Issue #123 Allow short press of Reset button to reboot the module, and a long press to restore defaults.
Retained these changes from the previous pre-release:
- Addressed Issue #118 Reasons not to respond MQTT msg to every set msg, but only on change and Issue #121 Possible HA MQTT state change reliability improvement. The change is to PUBLISH the state of an output when an MQTT state change request is made for that output even if the output is already in the state requested.
- Fixed an issue in the MQTT transmit code to assure that multiple queued messages all get sent.
- Changed the code so that Home Assistant sees pin 11 as Disabled when it is being used for UART based debug functionality.