Commit graph

2505 commits

Author SHA1 Message Date
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
4682fb4210
Throw an assertion error when on_duplicate_update is specified on db.insert with no key_columns 2022-09-04 16:02:37 +02:00
0143dac216
Improved support for bulk database statements
- Wrapped insert/update/delete operations in transactions
- Proper (and much more efficient) bulk logic
- Better upsert logic
- Return inserted/updated records if the engine supports it
2022-09-04 13:30:35 +02:00
a90aa2cb2e Make sure that a webhook function never returns a null response 2022-09-04 00:52:41 +02:00
1ea53a6f50
Support for query placeholders in db.select 2022-09-04 00:28:08 +02:00
e77d6a4ad4 Merge pull request 'Add support for OPML import and export in the RSS plugin' (#220) from 219-opml-import-export into master
Reviewed-on: platypush/platypush#220
2022-09-02 00:24:37 +02:00
61c96612bc Merge branch 'master' into 219-opml-import-export 2022-09-02 00:23:57 +02:00
6c6e68b512
Added support for OPML import and export in the RSS plugin.
[closes #219]
2022-09-02 00:21:40 +02:00
a286cf5000 Updated PopcornTime base URL 2022-09-01 11:13:16 +02:00
c5b12403d0
Implemented support for returning richer HTTP responses on webhooks.
A `WebhookEvent` hook can now return a tuple in the format `(data,
http_code, headers)` in order to customize the HTTP status code and the
headers of a response.
2022-09-01 01:37:18 +02:00
96b2ad148c
A smarter way of building and matching the event condition 2022-08-31 02:19:21 +02:00
67413c02cd
Handle the case where the condition is a serialized dictionary 2022-08-31 01:55:21 +02:00