Skip to content

Releases: mhthies/smarthomeconnect

0.9.0

12 Sep 19:41
905aed0
Compare
Choose a tag to compare

Breaking Changes

  • Dropped Python 3.7 support when using [mqtt] or [telegram] feature (due to update to aiomqtt and aiogram 3.x)
  • Default line interpolation style of un-aggregated ChartWidget plots changed to LINEAR. To return to the old behaviour, add line_interpolation=shc.web.log_widgets.ChartLineInterpolation.STEP_BEFORE to the respective ChartDataSpec. See line_interpolation in the Docs for more info.

New Features

  • Python 3.12 support
  • All Python and frontend dependencies updated to the latest version
  • New utility class DelayedVariable
  • New display options for shc.web.log_widgets.ChartWidget:

Fixes

  • base: Improved state synchronization between multiple state-full objects on concurrent updates. The existing implementation for preventing conflicting updates turned out to be not sufficient to prevent inconsistent state of multiple connected connectable objects in all cases.
  • web ui: Only connect to websocket when the current page contains dynamic widgets (esp. do not connect to websocket on monitoring web page)
  • MySQL: Allow storing NaN in float-type variables

Internal Changes

  • Update Sphinx, Sphinx theme and Sphinx plugins for docs generation
  • Update imported GitHub Actions in the CI and release pipeline
  • Docs generation in the CI pipeline
  • Docs and package artifact uploads in the CI pipeline (see Actions → buildrun → Artifacts)

Full Changelog: v0.8.0...v0.9.0

0.8.1

12 Sep 19:27
652bab7
Compare
Choose a tag to compare

Fixes

  • base: Improved state synchronization between multiple state-full objects on concurrent updates. The existing implementation for preventing conflicting updates turned out to be not sufficient to prevent inconsistent state of multiple connected connectable objects in all cases.
  • web ui: Only connect to websocket when the current page contains dynamic widgets (esp. do not connect to websocket on monitoring web page)
  • MySQL: Allow storing NaN in float-type variables

Internal Changes

  • Update web frontend dependencies
  • Update Sphinx and Sphinx theme

Full Changelog: v0.8.0...v0.8.1

0.8.0

25 Dec 21:59
1eaa7e9
Compare
Choose a tag to compare

Breaking Changes

  • Replaced interfaces' get_status() method with monitoring_connector(), returning a Readable (and optionally Subscribable) connector object, providing the interface health state as InterfaceStatus value
  • Field InterfaceStatus.metrics has been removed
    • Custom get_status() / monitoring connector implementations need to respect the removed field of the named tuple
    • Future metrics reporting for monitoring systems shall use additional SHC connectable objects (like the connector objects of the EventLoopMonitor interface interface)
  • Attribute criticality of interfaces has been removed
  • shc.log.generic moved to shc.data_logging
  • PersistenceVariable has been renamed to DataLogVariable and completely reworked in its internal interface and behaviour.
  • shc.log.in_memory moved to shc.interfaces.in_memory_data_logging and InMemoryPersistenceVariable has been renamed to InMemoryDataLogVariable
  • shc.log.mysql moved to shc.interfaces.mysql and MySQLPersistence has been renamed to MySQLConnector
  • Interface of MySQLConnector for retrieving non-logging persistence connector objects has been reworked, with new method persistence_variable()
  • New database schema for MySQL interface (when used for value persistence without data logging)

New Features

  • New EventLoopMonitor interface, for checking the asyncio event loop health via the monitoring interface
  • New Nagios-compatible monitoring script (Nagios Plugin) "check_shc.py" in shc/util/check_shc.py for monitoring the SHC server health via the HTTP monitoring endpoint
  • New SimpleInputConnector and SimpleOutputConnector helper classes. They can for example be used to build function-block-like classes for SHC with multiple input and output connectors and internal logics.
  • New telemetry connector for Tasmota interface.
  • New energy connector for Tasmota interface
    • old energy_x() connectors are deprecated and will be removed in a future release

Misc Improvements

Internal changes

  • We now use flake8 instead of pycodestyle for even stricter code style checking
  • New test infrastructure for basic unit-testing of all data logging interfaces

0.7.0

02 Nov 21:14
1309570
Compare
Choose a tag to compare

New Features

  • The Slider web widget now can be supplemented with two buttons to the left and right via the new constructor parameters left_button and right_button.
    • Including a ready-to-use variant MinMaxButtonSlider with buttons that move the slider to the minimum/maximum value have
  • Added the UpdateExchange class: A stateless alternative to shc.Variable, allowing to connect multiple connectable objects through a single point and to split up tuple values by subscribing to individual fields.
  • Added the FilePersistenceStore for persisting values over SHC restarts in a JSON file

Breaking Changes

None

Improvements

  • The @shc.handler and @shc.blocking_handler decorators now support decorating functions with less than two parameters: origin and value of the value update are only passed to the handler function if the parameters is present.
  • Added a logo for Smart Home Connect. The logo is also used as favicon and app icon for the web interface
  • Updated SemanticUI framework with many fixes for the web UI (esp. touch event handling of Sliders and the menu)
  • Updated all NPM packages to mitigate bugs and security flaws

Fixes

  • Fixed possible value update loops, caused by concurrent updates via multiple objects, resulting in inconsistent states in the end. Fixed by delaying re-published value updates (with resetted origin) randomly.
  • SHCWebClient: Fixed broken decoding of complex values in reflected value updates (during concurrent updates)
  • mypy_variable_plugin: Fixed support for newer MyPy versions

Documentation

  • New example of special configuration tricks for KNX connection
  • New example of using astropy for sun position calculation and OpenWeatherMap for weather forecast

0.6.2

22 Apr 12:12
a67e7ae
Compare
Choose a tag to compare
  • Fix missing web UI template files in PyPI distribution packages (both, source and wheel distribution)

(see also Changes from version 0.6.0)

0.6.1

22 Apr 11:42
64dae4c
Compare
Choose a tag to compare
  • overhauled (modernized) packaging process
  • stripped unnecessary files from package/distribution (esp. old generated web UI artifacts)

(see also Changes from version 0.6.0)

0.6.0

10 Apr 11:55
653f30b
Compare
Choose a tag to compare

New Features

Breaking Changes

  • Web: WebServer.serve_static_file() returns full URL of static file (including WebServer.root_url)
  • Web: WebServer.add_js_file() and WebServer.add_css_file() have been replaced with WebServer.add_static_directory()

Improvements

  • SHCWebClient interface mitigates more state inconsistencies by reflecting probably conflicting received updates back to the server
  • Expressions: Make expressions more efficient by using the published value instead of reading all values upon triggered update
  • PulseAudio: shc.interfaces.pulse can be imported without needing libpulse installed to use the PulseAudio datatypes

Fixes

  • Web API: Fix InvalidState error after a long poll on the HTTP/REST API has been aborted
  • base: Fix detection of (possible) conflicting updates to synchronous .trigger()s for mitigating state inconsistencies in Subscribable._publish()
  • Fix exponential backoff timeout when reconnecting to MQTT/SHC API/etc. to reset on successful connection
  • Do not include SHC's tests in Pip/PyPI distribution
  • PulseAudio: Fix handling of exceptions in *PeakConnector

Documentation

0.5.0

20 Oct 11:19
02819af
Compare
Choose a tag to compare
  • New Pulseaudio interface for monitoring and controlling volumes, mute and sink/source state
  • New Variable.field() method for accessing VariableFields of NamedTuple-typed variables (see Docs)
    • Deprecation: Access to VariableFields via attributes is now deprecated in favor of the new .field() method
    • New MyPy Plugin for typechecking VariableFields
  • New datatype FadeStep for processing dimming/fading actions
  • New FadeStepAdapter and FadeStepRamp for connecting FadeStep-typed objects to Range-typed Variables
  • Added Support for KNX DPT 3.xxx (Dimming) with new datatype KNXControlDimming, compatible with FadeStep

0.4.0

26 Sep 12:26
9ad6e30
Compare
Choose a tag to compare
  • New decorator @expression for creating SHC expressions from simple Python functions
  • New Multiplexer expression
  • New Ramp generators
  • New interface Ping
  • New energy sensor connectors for Tasmota interface
  • Frontend web assets are now pulled from NPM and bundled with Parcel.js when building the Python distribution
  • Updated frontend web asset versions
  • Updated Python dependency versions, esp. adding support for Jinja2 3.x.

Version 0.3.1 (development snapshot)

17 Jun 10:54
f4c0e0d
Compare
Choose a tag to compare

Fixes

  • shc.handler() decorator does not mistake Expressions in the origin for recursive execution of the handler anymore