Releases: mhthies/smarthomeconnect
Releases · mhthies/smarthomeconnect
0.9.0
Breaking Changes
- Dropped Python 3.7 support when using [mqtt] or [telegram] feature (due to update to
aiomqtt
andaiogram
3.x) - Default line interpolation style of un-aggregated
ChartWidget
plots changed toLINEAR
. To return to the old behaviour, addline_interpolation=shc.web.log_widgets.ChartLineInterpolation.STEP_BEFORE
to the respectiveChartDataSpec
. Seeline_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
:- Area charts, dots or pure line charts via
plot_style
- custom line interpolation (stepped vs. smooth) via
line_interpolation
- Stacked lines/areas via
stack_group
- Area charts, dots or pure line charts via
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 → run → Artifacts)
Full Changelog: 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: v0.8.0...v0.8.1
0.8.0
Breaking Changes
- Replaced interfaces'
get_status()
method withmonitoring_connector()
, returning a Readable (and optionally Subscribable) connector object, providing the interface health state asInterfaceStatus
value- Custom interfaces with
get_status()
implementation need to be adapted, e.g. by inheriting fromReadableStatusInterface
orSubscribableStatusInterface
or creating a custom monitoring connector - See Monitoring of Interface Status in docs
- Custom interfaces with
- 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)
- Custom
- 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
(see "Monitoring via HTTP" in docs for more details)
- individual interface criticality for the overall application status, reported via the HTTP monitoring endpoint, needs to be configured via
shc.log.generic
moved toshc.data_logging
PersistenceVariable
has been renamed toDataLogVariable
and completely reworked in its internal interface and behaviour.- See Data Logging in docs for further information
shc.log.in_memory
moved toshc.interfaces.in_memory_data_logging
andInMemoryPersistenceVariable
has been renamed toInMemoryDataLogVariable
shc.log.mysql
moved toshc.interfaces.mysql
andMySQLPersistence
has been renamed toMySQLConnector
- Interface of
MySQLConnector
for retrieving non-logging persistence connector objects has been reworked, with new methodpersistence_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
andSimpleOutputConnector
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
- old
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
andunit_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 web widget now can be supplemented with two buttons to the left and right via the new constructor parameters
left_button
andright_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
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)
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)
0.6.0
New Features
- Compatibility with Python 3.10 (thanks to @fabaff)
- New Telegram Bot interface
- New Command interface 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 (includingWebServer.root_url
) - Web:
WebServer.add_js_file()
andWebServer.add_css_file()
have been replaced withWebServer.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 needinglibpulse
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 inSubscribable._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
- 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
- Deprecation: Access to VariableFields via attributes is now deprecated in favor of the new
- New datatype
FadeStep
for processing dimming/fading actions - New
FadeStepAdapter
andFadeStepRamp
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
- 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)
Fixes
shc.handler()
decorator does not mistake Expressions in the origin for recursive execution of the handler anymore