Smarthomeconnect

Latest version: v0.8.0

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

Scan your dependencies

Page 1 of 2

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))

0.6.0

New Features

- Compatibility with Python 3.10 (thanks to fabaff)
- New [**Telegram Bot** interface](https://smarthomeconnect.readthedocs.io/en/latest/interfaces/telegram.html)
- New [**Command** interface](https://smarthomeconnect.readthedocs.io/en/latest/interfaces/misc.html#command) for executing arbitrary shell commands and using their exit code or STDOUT in SHC (thanks to fabaff)


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()`](https://smarthomeconnect.readthedocs.io/en/latest/web.html#shc.web.interface.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

- Added [docstring for `Connectable.connect()`](https://smarthomeconnect.readthedocs.io/en/latest/base.html#shc.base.Connectable.connect)
- Added [documentation of the HTTP/REST and websocket API](https://smarthomeconnect.readthedocs.io/en/latest/web.html#configuring-the-http-rest-websocket-api)
- Added [documentation for configuring web UI](https://smarthomeconnect.readthedocs.io/en/latest/web.html#configuring-the-user-interface)
- Added [documentation and example for creating custom web UI Widgets](https://smarthomeconnect.readthedocs.io/en/latest/web.html#creating-custom-widgets)

0.5.0

- New [Pulseaudio interface](https://smarthomeconnect.readthedocs.io/en/latest/interfaces/pulse.html) for monitoring and controlling volumes, mute and sink/source state
- New `Variable.field()` method for accessing VariableFields of NamedTuple-typed variables (see [Docs](https://smarthomeconnect.readthedocs.io/en/latest/variables_expressions.html#tuple-field-access))
- **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`](https://smarthomeconnect.readthedocs.io/en/latest/datatypes.html#shc.datatypes.FadeStep) for processing dimming/fading actions
- New [`FadeStepAdapter`](https://smarthomeconnect.readthedocs.io/en/latest/misc.html#shc.misc.FadeStepAdapter) and [`FadeStepRamp`](https://smarthomeconnect.readthedocs.io/en/latest/timer.html#shc.timer.FadeStepRamp) for connecting FadeStep-typed objects to Range-typed Variables
- Added Support for KNX DPT 3.xxx (Dimming) with new datatype [`KNXControlDimming`](https://smarthomeconnect.readthedocs.io/en/latest/interfaces/knx.html#shc.interfaces.knx.KNXControlDimming), compatible with FadeStep

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.