Updated example configuration for mqtt and mqtt-based plugins.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabio Manganiello 2023-09-16 15:26:07 +02:00
parent 2fcd623c51
commit fa2b84a269
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 71 additions and 45 deletions

View File

@ -26,6 +26,7 @@
### Include directives ### Include directives
### ------------------ ### ------------------
###
# # You can split your configuration over multiple files and use the include # # You can split your configuration over multiple files and use the include
# # directive to import other files into your configuration. # # directive to import other files into your configuration.
# #
@ -37,11 +38,13 @@
# - logging.yaml # - logging.yaml
# - media.yaml # - media.yaml
# - sensors.yaml # - sensors.yaml
###
### ----------------- ### -----------------
### Working directory ### Working directory
### ----------------- ### -----------------
###
# # Working directory of the application. This is where the main database will be # # Working directory of the application. This is where the main database will be
# # stored by default (if the default SQLite configuration is used), and it's # # stored by default (if the default SQLite configuration is used), and it's
# # where the integrations will store their state. # # where the integrations will store their state.
@ -55,11 +58,13 @@
# # - $HOME/.local/share/platypush otherwise. # # - $HOME/.local/share/platypush otherwise.
# #
# workdir: ~/.local/share/platypush # workdir: ~/.local/share/platypush
###
### ---------------------- ### ----------------------
### Database configuration ### Database configuration
### ---------------------- ### ----------------------
###
# # By default Platypush will use a SQLite database named `main.db` under the # # By default Platypush will use a SQLite database named `main.db` under the
# # `workdir`. You can specify any other engine string here - the application has # # `workdir`. You can specify any other engine string here - the application has
# # been tested against SQLite, Postgres and MariaDB/MySQL >= 8. # # been tested against SQLite, Postgres and MariaDB/MySQL >= 8.
@ -73,11 +78,13 @@
# engine: sqlite:///home/user/.local/share/platypush/main.db # engine: sqlite:///home/user/.local/share/platypush/main.db
# # OR, if you want to use e.g. Postgres with the pg8000 driver: # # OR, if you want to use e.g. Postgres with the pg8000 driver:
# engine: postgresql+pg8000://dbuser:dbpass@dbhost/dbname # engine: postgresql+pg8000://dbuser:dbpass@dbhost/dbname
###
### --------------------- ### ---------------------
### Logging configuration ### Logging configuration
### --------------------- ### ---------------------
###
# # Platypush logs on stdout by default. You can use the logging section to # # Platypush logs on stdout by default. You can use the logging section to
# # specify an alternative file or change the logging level. # # specify an alternative file or change the logging level.
# #
@ -87,11 +94,13 @@
# logging: # logging:
# filename: ~/.local/log/platypush/platypush.log # filename: ~/.local/log/platypush/platypush.log
# level: INFO # level: INFO
###
### ----------------------- ### -----------------------
### device_id configuration ### device_id configuration
### ----------------------- ### -----------------------
###
# # The device_id is used by many components of Platypush and it should uniquely # # The device_id is used by many components of Platypush and it should uniquely
# # identify a device in your network. If nothing is specified then the hostname # # identify a device in your network. If nothing is specified then the hostname
# # will be used. # # will be used.
@ -100,11 +109,13 @@
# # -d/--device-id option. # # -d/--device-id option.
# #
# device_id: my_device # device_id: my_device
###
### ------------------- ### -------------------
### Redis configuration ### Redis configuration
### ------------------- ### -------------------
###
# # Platypush needs a Redis instance for inter-process communication. # # Platypush needs a Redis instance for inter-process communication.
# # # #
# # By default, the application will try and connect to a Redis server listening # # By default, the application will try and connect to a Redis server listening
@ -123,11 +134,13 @@
# port: 6379 # port: 6379
# username: user # username: user
# password: secret # password: secret
###
### ------------------------ ### ------------------------
### Web server configuration ### Web server configuration
### ------------------------ ### ------------------------
###
# Platypush comes with a versatile Web server that is used to: # Platypush comes with a versatile Web server that is used to:
# #
# - Serve the main UI and the UIs for the plugins that provide one. # - Serve the main UI and the UIs for the plugins that provide one.
@ -225,6 +238,30 @@ backend.http:
# poll_interval: 20 # poll_interval: 20
### ###
###
# # Example configuration of the MQTT plugin.
# # This plugin allows you to subscribe to MQTT topics and trigger `platypush.message.event.mqtt.MQTTMessageEvent`
# # events that you can hook on when new messages are received.
# # You can also publish messages to MQTT topics through the `mqtt.publish` action.
#
# mqtt:
# # Host and port of the MQTT broker
# host: my-mqtt-broker
# port: 1883
# # Topic to subscribe to. Messages received on these topics will trigger `MQTTMessageEvent` events.
# topics:
# - platypush/sensors
#
# # Extra listeners. You can use them to subscribe to multiple brokers at the same time.
# listeners:
# - host: another-mqtt-broker
# port: 1883
# username: user
# password: secret
# topics:
# - platypush/tests
###
### ###
# # Example configuration of music.mpd plugin, a plugin to interact with MPD and # # Example configuration of music.mpd plugin, a plugin to interact with MPD and
# # Mopidy music server instances. See # # Mopidy music server instances. See
@ -244,17 +281,6 @@ backend.http:
# clipboard: # clipboard:
### ###
###
# # Example configuration of the MQTT plugin. This specifies a server that the
# # application will use by default (if not specified on the request body).
#
# mqtt:
# host: 192.168.1.2
# port: 1883
# username: user
# password: secret
###
### ###
# # Enable the system plugin if you want your device to periodically report # # Enable the system plugin if you want your device to periodically report
# # system statistics (CPU load, disk usage, memory usage etc.) # # system statistics (CPU load, disk usage, memory usage etc.)
@ -351,11 +377,11 @@ backend.http:
# #
# zigbee.mqtt: # zigbee.mqtt:
# # Host of the MQTT broker # # Host of the MQTT broker
# host: riemann # host: my-mqtt-broker
# # Listen port of the MQTT broker # # Listen port of the MQTT broker
# port: 1883 # port: 1883
# # Base topic, as specified in `<zigbee2mqtt_dir>/data/configuration.yaml` # # Base topic, as specified in `<zigbee2mqtt_dir>/data/configuration.yaml`
# base_topic: zigbee2mqtt # topic_prefix: zigbee2mqtt
### ###
### ###
@ -369,7 +395,7 @@ backend.http:
# #
# zwave.mqtt: # zwave.mqtt:
# # Host of the MQTT broker # # Host of the MQTT broker
# host: riemann # host: my-mqtt-broker
# # Listen port of the MQTT broker # # Listen port of the MQTT broker
# port: 1883 # port: 1883
# # Gateway name, usually configured in the ZWaveJS-UI through `Settings -> # # Gateway name, usually configured in the ZWaveJS-UI through `Settings ->
@ -794,7 +820,7 @@ backend.http:
# - action: mqtt.send_message # - action: mqtt.send_message
# args: # args:
# topic: platypush/sensors # topic: platypush/sensors
# host: mqtt-server # host: my-mqtt-broker
# port: 1883 # port: 1883
# msg: # msg:
# name: ${name} # name: ${name}