Skip to content

v0.12.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@CrazyIvan359 CrazyIvan359 released this 18 Oct 15:55
· 60 commits to master since this release
9409d5a

Major Core Rewrite

This release is a big one! The core functionality has been almost completely rewritten
in order to make things a lot simplier for modules. There is now a standardized message
bus that modules use, instead of calling functions directly in other modules. This
abstraction also paves the way for adding other communication modules. However, as with
anything, there was a price; a lot of things have changed and a few features were dropped.

One of the major goals of this rewrite is to bring Homie support to MQTTany (Homie support
itself is not yet added). In order to do that it was necessary to abstract the way interface
modules connect to communication modules. This means that interface modules must now
provide more details on the data they export, but can no longer directly specify topics.

Internally the new message bus largely resembles the Homie convention in order to have all
details required for it. This means that topics must now have a minumum depth of 2 (ex.
{node}/{property}, gpio/1) and absolute topics are no longer supported.

Due to the number of changes, you will need to go over the documentation for each module
you are using and update your configuration file to work with the new options and changes.
If you were using default MQTT topics you will likely not have to change your home
automation setup much in order to interface with this version of MQTTany.

  • BREAKING CHANGE

    • Absolute and custom topic support removed. This means all topic options in config
      will now be ignored. See the documentation for each module to see how paths work. #49
    • GPIO - Digital pins now report their state as ON or OFF. #49
    • GPIO - Digital pins no longer support time only or comma separated messages for
      pulse commands, only JSON is supported now. #49
    • I2C - MCP230xx pins now report their state as ON or OFF. #49
    • I2C - MCP230xx pins no longer support time only or comma separated messages for
      pulse commands, only JSON is supported now. #49
    • LED - Options specific to output methods are now in a nested section inside the
      array definition. See the documentation for details. #49
    • LED - Animations can only be called with JSON on path {array_id}/animation/set. #49
    • OneWire - Options specific to devices are now in nested sections inside the device
      definition. See the device documentation for details. #49
    • LED - Move the fps option from module config to array config allowing per-array
      FPS setting. This is now published when the array is setup also. #52
    • GPIO - Change language for direction to pin mode to be less specific and lay
      ground work for additional pin modes. #55
    • GPIO - move interrupt, invert, and initial settings into a digital
      subsection in config. This was done to align with the new counter pin type to
      distinguish which pin type these settings apply to. #78
  • Added

    • Colorized log output to terminal.
    • .pylintrc file.
    • GitHub Actions for pylint and black checks.
    • Python version check before importing anything with a minimum version requirement. #49
    • Import checking for the core requirements with log entries for missing packages. #49
    • Template modules and documentation to help with creating new modules. #49
    • Config file version key. This will prevent MQTTany from running with an outdated
      config file that may cause errors or strange behavior. Config version number will
      incriment when incompatible changes occur in the config format. #50
    • Config option flag secret to obfuscate values in the log for passwords, etc. #53
    • I2C - If bus is a number, checks for path /dev/i2c{bus} as well as
      /dev/i2c-{bus} now. #62
    • udev rule files to help with hardware permissions. #63
    • GPIO - support for OrangePi Zero boards. #71
    • GPIO - support for counter pins. #75
    • Config option conditions allows matching a key at the same level to a value.
      Useful for sections or options that are required only for certain modes. #77
    • Update all modules to use config conditions. #78
  • Changed

    • Convert all string formatting to use f-strings. This change means you must be using
      a minimum Python version of 3.6. #49
    • Convert all logging to use lazy formatting. This should save some time building log
      messages for disabled log levels. #49
    • Logger get_module_logger now uses entire module name after modules instead of
      only selecting the element after the last period. #49
    • Move mprop requirement up into core, now modules don't need to make sure it is
      installed. #49
    • MQTT - Messages arriving on {node}/{property}/+/# will match and the callback
      for the property will be called. The callback should further inspect the topic before
      taking action. #49
    • LED - Remove the modified version of libsacn that was bundled with the LED module.
      The needed modifications are now available upstream in version 1.4.5. #51
    • Updated Adafruit Platform Detect version from 1.x to 2.x. #54
    • Consolidate get_module_logger and get_logger into single function and remove
      leading mqttany from all logger names. #56
    • log_traceback now formats entire traceback into a single log entry on a new line,
      like a standard stack trace. #66
    • GPIO access has been moved into the core, allowing all modules access to GPIO pins
      as needed. #64
    • GPIO access is now acheived using the periphery library via the new cdev
      interface, with a fallback to the older sysfs access. This moves MQTTany away
      from the now depreciated wiringpi library and opens the door for easy support
      of any SBC that supports cdev or sysfs GPIO access. #64
  • Fixed

    • Remove requirements file for old MCP230xx module that was removed in v0.10.0.
    • Fix logger checking if TRACE logging was enabled for WARN messages.
    • Core not exiting correctly if an exception occurred in the core. #49
    • Logging not truncating process name or logger name, this could have resulted in
      misaligned log entries. #56
    • LED - fix error on unload if array animation manager was never started. #67
    • LED - fix permission check for non-SPI outputs on Raspberry Pi arrays. #68