graphit/controlpi.git
20 months agoDocumentation: Added link to tutorials/controlpi-plugin master v0.3.1
Benjamin Braatz [Mon, 4 Sep 2023 17:53:15 +0000 (19:53 +0200)]
Documentation: Added link to tutorials/controlpi-plugin

20 months agoCancel all tasks, deliver messages in separate tasks
Benjamin Braatz [Mon, 4 Sep 2023 16:24:48 +0000 (18:24 +0200)]
Cancel all tasks, deliver messages in separate tasks

21 months agoDo not reload configuration anymore. v0.3.0
Benjamin Braatz [Tue, 18 Jul 2023 23:08:51 +0000 (01:08 +0200)]
Do not reload configuration anymore.

21 months agoRepair mypy and doctest. Bump to 0.3.0.
Benjamin Braatz [Mon, 17 Jul 2023 01:04:36 +0000 (03:04 +0200)]
Repair mypy and doctest. Bump to 0.3.0.

3 years agoAdd possibility to query the source states of And and Or.
Benjamin Braatz [Tue, 25 Jan 2022 21:08:54 +0000 (22:08 +0100)]
Add possibility to query the source states of And and Or.

3 years agoBump version.
Benjamin Braatz [Wed, 10 Nov 2021 11:46:15 +0000 (12:46 +0100)]
Bump version.

3 years agoRemove old-style callback (plus multiple fixes).
Benjamin Braatz [Wed, 10 Nov 2021 10:47:21 +0000 (11:47 +0100)]
Remove old-style callback (plus multiple fixes).

3 years agoUse multiple receive callback functionality everywhere.
Benjamin Braatz [Wed, 10 Nov 2021 10:28:35 +0000 (11:28 +0100)]
Use multiple receive callback functionality everywhere.

3 years agoUse new register in state.py.
Benjamin Braatz [Wed, 3 Nov 2021 02:46:24 +0000 (03:46 +0100)]
Use new register in state.py.

3 years agoAllow different callbacks for different message templates.
Benjamin Braatz [Tue, 2 Nov 2021 22:01:19 +0000 (23:01 +0100)]
Allow different callbacks for different message templates.

3 years agoManage callbacks in TemplateRegistry.
Benjamin Braatz [Wed, 27 Oct 2021 12:24:36 +0000 (14:24 +0200)]
Manage callbacks in TemplateRegistry.

3 years agoAdd dates to Counter.
Benjamin Braatz [Wed, 27 Oct 2021 09:15:48 +0000 (11:15 +0200)]
Add dates to Counter.

3 years agoImplement Counter and Date plugins in util.py.
Benjamin Braatz [Mon, 25 Oct 2021 08:21:14 +0000 (10:21 +0200)]
Implement Counter and Date plugins in util.py.

3 years agoHarmonise order of methods (process_conf at top).
Benjamin Braatz [Fri, 22 Oct 2021 08:01:33 +0000 (10:01 +0200)]
Harmonise order of methods (process_conf at top).

3 years agoAllow multiple sent messages in Alias.
Benjamin Braatz [Wed, 20 Oct 2021 10:07:09 +0000 (12:07 +0200)]
Allow multiple sent messages in Alias.

3 years agoAdd 'get state' command to AndSet and OrSet.
Benjamin Braatz [Wed, 20 Oct 2021 07:03:59 +0000 (09:03 +0200)]
Add 'get state' command to AndSet and OrSet.

3 years agoPrevent endless loop in Alias.
Benjamin Braatz [Wed, 22 Sep 2021 12:36:02 +0000 (14:36 +0200)]
Prevent endless loop in Alias.

3 years agoImprovements in Message and Alias.
Benjamin Braatz [Wed, 22 Sep 2021 12:22:16 +0000 (14:22 +0200)]
Improvements in Message and Alias.

* Explicitly given sender has higher priortity in Message constructor.
* Alias retains everything except explicitly modified keys in 'to' and
  'translate'.

3 years agoAdd cancellable Timer.
Benjamin Braatz [Wed, 22 Sep 2021 01:45:04 +0000 (03:45 +0200)]
Add cancellable Timer.

3 years agoOnly send message if bus client callback still there.
Benjamin Braatz [Wed, 8 Sep 2021 12:44:44 +0000 (14:44 +0200)]
Only send message if bus client callback still there.

3 years agoStreamline doctests and reorder methods in state.py.
Benjamin Braatz [Wed, 8 Sep 2021 09:20:39 +0000 (11:20 +0200)]
Streamline doctests and reorder methods in state.py.

3 years agoAdd AndSet and OrSet.
Benjamin Braatz [Wed, 8 Sep 2021 09:14:43 +0000 (11:14 +0200)]
Add AndSet and OrSet.

3 years agoUse fastjsonschema instead of jsonschema.
Benjamin Braatz [Fri, 3 Sep 2021 21:00:57 +0000 (23:00 +0200)]
Use fastjsonschema instead of jsonschema.

3 years agoCache JSON schema validator for each plugin class.
Benjamin Braatz [Fri, 3 Sep 2021 15:56:37 +0000 (17:56 +0200)]
Cache JSON schema validator for each plugin class.

3 years agoEfficient treatment of constants in TemplateRegistry.
Benjamin Braatz [Fri, 3 Sep 2021 14:12:31 +0000 (16:12 +0200)]
Efficient treatment of constants in TemplateRegistry.

3 years agoFactor out dependencies to jsonschema.
Benjamin Braatz [Fri, 3 Sep 2021 13:01:38 +0000 (15:01 +0200)]
Factor out dependencies to jsonschema.

3 years agoCache templates during insert.
Benjamin Braatz [Wed, 1 Sep 2021 10:46:22 +0000 (12:46 +0200)]
Cache templates during insert.

3 years agoCache get_templates results.
Benjamin Braatz [Wed, 1 Sep 2021 10:31:43 +0000 (12:31 +0200)]
Cache get_templates results.

3 years agoGlobal cache of validators.
Benjamin Braatz [Wed, 1 Sep 2021 10:22:46 +0000 (12:22 +0200)]
Global cache of validators.

3 years agoCache the JSON schema validators.
Benjamin Braatz [Wed, 1 Sep 2021 09:49:25 +0000 (11:49 +0200)]
Cache the JSON schema validators.

3 years agoExport BusException (and code style fixes).
Benjamin Braatz [Wed, 11 Aug 2021 08:02:28 +0000 (10:02 +0200)]
Export BusException (and code style fixes).

3 years agoConf changed message before writing.
Benjamin Braatz [Tue, 27 Jul 2021 09:46:28 +0000 (11:46 +0200)]
Conf changed message before writing.

3 years agoBugfix
Benjamin Braatz [Tue, 27 Jul 2021 03:38:51 +0000 (05:38 +0200)]
Bugfix

3 years agoAdd translated keys to Alias plugin.
Benjamin Braatz [Tue, 27 Jul 2021 02:35:37 +0000 (04:35 +0200)]
Add translated keys to Alias plugin.

3 years agoConfig push on main object instead of plugin.
Benjamin Braatz [Tue, 27 Jul 2021 02:01:32 +0000 (04:01 +0200)]
Config push on main object instead of plugin.

3 years agoPeriodic message plugin.
Benjamin Braatz [Mon, 26 Jul 2021 21:45:46 +0000 (23:45 +0200)]
Periodic message plugin.

3 years agoPlugin for pushing configuration.
Benjamin Braatz [Mon, 26 Jul 2021 15:36:28 +0000 (17:36 +0200)]
Plugin for pushing configuration.

3 years agoOnly reread configuration if file itself modified.
Benjamin Braatz [Mon, 26 Jul 2021 14:23:59 +0000 (16:23 +0200)]
Only reread configuration if file itself modified.

3 years agoReload configuration on change.
Benjamin Braatz [Wed, 30 Jun 2021 01:18:05 +0000 (03:18 +0200)]
Reload configuration on change.

3 years agoFix for Python versions without asyncio.exceptions.
Benjamin Braatz [Wed, 16 Jun 2021 10:26:30 +0000 (12:26 +0200)]
Fix for Python versions without asyncio.exceptions.

4 years agoAdd non-blocking sending to messagebus.
Benjamin Braatz [Wed, 24 Mar 2021 00:15:41 +0000 (01:15 +0100)]
Add non-blocking sending to messagebus.

4 years agoCorrect assertion for seconds in GenericWait.
Benjamin Braatz [Mon, 22 Mar 2021 22:01:02 +0000 (23:01 +0100)]
Correct assertion for seconds in GenericWait.

4 years agoImprove example in conf.json and index.md.
Benjamin Braatz [Mon, 22 Mar 2021 08:51:23 +0000 (09:51 +0100)]
Improve example in conf.json and index.md.

4 years agoImprove documentation.
Benjamin Braatz [Sun, 21 Mar 2021 22:39:16 +0000 (23:39 +0100)]
Improve documentation.

4 years agoAdd pdoc3-generated API documentation.
Benjamin Braatz [Sun, 21 Mar 2021 20:28:25 +0000 (21:28 +0100)]
Add pdoc3-generated API documentation.

4 years agoRename to controlpi_plugins in setup.py.
Benjamin Braatz [Sun, 21 Mar 2021 16:42:30 +0000 (17:42 +0100)]
Rename to controlpi_plugins in setup.py.

4 years agoDocument and test wait.py.
Benjamin Braatz [Sun, 21 Mar 2021 16:36:15 +0000 (17:36 +0100)]
Document and test wait.py.

4 years agoAdd wait parameter to test function.
Benjamin Braatz [Sun, 21 Mar 2021 16:35:30 +0000 (17:35 +0100)]
Add wait parameter to test function.

4 years agoFix documentation in state.py.
Benjamin Braatz [Sun, 21 Mar 2021 15:12:00 +0000 (16:12 +0100)]
Fix documentation in state.py.

4 years agoRename to controlpi_plugins (naming conventions).
Benjamin Braatz [Sun, 21 Mar 2021 15:05:41 +0000 (16:05 +0100)]
Rename to controlpi_plugins (naming conventions).

4 years agoAdd AndState and OrState, document/test state.py.
Benjamin Braatz [Sun, 21 Mar 2021 03:38:18 +0000 (04:38 +0100)]
Add AndState and OrState, document/test state.py.

4 years agoAdapt message order in some tests.
Benjamin Braatz [Sun, 21 Mar 2021 02:03:28 +0000 (03:03 +0100)]
Adapt message order in some tests.

4 years agoAdapt Init test to stronger CONF_SCHEMA.
Benjamin Braatz [Sun, 21 Mar 2021 01:53:09 +0000 (02:53 +0100)]
Adapt Init test to stronger CONF_SCHEMA.

4 years agoAdd Execute plugin.
Benjamin Braatz [Sat, 20 Mar 2021 23:38:55 +0000 (00:38 +0100)]
Add Execute plugin.

4 years agoDocument and test util.py.
Benjamin Braatz [Sat, 20 Mar 2021 23:08:56 +0000 (00:08 +0100)]
Document and test util.py.

4 years agoAdd tests for __init__.py.
Benjamin Braatz [Sat, 20 Mar 2021 20:53:49 +0000 (21:53 +0100)]
Add tests for __init__.py.

4 years agoRepair test case in baseplugin.py.
Benjamin Braatz [Sat, 20 Mar 2021 15:27:07 +0000 (16:27 +0100)]
Repair test case in baseplugin.py.

4 years agoAdd test() function to __init__.py.
Benjamin Braatz [Sat, 20 Mar 2021 01:20:06 +0000 (02:20 +0100)]
Add test() function to __init__.py.

4 years agoAdd pdoc3 to setup.py and index.md.
Benjamin Braatz [Wed, 17 Mar 2021 14:43:52 +0000 (15:43 +0100)]
Add pdoc3 to setup.py and index.md.

4 years agoSplit util.py and start documentation
Benjamin Braatz [Wed, 17 Mar 2021 14:39:15 +0000 (15:39 +0100)]
Split util.py and start documentation

4 years agoUse typing.Dict/List for dict/list in type hints.
Benjamin Braatz [Wed, 17 Mar 2021 08:48:06 +0000 (09:48 +0100)]
Use typing.Dict/List for dict/list in type hints.

Generic dict/list is only possible with Python 3.9, not 3.8.

4 years agoMove BasePlugin in own module baseplugin.
Benjamin Braatz [Wed, 17 Mar 2021 05:40:03 +0000 (06:40 +0100)]
Move BasePlugin in own module baseplugin.

* Plugin configurations checked with jsonschema
* More coherent syntax

4 years agoImplement Message and MessageTemplate classes
Benjamin Braatz [Wed, 17 Mar 2021 02:14:45 +0000 (03:14 +0100)]
Implement Message and MessageTemplate classes

4 years agoFix missing comma in setup.py
Benjamin Braatz [Wed, 10 Mar 2021 07:10:11 +0000 (08:10 +0100)]
Fix missing comma in setup.py

4 years agoAdd plugin name to registration on bus
Benjamin Braatz [Tue, 9 Mar 2021 17:56:25 +0000 (18:56 +0100)]
Add plugin name to registration on bus

4 years agoAdd dependency on jsonschema in setup.py
Benjamin Braatz [Tue, 9 Mar 2021 07:48:15 +0000 (08:48 +0100)]
Add dependency on jsonschema in setup.py

4 years agoAdd templates for sent messages in Init and Alias
Benjamin Braatz [Mon, 8 Mar 2021 20:58:02 +0000 (21:58 +0100)]
Add templates for sent messages in Init and Alias

4 years agoUse JSON schema in message templates
Benjamin Braatz [Mon, 8 Mar 2021 17:28:41 +0000 (18:28 +0100)]
Use JSON schema in message templates

4 years agoAccept int where float specified
Benjamin Braatz [Sun, 7 Mar 2021 02:20:55 +0000 (03:20 +0100)]
Accept int where float specified

JSON does not distinguish int and float.

4 years agoFix codestyle in State
Benjamin Braatz [Sun, 7 Mar 2021 02:20:32 +0000 (03:20 +0100)]
Fix codestyle in State

4 years agoAdd GenericWait plugin
Benjamin Braatz [Sun, 7 Mar 2021 00:34:06 +0000 (01:34 +0100)]
Add GenericWait plugin

4 years agoState answers to 'set state' also if unchanged
Benjamin Braatz [Sun, 7 Mar 2021 00:26:33 +0000 (01:26 +0100)]
State answers to 'set state' also if unchanged

4 years agoReplace 'state' by 'new state' in 'set state'
Benjamin Braatz [Fri, 5 Mar 2021 22:34:56 +0000 (23:34 +0100)]
Replace 'state' by 'new state' in 'set state'

4 years agoSwitch README.md and description to English
Benjamin Braatz [Fri, 5 Mar 2021 14:20:44 +0000 (15:20 +0100)]
Switch README.md and description to English

4 years agoInstall wheel package in documentation
Benjamin Braatz [Fri, 5 Mar 2021 10:59:49 +0000 (11:59 +0100)]
Install wheel package in documentation

pip warns if wheels cannot be build.

4 years agoHarmonise state message conventions
Benjamin Braatz [Fri, 5 Mar 2021 10:55:35 +0000 (11:55 +0100)]
Harmonise state message conventions

Change from 'changed' Boolean to 'event': 'changed',
document 'event': 'changed', 'get state' and 'set state'.

4 years agoasyncio.sleep(0.01) to asyncio.sleep(0) in tests
Benjamin Braatz [Fri, 5 Mar 2021 10:05:14 +0000 (11:05 +0100)]
asyncio.sleep(0.01) to asyncio.sleep(0) in tests

A sleep time of 0 is enough to give control back to the event loop.

4 years agoSend iface at register, 'bus event' to 'event'
Benjamin Braatz [Fri, 5 Mar 2021 09:34:50 +0000 (10:34 +0100)]
Send iface at register, 'bus event' to 'event'

4 years agoMove controlpi.plugins to controlpi-plugins
Benjamin Braatz [Fri, 5 Mar 2021 00:32:39 +0000 (01:32 +0100)]
Move controlpi.plugins to controlpi-plugins

Namespace packages should not be inside regular packages:
https://stackoverflow.com/a/62992832

4 years agoRename "State" to "Example State" in conf.json
Benjamin Braatz [Thu, 4 Mar 2021 23:07:30 +0000 (00:07 +0100)]
Rename "State" to "Example State" in conf.json

4 years agoMake package PEP 561 compatible
Benjamin Braatz [Thu, 4 Mar 2021 21:14:44 +0000 (22:14 +0100)]
Make package PEP 561 compatible

https://mypy.readthedocs.io/en/latest/installed_packages.html#creating-pep-561-compatible-packages

4 years agoImprove documentation
Benjamin Braatz [Wed, 3 Mar 2021 15:07:24 +0000 (16:07 +0100)]
Improve documentation

4 years agoAdd documentation
Benjamin Braatz [Tue, 2 Mar 2021 21:29:52 +0000 (22:29 +0100)]
Add documentation

4 years agoAdd forgotten super() calls in util.py
Benjamin Braatz [Tue, 2 Mar 2021 21:29:18 +0000 (22:29 +0100)]
Add forgotten super() calls in util.py

4 years agoInclude development dependencies in setup.py
Benjamin Braatz [Tue, 2 Mar 2021 20:09:13 +0000 (21:09 +0100)]
Include development dependencies in setup.py

4 years agoFix doctests for pluginregistry.py
Benjamin Braatz [Tue, 2 Mar 2021 19:59:12 +0000 (20:59 +0100)]
Fix doctests for pluginregistry.py

4 years agoReorder conf.json documentation-friendly
Benjamin Braatz [Tue, 2 Mar 2021 16:58:11 +0000 (17:58 +0100)]
Reorder conf.json documentation-friendly

4 years agoAdd State plugin with example in conf.json
Benjamin Braatz [Tue, 2 Mar 2021 16:48:13 +0000 (17:48 +0100)]
Add State plugin with example in conf.json

4 years agoAdd Alias plugin with example in conf.json
Benjamin Braatz [Tue, 2 Mar 2021 16:16:04 +0000 (17:16 +0100)]
Add Alias plugin with example in conf.json

4 years agoAdd example controlpi.service systemd unit
Benjamin Braatz [Tue, 2 Mar 2021 16:09:32 +0000 (17:09 +0100)]
Add example controlpi.service systemd unit

4 years agoFix packages in setup.py
Benjamin Braatz [Tue, 2 Mar 2021 16:09:04 +0000 (17:09 +0100)]
Fix packages in setup.py

4 years agoRepair type annotations in util.py
Benjamin Braatz [Tue, 2 Mar 2021 08:49:24 +0000 (09:49 +0100)]
Repair type annotations in util.py

4 years agoAdded __main__.py and made ready to execute
Benjamin Braatz [Tue, 2 Mar 2021 08:40:08 +0000 (09:40 +0100)]
Added __main__.py and made ready to execute

4 years agoMessage bus including command to get client interfaces
Benjamin Braatz [Mon, 1 Mar 2021 22:53:25 +0000 (23:53 +0100)]
Message bus including command to get client interfaces

4 years agoCurrent state
Benjamin Braatz [Mon, 1 Mar 2021 08:05:12 +0000 (09:05 +0100)]
Current state

4 years agoPlugin classes instead of modules
Benjamin Braatz [Wed, 24 Feb 2021 14:08:10 +0000 (15:08 +0100)]
Plugin classes instead of modules

4 years agoUnregister, aliases and some other improvements
Benjamin Braatz [Wed, 24 Feb 2021 09:04:23 +0000 (10:04 +0100)]
Unregister, aliases and some other improvements

4 years agoInitial commit
Benjamin Braatz [Wed, 24 Feb 2021 05:16:00 +0000 (06:16 +0100)]
Initial commit