Skip to content

Releases: Resinchem/LED-Matrix-Clock_WS2812b

v0.53

07 Aug 20:48
Compare
Choose a tag to compare

New Features:

Adds option to call external system (e.g. Home Assistant, NodeRed, etc.) to get current time and to set the clock upon system boot-up.

Resolves issues of dead or missing battery in the clock module. This is done via MQTT, so the automation system must watch for a message to be published on the topic 'stat/matrix/clock/requesttime' and a payload of '1'. When received, the automation system should publish the current time, to the MQTT command: 'cmnd/matrix/clock/settime'. See the MQTT folder for additional details.

Adds new push button options

  • When in text mode, the "green" button may be used to select the next text effect. Will wrap to first effect after last effect is selected.
  • When in text mode, the "red" button may be used to clear any text effects and set the matrix back to 'clock' mode. This is generally used when the matrix is used to display notifications and this provides a quick way to clear that notification and return to clock mode.

Fixes:

Fixes issue where MQTT did not reconnect correctly if the MQTT broker was not available at boot time. This generally occurs after a power outage and the clock boots up before Home Assistant/MQTT broker is available. Should now resolve and rebind after about 1 minute after the broker becomes available.

BREAKING CHANGES

This update requires a change to the Settings.h file. If you download and replace your Settings.h file with this version, you will need to open and update that file with all your options or settings. A potentially easier method is to just download the matrix_clock_main.ino and manually edit your existing Settings.h file and add the following line:

bool autoSetTimeOnBoot = true; (set value to false to disable - see additional notes below)

Installing the update

Once you have updated the new Settings.h file (either by updating the new version with your settings and options, or by manually adding the line shown above), then perform an OTA Update as described in the wiki.

More on the auto time setting feature

The option to set the clock time on boot from an external system requires automation on the system that provides the time. An alternative to this would be to enable NTP services within the code. However, my goal was to have this matrix operate completely locally (it does not have, nor does it need, any external Internet access to function. You could also setup your own local NTP server and then use that service locally on the matrix as well. However, at least for this version, I opted to handle this via MQTT and to let Home Assistant provide the current system time back to the clock.

On the Home Assistant side, there is simply an automation that that watches the time request topic ('stat/matrix/clock/requesttime') for a payload of "1". When received, the automation simply takes the current system time and published back to the clock with the cmnd/matrix/clock/settime topic. This does seem to result in about a 3-5 second lag on the matrix side, just due to some delays in the startup process. If you want more precise synchronized time, you can resend the settime MQTT command after the clock has completed the entire boot process. This will generally result in less than 1 second difference between the clock and source system. To maintain the time, you can resend this synch command on a regular basis from Home Assistant or your other automation system. See the Home Assistant folder automation and script files for examples of both options.

The new Settings.h option can be left as 'true' even if you do not have any automations setup to handle it. It will simply publish an MQTT message with no adverse affects. You should only set this to 'false' if you never want the clock to auto-set or are using some other method to set the clock's time.

v0.52

16 Apr 04:25
Compare
Choose a tag to compare

Update button color/mapping. No functional changes.

Breaking change

If you installed a previous version, applying this new Settings.h file will overwrite your local settings. Before upgrading, note your current settings and options and reapply to the new Settings.h file prior to uploading to the matrix controller.

v0.51

15 Apr 22:01
d3090c5
Compare
Choose a tag to compare

Initial public release. See the wiki for details on installation, configuration and settings.