Commit graph

2516 commits

Author SHA1 Message Date
7d90b274ae
Make sure that any existing device monitor is terminated upon disconnection 2023-01-07 23:48:02 +01:00
40bdc3b7f3
Always wait 5 seconds (regardless of the poll interval) in case of errors.
Also, print the error only on the first occurrence, to prevent log
spamming.
2023-01-07 23:21:59 +01:00
c5cf9803ff
Take into account the notify_only_if_changed parameter 2023-01-07 23:09:42 +01:00
2ee810bdc4
Added missing event to documentation 2023-01-07 22:39:23 +01:00
a77206800d
Added HID plugin to support interaction with generic HID devices 2023-01-07 22:30:32 +01:00
dd3c4b10c7
Run register_service in a separate thread in backend.http.
The Zeroconf registration part may randomly get stuck, resulting in the
web server not being properly started.

It's therefore better to run the Zeroconf registration process
asynchronously, for it's not strictly required for the web server to
execute.
2023-01-01 13:19:11 +01:00
84ce31cab0
Bump version: 0.24.3 → 0.24.4 2022-12-20 23:05:42 +01:00
d0d333e8f4
FIX: Clear the cronjob event after receiving a TIME_SYNC.
When a cronjob receives a TIME_SYNC event (because the system clock has
changed/drifted and the cronjobs are expected to recalculate their next
run slot) it should also clear the event.

Otherwise, the next `wait` will be skipped and the cronjob will be
executed even if it wasn't scheduled.
2022-12-20 23:01:03 +01:00
6666f5581c
Bump version: 0.24.2 → 0.24.3 2022-12-17 00:31:22 +01:00
3279a6ca53 Merge pull request 'Add author and tags attributes to RSS feed entries' (#238) from 236-add-author-and-tags-columns-to-feeds into master
Reviewed-on: platypush/platypush#238
2022-12-17 00:25:09 +01:00
152ebdf737
[#236] Added author and tags attributes to new feed entry event and schema objects. 2022-12-17 00:21:32 +01:00
cd569c76aa
Changed deprecated format of description_file in setup.cfg 2022-12-16 23:20:26 +01:00
2ee2a1d7b5
Replaced disable_logging with a more generic logging_level.
The `disable_logging` attribute was only available on events and
responses, and it could only either entirely disable or enable logging
for all the events of a certain type.

The new flag allows more customization by setting the default logging
level used for any message of a certain type (or `None` to disable
logging). This makes it possible to e.g. set some verbose events to
debug level, and the user can see them if they configure the application
in debug mode.

It also delegates the logging logic to the message itself, instead of
having different parts of the application handling their own logic.
2022-12-11 11:46:37 +01:00
aa3479abeb
Added [-v|--verbose] and --version options to the command line. 2022-12-11 10:59:12 +01:00
4c8190ac14
Bump version: 0.24.1 → 0.24.2 2022-12-10 15:37:49 +01:00
6713bf6994
Fixed backend.zwave event logic dispatch for recent versions of ZWaveJS.
ZWaveJS has broken back-compatibility with zwavejs2mqtt when it comes to
events format.

Only a partial representation of the node and value objects is
forwarded, and that's often not sufficient to infer the full state of
the node with its values.

The `_dispatch_event` logic has therefore been modified to accommodate
both the implementation.

This means that we have to go conservative in order to preserve
back-compatibility and not over-complicate things, even if it (slightly)
comes at the expense of performance.
2022-12-10 15:35:09 +01:00
a17bc3c474 main.db should use the configured workdir when not specified.' (#235)
Reviewed-on: platypush/platypush#235
Closes: platypush/platypush#234
2022-12-09 23:41:07 +01:00
219a0a99ca main.db should use the configured workdir when not specified.
Closes: #234
Reviewed-On: platypush/platypush#234
2022-12-09 23:37:10 +01:00
3b1147eaae Bump version: 0.24.0 → 0.24.1 2022-12-08 12:33:34 +01:00
5ba3fa1b5b FIX: Parenthesized context managers are only available in Python >= 3.10
Since Parenthesized context managers are only supported on very recent
versions of Python (thanks black for breaking back-compatibility), we
should still use the old multiline syntax - it's not worth breaking
compatibility with Python >= 3.6 and < 3.10 just to avoid typing a
backslash.
2022-12-08 12:28:36 +01:00
00a918dd20
Support for the new way of reporting events on ZWaveJS-UI.
The most recent versions of ZwaveJS-UI don't send the `hexId` of the
node on node change events. We have therefore to infer it from the
reported `dbLink`.
2022-12-04 20:56:52 +01:00
73f6712f7a
Bump version: 0.23.6 → 0.24.0 2022-11-22 00:12:25 +01:00
d95baac74e Add user credentials on the encrypted JWT token.
Adding the credentials ensures that tokens associated to non-existing
users, or users with an invalid password, won't be accepted, even if
they were correctly encrypted using the host's keypair.

This adds an additional layer of security in case the host's keypair
gets compromised.
2022-11-21 13:16:09 +01:00
98d7c95aa7 Removed two unrequired return statements 2022-11-21 13:04:48 +01:00
a2c8e27bd8 Removed PyJWT dependency.
PyJWT is a very brittle and cumbersome dependency that expects several
cryptography libraries to be already installed on the system, and it can
lead to hard-to-debug errors when ported to different systems.

Moreover, it installs the whole `cryptography` package, which is several
MBs in size, takes time to compile, and it requires a Rust compiler to
be present on the target machine.

Platypush will now use the Python-native `rsa` module to handle JWT
tokens.
2022-11-21 12:30:38 +01:00
02f89258b8
FIX: Task.set_name only works on Python >= 3.8 2022-11-21 09:49:57 +01:00
b8215d2736 A more robust cron start logic
If may happen (usually because of a race condition) that a cronjob has
already been started, but it hasn't yet changed its status from IDLE to
RUNNING when the scheduler checks it.

This fix guards the application against such events. If they occur, we
should just report them and move on, not terminate the whole scheduler.
2022-10-27 10:45:59 +02:00
a5db599268
FIX: Skip empty lines on config.include 2022-10-14 20:56:18 +02:00
b88983f055
Added qos argument to mqtt.publish. 2022-10-05 01:13:47 +02:00
85f583a0ad
Reduced :maxdepth: of toctree in documentation.
Recent versions of Sphinx get a bit too zealous about generating deeply
nested toctrees.
2022-09-30 11:47:19 +02:00
fed7c2c6ff
Fixed typo in schema path 2022-09-30 11:30:57 +02:00
1d78c3e753
FIX: Broken docstring 2022-09-30 10:56:08 +02:00
00d47731c5 Merge pull request 'Mimic3 integration' (#227) from 226-mimic3-integration into master
Reviewed-on: platypush/platypush#227
2022-09-30 10:52:53 +02:00
ae226a5b01
Added tts.mimic3 integration.
Closes: #226
2022-09-30 10:51:17 +02:00
fef7aff245
LINT fixes for mpv plugin 2022-09-30 10:41:56 +02:00
82ab7face2
A more robust logic to detect the webserver local bind address 2022-09-30 03:10:37 +02:00
3ed10092ae Merge pull request 'Wallabag integration' (#225) from 222-wallabag-integration into master
Reviewed-on: platypush/platypush#225
2022-09-29 10:52:16 +02:00
4bab9d2607
[#224] Implemented Wallabag integration 2022-09-29 10:51:16 +02:00
a0575ed6de
Bump version: 0.23.5 → 0.23.6 2022-09-19 20:41:02 +02:00
3d74f0a11f
Updated CHANGELOG 2022-09-19 20:40:54 +02:00
09baceab4b
Include album_id and the list of tracks in music.tidal.get_album 2022-09-19 20:39:21 +02:00
c2a3f2f4f3
Bump version: 0.23.4 → 0.23.5 2022-09-18 19:55:05 +02:00
36dd645209
Use session.playlist instead of session.user.playlist to query playlists 2022-09-18 06:04:53 +02:00
61cda60751
Proper implementation for Tidal's add_to_playlist and remove_from_playlist methods
- Using tidalapi's `UserPlaylist.add` and `UserPlaylist.delete` methods
  instead of defining my own through `_api_request`, so we won't have to
  deal with the logic to set the ETag header.

- Added `remove_from_playlist` method.
2022-09-18 05:22:12 +02:00
7c610adc84
FIX: Apply expanduser to the credentials_file setting in music.tidal 2022-09-17 06:30:20 +02:00
a9ebb4805a
Fixed doc warnings 2022-09-17 06:25:28 +02:00
1b405de0d5
Added missing docs 2022-09-17 06:09:39 +02:00
e1aa214bad tidal-integration (#223)
Reviewed-on: platypush/platypush#223
2022-09-16 21:48:09 +02:00
41acf4b253
Generate event ID as true random strings, not MD5 hashes of UUIDs 2022-09-05 03:08:39 +02:00
c77746e278 If the output of a hook is null, make sure to normalize it an empty string before pushing it to Redis 2022-09-04 16:16:02 +02:00