Smarthomeconnect

Latest version: v0.9.0

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.9.0

Breaking Changes

* Dropped Python 3.7 support when using [mqtt] or [telegram] feature (due to update to `aiomqtt` and `aiogram` 3.x)

New Features

* Python 3.12 support
* All Python and frontend dependencies updated to the latest version
* New utility class [`DelayedVariable`](https://smarthomeconnect.readthedocs.io/en/stable/variables_expressions.html#shc.variables.DelayedVariable)
* New display options for `shc.web.log_widgets.ChartWidget`:
* Area charts, dots or pure line charts via [`plot_style`](https://smarthomeconnect.readthedocs.io/en/stable/web/log_widgets.html#shc.web.log_widgets.ChartDataSpec.plot_style)
* custom line interpolation (stepped vs. smooth) via [`line_interpolation`](https://smarthomeconnect.readthedocs.io/en/stable/web/log_widgets.html#shc.web.log_widgets.ChartDataSpec.line_interpolation)
* Stacked lines/areas via [`stack_group`](https://smarthomeconnect.readthedocs.io/en/stable/web/log_widgets.html#shc.web.log_widgets.ChartDataSpec.stack_group)

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 → build](https://github.com/mhthies/smarthomeconnect/actions/workflows/build.yml) → *run* → Artifacts)

**Full Changelog**: https://github.com/mhthies/smarthomeconnect/compare/v0.8.0...v0.9.0

0.8.1

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**: https://github.com/mhthies/smarthomeconnect/compare/v0.8.0...v0.8.1

0.8.0

Breaking Changes
* Replaced interfaces' `get_status()` method with [`monitoring_connector()`](https://smarthomeconnect.readthedocs.io/en/stable/interfaces_custom.html#shc.supervisor.AbstractInterface.monitoring_connector), returning a *Readable* (and optionally *Subscribable*) connector object, providing the interface health state as `InterfaceStatus` value
* Custom interfaces with `get_status()` implementation need to be adapted, e.g. by inheriting from [`ReadableStatusInterface`](https://smarthomeconnect.readthedocs.io/en/stable/interfaces_custom.html#shc.interfaces._helper.ReadableStatusInterface) or [`SubscribableStatusInterface`](https://smarthomeconnect.readthedocs.io/en/stable/interfaces_custom.html#shc.interfaces._helper.SubscribableStatusInterface) or creating a custom monitoring connector
* See [Monitoring of Interface Status](https://smarthomeconnect.readthedocs.io/en/stable/supervisor.html#monitoring-of-interface-status) in docs
* 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](https://smarthomeconnect.readthedocs.io/en/stable/supervisor.html#shc.interfaces.system_monitoring.EventLoopMonitor) interface)
* Attribute `criticality` of interfaces has been removed
* individual interface criticality for the overall application status, reported via the HTTP monitoring endpoint, needs to be configured via [`WebServer.configure_monitoring`](https://smarthomeconnect.readthedocs.io/en/stable/web.html#shc.web.interface.WebServer.configure_monitoring) (see ["Monitoring via HTTP" in docs for more details](https://smarthomeconnect.readthedocs.io/en/stable/web.html#monitoring-via-http))
* `shc.log.generic` moved to `shc.data_logging`
* `PersistenceVariable` has been renamed to `DataLogVariable` and completely reworked in its internal interface and behaviour.
* See [Data Logging](https://smarthomeconnect.readthedocs.io/en/stable/data_logging.html) in docs for further information
* `shc.log.in_memory` moved to `shc.interfaces.in_memory_data_logging` and `InMemoryPersistenceVariable` has been renamed to [`InMemoryDataLogVariable`](https://smarthomeconnect.readthedocs.io/en/stable/data_logging.html#shc.interfaces.in_memory_data_logging.InMemoryDataLogVariable)
* `shc.log.mysql` moved to `shc.interfaces.mysql` and `MySQLPersistence` has been renamed to [`MySQLConnector`](https://smarthomeconnect.readthedocs.io/en/stable/interfaces/mysql.html#shc.interfaces.mysql.MySQLConnector)
* Interface of `MySQLConnector` for retrieving non-logging persistence connector objects has been reworked, with new method [`persistence_variable()`](https://smarthomeconnect.readthedocs.io/en/stable/interfaces/mysql.html#shc.interfaces.mysql.MySQLConnector.persistence_variable)
* New database schema for MySQL interface (when used for value persistence without data logging)


New Features
* New [`EventLoopMonitor` interface](https://smarthomeconnect.readthedocs.io/en/stable/supervisor.html#shc.interfaces.system_monitoring.EventLoopMonitor), 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](https://github.com/mhthies/smarthomeconnect/blob/v0.8.0/shc/util/check_shc.py) for monitoring the SHC server health via the HTTP monitoring endpoint
* New [`SimpleInputConnector`](https://smarthomeconnect.readthedocs.io/en/stable/misc.html#shc.misc.SimpleInputConnector) and [`SimpleOutputConnector`](https://smarthomeconnect.readthedocs.io/en/stable/misc.html#shc.misc.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](https://smarthomeconnect.readthedocs.io/en/stable/interfaces/tasmota.html#shc.interfaces.tasmota.TasmotaInterface.telemetry) for Tasmota interface.
* New [energy connector](https://smarthomeconnect.readthedocs.io/en/stable/interfaces/tasmota.html#shc.interfaces.tasmota.TasmotaInterface.energy) for Tasmota interface
* **old `energy_x()` connectors are deprecated and will be removed in a future release**


Misc Improvements
* Improved documentation for web UI widgets: https://smarthomeconnect.readthedocs.io/en/stable/web/widgets.html
* Update UI frontend JS dependencies
* Exceptions during startup are logged and handled gracefully now
* Tests and documentation for MySQL interface
* New settings [`scale_factor`](https://smarthomeconnect.readthedocs.io/en/stable/web/log_widgets.html#shc.web.log_widgets.ChartDataSpec.scale_factor) and [`unit_symbol`](https://smarthomeconnect.readthedocs.io/en/stable/web/log_widgets.html#shc.web.log_widgets.ChartDataSpec.unit_symbol) for ChartWidgets

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

New Features
- The [Slider](https://smarthomeconnect.readthedocs.io/en/latest/web/widgets.html#shc.web.widgets.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**](https://smarthomeconnect.readthedocs.io/en/latest/web/widgets.html#shc.web.widgets.MinMaxButtonSlider) with buttons that move the slider to the minimum/maximum value have
- Added the [**UpdateExchange**](https://smarthomeconnect.readthedocs.io/en/latest/misc.html#shc.misc.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`](https://smarthomeconnect.readthedocs.io/en/latest/base.html#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](https://github.com/mhthies/smarthomeconnect/blob/main/etc/logo.svg) 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](https://github.com/mhthies/smarthomeconnect/blob/main/example/knx_specifics.py) of special configuration tricks for KNX connection
- New [example](https://github.com/mhthies/smarthomeconnect/blob/main/example/sun_position_weather_forecast.py) of using astropy for sun position calculation and OpenWeatherMap for weather forecast

0.6.2

- Fix missing web UI template files in PyPI distribution packages (both, source and wheel distribution)

(see also Changes from [version 0.6.0](https://github.com/mhthies/smarthomeconnect/releases/tag/v0.6.0))

0.6.1

- overhauled (modernized) packaging process
- stripped unnecessary files from package/distribution (esp. old generated web UI artifacts)

(see also Changes from [version 0.6.0](https://github.com/mhthies/smarthomeconnect/releases/tag/v0.6.0))

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.