Commit Graph

43 Commits

Author SHA1 Message Date
Fabio Manganiello 4a8da80c7c
Don't join self._thread on stop in RunnablePlugin if self._thread = current_thread 2023-03-11 23:45:46 +01:00
Fabio Manganiello a688e7102e
Changed default `poll_interval` for `RunnablePlugin`.
30 -> 15 seconds.
2023-03-03 02:00:48 +01:00
Fabio Manganiello 9112239ac3
Better exception management in `AsyncRunnablePlugin`.
Exceptions that cause the termination of the plugin's loop should always
be logged as such, unless the plugin is supposed to stop and various
exceptions may occur upon teardown.
2023-02-19 23:03:27 +01:00
Fabio Manganiello a3aa186ddf
- Added support for `scan_pause`/`scan_resume` on `bluetooth` integration.
- Added `BluetoothDevice` as its own entity type.
2023-02-13 23:12:25 +01:00
Fabio Manganiello 1d0be5c929
- Simplified prototype for `EntityManager.set`
- Added small documentation/annotations notes to the `Plugin` module.

- Small LINT fixes
2023-02-11 21:35:00 +01:00
Fabio Manganiello b0cc80ceb0
Rewriting `bluetooth.ble` plugin to use `bleak` instead of `gattlib`. 2023-02-10 17:40:20 +01:00
Fabio Manganiello e49a0aec4d
Various improvements.
- Better synchronization logic on stop for `AsyncRunnablePlugin`.
- Fixed several thread names by dropping `prctl.set_name` in favour of
  specifying the name directly on thread creation.
- Several LINT fixes.
2023-02-08 00:46:50 +01:00
Fabio Manganiello b8fca97891
Default poll_interval for `RunnablePlugin` set to 30 seconds 2023-02-05 17:31:43 +01:00
Fabio Manganiello de2849546a
LINT fixes 2023-02-04 00:26:48 +01:00
Fabio Manganiello 0e56d0fff6
Double-check if self._thread != None on stop on the ntfy thread
Race conditions may occur here
2023-01-27 22:12:34 +01:00
Fabio Manganiello bb637a1411
Defined a unique `stop_timeout` (default=5) for RunnablePlugin 2023-01-22 14:28:16 +01:00
Fabio Manganiello 02f89258b8
FIX: Task.set_name only works on Python >= 3.8 2022-11-21 09:49:57 +01:00
Fabio Manganiello dba03d3e33
Added AsyncRunnablePlugin class.
This class handles runnable plugins that have their own asyncio event
loop, without the pain usually caused by the management of multiple
threads + asyncio loops.
2022-08-15 02:18:28 +02:00
Fabio Manganiello c32142c8b5
Added wait_stop() method to RunnablePlugin 2022-07-23 17:33:23 +02:00
Fabio Manganiello ffd23cf04d [#212] Support for asynchronous event monitoring on the GPIO plugin 2022-03-27 16:14:30 +02:00
Fabio Manganiello 1a314ffd6b Fixed LGTM errors and warnings 2021-09-17 22:21:29 +02:00
Fabio Manganiello 7b8938cb12 Fixed LGTM errors and warnings 2021-09-17 00:47:33 +02:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00
Fabio Manganiello 371dd6da0a Added `sun` plugin [closes #194] 2021-07-22 01:02:15 +02:00
Fabio Manganiello c269c62fe6 Refactored logging names 2020-09-27 01:33:38 +02:00
Fabio Manganiello ddbe76646b Throw an assert error (no reload/retry mechanism) instead of a runtime error when a method is called outside of the registered plugin actions 2020-01-10 00:07:40 +01:00
Fabio Manganiello 66d00ee428 Added Android IPCam support 2019-12-17 00:56:28 +01:00
Fabio Manganiello 26ee3fc75c Changed nav bar text to icons 2019-07-01 22:26:04 +02:00
Fabio Manganiello 5942a7cd84 Removed unused imports 2019-03-17 00:56:32 +01:00
Fabio Manganiello 0596d77403 Support for camera snapshot and stream endpoints and for disabling logging on response and event messages 2019-03-06 02:01:17 +01:00
Fabio Manganiello a9fb6a38dd New API for firing events and registering/unregistering event handlers
both for plugins and backends
2019-02-28 01:21:25 +01:00
Fabio Manganiello db4e68e247 Do exception logging at Request level and discard duplicate exception messages between retries 2019-01-13 20:09:25 +01:00
Fabio Manganiello 8ea0519954 Support for set/clear timeout/interval utils actions and error handling refactor
- Added set/cler timeout/interval actions in the utils plugin to
dynamically set or stop timed actions from your custom logic

- Actions error handling refactoring. If a Response is processed with
some errors, then just log the error and return it to the caller,
without raising an exception. If instead the action execution raised an
uncaught exception, then handle the retries properly and return errors
as a list with the output from all the retries, without being too
verbose with the returning and logging the whole stack trace multiple
times.
2019-01-13 19:29:08 +01:00
Fabio Manganiello bf52304758 Fixed ReadTheDocs 2018-11-01 19:42:43 +01:00
Fabio Manganiello 7adfb67c12 Fixed Kodi plugin 2018-10-20 19:27:15 +02:00
Fabio Manganiello db4330eeed Support for (output, errors) as a tuple returned from plugin actions 2018-10-20 18:07:00 +02:00
Fabio Manganiello 95d86829aa Plugin action decorators can now be inherited from parent classes 2018-07-17 01:23:12 +02:00
Fabio Manganiello 2888cb3a4b Propagate the docstring of the wrapped function when using an @action annotation 2018-07-16 22:56:07 +02:00
Fabio Manganiello a2898f63c3 - Unwrap the response in the decorator if we got a Response object from the decorated plugin
- No need for @action wrappers around omxplayer event handlers
2018-07-15 02:03:24 +02:00
Fabio Manganiello 66d78c8615 [#61] Plugins actions refactoring
- Using `@action` annotation to indicate methods that are allowed to be
executed as actions

- The output and errors of an action are automatically wrapped into a
`Response` object without any response build required on the plugin side
2018-07-06 02:08:38 +02:00
Fabio Manganiello 81a81312e3 Basic support for token authentication on request level 2018-07-05 09:15:53 +02:00
Fabio Manganiello 2b73f71803 Improved logging traces names for backends and plugins 2018-06-14 02:19:55 +02:00
Fabio Manganiello 4da74b1096 Refactored logging submodule 2018-06-06 20:09:23 +02:00
Fabio Manganiello 4a04e51da7 Major refactoring #2 2017-12-18 01:10:51 +01:00
Fabio Manganiello 33c4d9fb52 s/platypush.response/platypush.message.response/g 2017-12-13 04:21:26 +01:00
Fabio Manganiello 462dc2f1c9 * Sending responses back on the backend channel
* Version bump
2017-12-13 04:14:46 +01:00
Fabio Manganiello 491c2cd571 * More consistent management of responses
* Better per-plugin/per-backend logging management
2017-12-13 03:37:28 +01:00
Fabio Manganiello 6c2ea3767c s/runbullet/platypush/g 2017-12-11 20:30:57 +01:00
Renamed from runbullet/plugins/__init__.py (Browse further)