Skip to content

Releases: nielsonm236/NetMod-ServerApp

20230125 2003 General Release

27 Jan 01:08
38d6821
Compare
Choose a tag to compare

Important:

  • Releases will no longer include .stp files to reduce confusion on how they are used. The Manual now describes how to program the Network Module using only the .sx file. The procedure is simple.
  • If using an Updateable version of code ALWAYS remember to 1) Load the new Code Uploader, 2) Load the new Strings file, 3) Load the new firmware - All in that order.
  • The BME280 Temperature / Pressure / Humidity sensor release required its own Firmware load due to the size of the BME280 driver. The BME280 code does not have the Linked Pins or feature and will not include other future features, but will include bug fixes.

Code changes:

  • Addressed Issue #132 “Linked pins Output states not correct after reboot”
  • Addressed Issue #93 “Add BME280 Temperature Humidity Pressure sensor”
  • Re-arranged how code build options are selected in the uipopt.h file. This doesn’t change any functionality but does make it substantially easier and less error-prone to create the various build types.
  • Added code revision to the Code Uploader GUI.
  • Began implementation of a user selectable pinout schema. Not yet finished and not included in the executables.

Document changes:

  • Addressed Issue #134 “Add description of two known types of STLINK-V2 dongles to the Manual”
  • Addressed Issue #136 “Update Manual to show .stp vs manual steps methods of programming?” by reorganizing the “Programming the Module” section to make it less confusing and to eliminate need for the .stp files.
  • Updated the manual to desribe programming the device without .stp files.
  • Updates for the BME280 sensor: Screenshots, URL commands, Feature Comparison chart, “Notes on Feature Settings” section to describe the BME280 sensor setting, behavior of “Linked” pins when a BME280 build is installed, “Notes on MQTT”.
  • Added a “Developers: CXSTM8 Compiler Issues” section to keep track of compiler issues.
  • Moved the “Upgradeable Firmware” section to follow the “Programming the Module” section.

Update: Had to replace the NetworkModule-MQTT-UPG-BME280.sx executable on Jan 27. Looks like I uploaded the wrong file at initial release.

20221217 General Release

17 Dec 20:03
Compare
Choose a tag to compare

See the Release Notes in the manual

If you are using upgradeable builds be sure to install the new Uploader, Strings, and Firmware per the manual.

Normal builds. These must be flashed with the STLink-V1 / SWIM interface.
NetworkModule-Browser.sx
NetworkModule-MQTT.sx
Upgradeable builds. To use Upgradeable builds you must add an I2C EEPROM. See the Manual for instructions. Once installed future releases can be installed over Ethernet.
NetworkModule-Browser-UPG.sx
NetworkModule-MQTT-UPG.sx
NetworkModule-CodeUploader.sx
NetworkModule-Strings.sx

Code changes:

  • Addressed Issue #113 “MQTT command rate limitation”.This fix addresses the symptom wherein the Home Assistant “Header Toggle” button did not function correctly. The dysfunction was traced to “batching” of MQTT PUBLISH messages into TCP datagrams per Nagle’s Algorithm (See https://en.wikipedia.org/wiki/Nagle%27s_algorithm for more information).
  • 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 Home Assistant Config messages after the initial boot processes complete.
  • Addressed Issue #116 “Link Input pin to an Output pin”.
  • 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.
  • 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”.
  • 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.
  • Fixed (again!) a bug in proper display of the ENC28J60 revision with the /66 command.
  • Fixed some file upload error detection bugs which may have been causing file upload hangs when byte errors occurred on the network.
  • Fixed the input pin debounce of the read_input_pins() function.
  • Fixed the encode_16bit_registers() function which was interfering with the read_input_pins() function.

Document changes:

  • Updated the “Adding DS18B20 Temperature Sensors” section.
  • Added a description of the new “batch mode” REST command.
  • Added a “Reset Button” section.
  • Added a “Default Firmware Settings” section.
  • Updated the “Developers: Analysis of MQTT sendbuf sizing” section.
  • Added note about programming an STM8S105 device
  • Updated the “Developers: Notes on Configuration Debug and pin_control Bytes” section to reflect addition of the Linked pin Type.
  • Updated the Screenshots to reflect addition of the Linked pin Type.
  • Added a “Notes on Linked Inputs and Outputs” section.
  • Fixed typos in the Debug Statistics Display Schema description.
  • Added a “Developers: Upgradeable Firmware – How File Upload Works” section.

20221127 0000 Pre-Release Fixes for HA Header Toggle and REST Batch Command

29 Nov 21:47
eeec0c0
Compare
Choose a tag to compare

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.

20221109 0109 Pre-Release for QOS 1 testing

09 Nov 19:31
Compare
Choose a tag to compare

This is a Pre-Release only to permit testing of the QOS 1 implementation. If you are not using Home Assistant you should see no difference in operation. If you ARE using Home Assistant you should find that the Toggle function now works, however, read the notes that follow:

  • CAUTION: If you are using the Upgradeable builds (with external EEPROM) you MUST follow the procedure for uploading this firmware:
    o Start the existing Code Uploader with the /72 URL command
    o Install the new NetworkModule-CodeUploader.sx file
    o Install the new NetworkModule-Strings.sx file
    o Install the new NetworkModule-MQTT-UPG.sx OR NetworkModule-Browser-UPG.sx file.
  • If you don’t follow the process you may have to reprogram the module with the SWIM interface.

Comment: It was found that some Network Module PUBLISH messages were not being properly forwarded to Home Assistant when using Mosquitto 1.6.x. This problem went away when Mosquitto was upgraded to 2.0.15. If you are using Mosquitto I recommend you use the latest Mosquitto revision.

Remaining issue: Whenever the Network Module is rebooted the Home Assistant “Toggle” button will not initially send all required PUBLISH State Change messages for all outputs. I am fairly certain this is a Home Assistant issue based on examining Mosquitto logs. Pressing “Toggle” several times (with a short pause between presses) will eventually cause Home Assistant to properly send all PUBLISH State Change messages as expected, and thereafter Home Assistant continues to properly send all PUBLISH State Change messages (until the next reboot). I don’t know if this is an issue unique to my implementation of Home Assistant and Mosquitto on the same Windows 10 server. I’m interested in what the Linux server and Raspberry users see.

Code changes:

  • Added MQTT QOS 1 functionality for PUBLISH State Change messages sent from Home Assistant to the Network Module. All other messages sent in either direction continue to be delivered with MQTT QOS 0.
  • Changed the MQTT message response processes so that the Network Module will respond to an MQTT PUBLISH State Change message with a PUBLISH Response regardless of whether the PUBLISH State Change made a change in the ouput pin state. Example: Home Assistant sends a PUBLISH State Change to set Output 1 to the ON state. If Output 1 was already in the ON state the previous code would not send a PUBLISH Response back to Home Assistant. Now it will. This is to address an “out of sync” issue that seems to occur between edge devices and Home Assistant on rare occasion.
  • Fixed an issue in the MQTT transmit code wherein multiple queued messages might not all get sent. This did not appear as a problem until current efforts to implement QOS 1 resulted in multiple responses to a single PUBLISH from Home Assistant (the QOS 1 implementation requires a PUBACK response followed by a PUBLISH with the new pin state).
  • Changed the code so that Home Assistant sees pin 11 as Disabled when it is being used for UART based debug functionality.
  • Changed the code to slow the rate at which messages are extracted from the ENC28J60 hardware receive buffer. This was necessary to allow reliable processing of the burst of Home Assistant PUBLISH State Change messages that occur when the Toggle button is pressed. This change may slow MQTT response time slightly verses previous versions of code.

I have not yet updated the manual, so it is not included in this pre-release.

20221009 2141 General Release

10 Oct 01:25
Compare
Choose a tag to compare

General Release fixing issues from the 20220921 release that was withdrawn earlier.

Reminders:
See the release notes in the Manual.

Normal builds. These must be flashed with the STLink-V1 / SWIM interface.
NetworkModule-Browser.sx
NetworkModule-MQTT.sx

Upgradeable builds. To use Upgradeable builds you must add an I2C EEPROM. See the Manual for instructions. Once installed future releases can be installed over Ethernet.
NetworkModule-Browser-UPG.sx
NetworkModule-MQTT-UPG.sx
NetworkModule-CodeUploader.sx
NetworkModule-Strings.sx

Code changes:

  • Fixes from the 20220921 0050 release that was withdrawn:
  • Fixed Issue #94: “ENC28J60 Revision not always reported in Link Error Statistics”
  • Added Enhancement Issue #100 “Remove Configuration Button”. This is an option to disable the Configuration button on the IOControl page.
  • Fixed Issue #108: “Temperature sensors loose custom names in HA on NetModule boot”.
    Additional fixes:
  • Fixed #110 “Can’t enter full 19 character Device name” – a bug made apparent in the 20220921 release
  • Fixed #109 “Home Assistant Not Showing Sensors in Fahrenheit” - a bug made apparent in the 20220921 release

20220921 0500 General Release - DON'T USE - Issue #109

22 Sep 02:04
Compare
Choose a tag to compare

Note: I had to re-release this as the tar and zip files did not update properly in my last attempt.

Reminders:

See the release notes in the Manual.

Normal builds. These must be flashed with the STLink-V1 / SWIM interface.
NetworkModule-Browser.sx
NetworkModule-MQTT.sx

Upgradeable builds. To use Upgradeable builds you must add an I2C EEPROM. See the Manual for instructions. Once installed future releases can be installed over Ethernet.
NetworkModule-Browser-UPG.sx
NetworkModule-MQTT-UPG.sx
NetworkModule-CodeUploader.sx
NetworkModule-Strings.sx

Code changes:

  • Fixed Issue #94: “ENC28J60 Revision not always reported in Link Error Statistics”
  • Added Enhancement Issue #100 “Remove Configuration Button”. This is an option to disable the Configuration button on the IOControl page.
  • Fixed Issue #108: “Temperature sensors loose custom names in HA on NetModule boot”.

Document changes:

  • Updated description of the Link Error Statistics Clear button.
  • Added description of the Disable Configuration Button enhancement.
  • Updated the “Notes on Debug Bytes” section.
  • Updated the “Notes on MQTT” section to reflect changes in how Temperature Sensor config messages are handled.

20220831 2011 General Release

01 Sep 16:27
Compare
Choose a tag to compare

Addresses enhancement request in Issue #101 "Make ON/OFF labels clickable". This enhancement allows the user to click the radio buttons OR the ON/OFF labels on the IOControl page. This makes it easier to use in some browsers and phones where the radio buttons end up being too small to easily click.

20220817 1508 General Release

20220205 1645 - General Release

05 Feb 18:48
bee2212
Compare
Choose a tag to compare

This release includes builds that must be flashed onto the Network Module via the STLink-V2 / SWIM interface and also includes builds that can be flashed over your network connection (see the manual). Several bug fixes are included (see the release notes in the Manual).

Normal builds (must flash with the STLink-V1 / SWIM interface):
NetworkModule-Browser.sx
NetworkModule-MQTT.sx

Upgradeable builds (once installed future releases can be installed over Ethernet):
NetworkModule-Browser-UPG.sx
NetworkModule-MQTT-UPG.sx
NetworkModule-CodeUploader.sx
NetworkModule-Strings.sx

See the Manual for instructions on how to install and use the Upgradeable builds. An I2C EEPROM must be added to the module to utilize Upgradeable builds.

Code changes:
o Addressed Issue #91: Major problem: Clicking Save in IOControl causes loss of Configuration settings
o Fixed bug where the check for pin state changes would run even when there were no changes. No functionality change but should free up some processor bandwidth.
o Added a “code type” identifier to the Revision text on the Configuration page.

Document changes:
o Added Developers section: “How Connections Open and Close And Relationship to the “current_page” Variable”
o Added Developers section: “How Proto-Sockets are Implemented and Connections Established”
o Addressed Issue #88: REST Command IO State Output. Corrected the document to reflect actual order of the pin states displayed in the short form display.
o Added a Functional Limitation note with regard to multiple Browser tabs related to Issue #87.
o Added section “16 Channel Relay Moduless” describing hardware modifications to make 16 Channel Relay boards compatible with the Network Module hardware.
o Added additional information to the “Developers: Using the UART” section.

20210821 1541 General Release - DON'T USE

21 Aug 22:01
Compare
Choose a tag to compare

Update 1/20/2022 - Due to Issue #91 I suggest you do not use this release. A new release with #91 fixed will be released soon. Issue #91 has Beta test code included as an attached zip file if you want to try it out prior to the next official release.

This release maintains the prior types of builds that must be flashed onto the Network Module via the STLink-V2 / SWIM interface. Several bug fixes are included (see the release notes in the Manual).

This release also introduces “Upgradeable” versions of the firmware that support flashing via the Browser over Ethernet.

Normal builds (must flash with the STLink-V1 / SWIM interface):
NetworkModule-Browser.sx
NetworkModule-MQTT.sx

Upgradeable builds (once installed future releases can be installed over Ethernet):
NetworkModule-Browser-UPG.sx
NetworkModule-MQTT-UPG.sx
NetworkModule-CodeUploader.sx
NetworkModule-Strings.sx

See the Manual for instructions on how to install and use the Upgradeable builds. An I2C EEPROM must be added to the module to utilize Upgradeable builds.

Fixes:
Code changes:
o Addressed Issue #71: Extensive code additions to support Issue #71 “Firmware Update via webinterface”, aka “Upgradeable” firmware.
o Addressed Issue #77: Fixed a potential math error in how pin timers are calculated. The error only affects the “hours” timeout value in the Browser Only code.
o Addressed Issue #78: Fixed a bug in calculation of the Configuration page size. This only affects MQTT builds. The symptom is the Configuration page may not completely paint or you may not be able to save changes.
o Addressed Issue #79: Fixed a problem where rapid use of REST relay commands (/00 /01 etc) may interfere with Browser updates. This fix required changing the operating characteristics in that use of the REST relay commands, if executed from a Browser, will no longer repaint the GUI, instead only showing a blank screen.
o Addressed Issue #80: Fixed a problem where the REST /98 or /99 command would interfere with painting the IOControl and Configuration pages.
o Addressed Issue #81: Significant improvement to “multi-browser” operation.
o Addressed Issue #82: Fixed bug in DS18B20 CRC check.
o Addressed Issue #83: /98 /99 command does not return the correct size for the page in the HTML header.

Document changes:
o Added new section on using “Upgradeable” firmware
o Added REST command notes
o Added Developers section: Notes on Proto-Sockets
o Added Developers section: #pragma, Sections, Segments and the .lkf File. Includes information on Editing the .lkf file, Flash Update and Copy-RAM-to-Flash Code, _fctcpy, #pragma Sections, and Content of the .lkf File
o Added Developers section: STM8 Address Map
o Added Developers section: Flash Memory Map
o Added Developers section: I2C EEPROM Memory Map, Includes information on I2C EEPROM Regions for Upgradeable Builds and Addressing the I2C EEPROM Regions
o Added Developers section: Strings File Generation