Merge mqtt backend and plugin #320

Merged
blacklight merged 21 commits from 315/merge-mqtt-backend-and-plugin into master 2023-09-17 02:51:48 +02:00

21 Commits

Author SHA1 Message Date
Fabio Manganiello c4352660a4
Documentation update.
continuous-integration/drone/push Build is passing Details
Removed references to the legacy zwave plugin and backend.
2023-09-17 02:47:04 +02:00
Fabio Manganiello 46167a6c2a
Removed legacy zwave backend. 2023-09-17 02:46:24 +02:00
Fabio Manganiello 190cfa21b5
Fixed documentation references to some non-existing events. 2023-09-17 02:41:55 +02:00
Fabio Manganiello 0421325b26
Support to register/unregister custom handlers on the bus. 2023-09-17 02:29:11 +02:00
Fabio Manganiello 2e004c1a1e
`get_all_plugins` should use `Message.Encoder` for encoding the response.
continuous-integration/drone/push Build is passing Details
Some plugin information may include enums, tuples and other types that
aren't serializable by the default JSON serializer.
2023-09-17 02:11:52 +02:00
Fabio Manganiello fa2b84a269
Updated example configuration for mqtt and mqtt-based plugins.
continuous-integration/drone/push Build is passing Details
2023-09-16 15:26:07 +02:00
Fabio Manganiello 2fcd623c51
Migrated zwave.mqtt integration.
continuous-integration/drone/push Build is passing Details
Merged the zwave.mqtt plugin with the listener and removed the
leftovers of the legacy zwave plugin.
2023-09-16 03:58:19 +02:00
Fabio Manganiello 52cb1afb4b
Don't break words in entity value frames. 2023-09-16 02:58:17 +02:00
Fabio Manganiello e947cb1e67
Updated web dist files 2023-09-15 16:22:40 +02:00
Fabio Manganiello 4223576016
We should always update the entities cache on addEntity.
continuous-integration/drone/push Build is passing Details
Updating the entity cache only when we receive an event from a root
entity means that we lose events sent by individual child entities.
2023-09-15 00:45:38 +02:00
Fabio Manganiello 1020b63da7
All EntityMixin components should be allowed to emit `loading` events. 2023-09-15 00:34:29 +02:00
Fabio Manganiello 2c93049ee5
Catch all the exceptions in a plugin action wrapper.
The @action decorator should capture all the exceptions,
log them and return them on `Response.errors`.

This ensures that uncaught exceptions from plugin
actions won't unwind out of control, and also that they
are logged and treated consistently across all the
integrations.
2023-09-14 23:08:23 +02:00
Fabio Manganiello ac72b2f7a8
Fixed management of state on `zigbee.mqtt`.
Before the merge of the plugin and the listener those components
used to have their own separate state, which led to inconsistencies.
2023-09-14 23:05:27 +02:00
Fabio Manganiello 5a514fdcce
Only support the `run_topic` logic on the MQTT plugin.
Plugins that extend `MqttPlugin` shouldn't run messages as
requests, even if the parent MQTT plugin is configured to
do so.
2023-09-14 01:09:03 +02:00
Fabio Manganiello 4cb5aa7acb
Prepend the class name to the string used to generate the MQTT client_id hash.
If we include the class name by default then we won't have to
explicitly modify the client_id in the implementation classes
in order to prevent clashes.
2023-09-14 01:06:53 +02:00
Fabio Manganiello 3104a59f44
Better processing of configuration file parameters.
- Do `abspath`+`expanduser` on the configuration file path before
  checking if it exists.

- If the path doesn't exist, but the user explicitly passed a
  configuration file, then copy/create the default configuration
  under the specified directory.
2023-09-14 00:24:52 +02:00
Fabio Manganiello ddd8f1afdc
`base_topic` param in `zigbee.mqtt` renamed to `topic_prefix`.
This is for sake of consistency with other integrations (like
`zwave.mqtt`) that also use the same parameter name for the MQTT topic
prefix.
2023-09-07 21:32:56 +02:00
Fabio Manganiello 8ab7b6bebc
Removed deprecated `zigbee.mqtt` backend.
continuous-integration/drone/push Build is passing Details
Closes: #322
2023-09-06 02:54:48 +02:00
Fabio Manganiello 3de510da68
Migrated `zigbee.mqtt` integration.
continuous-integration/drone/push Build is passing Details
The plugin has been migrated to the new `mqtt` API and the legacy
listener that extended `MqttBackend` has been removed and merged into
the plugin.
2023-09-06 02:44:56 +02:00
Fabio Manganiello 33a1ef39e4
Refactored and merged `backend.mqtt` logic into `mqtt` plugin. 2023-09-06 02:43:45 +02:00
Fabio Manganiello b746d0b402
Moved `get_message_response` to `platypush.utils`.
continuous-integration/drone/push Build is passing Details
It is general-purpose enough to be used by all the integrations, not
only by the HTTP backend.
2023-09-05 13:03:30 +02:00