platypush/platypush/config.example.yaml

136 lines
4.1 KiB
YAML
Raw Normal View History

2018-11-11 12:17:11 +01:00
# ---
# --- Platypush sample configuration file.
# --- All the configuration snippets here can be copied, modified and reused.
# ---
2018-11-11 12:17:11 +01:00
# --- You can include configuration from other files through the include section
2017-11-03 11:40:42 +01:00
2018-11-11 12:17:11 +01:00
include:
- include/sensors.yaml
- include/media.yaml
- include/robot.yaml
2018-11-11 12:17:11 +01:00
# --- It is recommended to set a main.db to store session variables or general-purpose application data.
# --- The engine format is specified according to the SQLAlchemy syntax.
2017-11-03 11:40:42 +01:00
2018-11-11 12:17:11 +01:00
main.db:
engine: sqlite:////home/user/.local/share/platypush/platypush.db
# --- By default the device_id (used by the system to identify the node) matches the hostname.
# --- Specify it here if you want to override it.
device_id: my_device_id
# ---
# --- Plugins configuration
# ---
# Example mpd/mopidy plugin configuration
2017-12-11 04:24:05 +01:00
music.mpd:
host: localhost
port: 6600
2018-11-11 12:17:11 +01:00
# Example Philips Hue lights configuration
2017-12-11 04:24:05 +01:00
light.hue:
bridge: hue # Bridge IP or hostname
# lights: # Default lights you want to manage
# - Living Room Ground Right
# - Living Room Ground Left
# - Hue bloom
# - Kitchen Lampm
# - Living room ceiling right
# - Living room ceiling left
# - Kitchen LED Strip
# - Kitchen Table LED Strip
2018-11-11 12:17:11 +01:00
# groups: # Default groups you want to manage
# - Living Room
# - Hall
# Example Adafruit IO plugin configuration. You can use this plugin to
# send data to your Adafruit IO feeds and dashboards.
adafruit.io:
username: username
key: adafruit_key
throttle_seconds: 30 # You can throttle the data being sent to Adafruit to prevent threshold limit hits
# Example of text-to-speech configuration using the Google engine
tts.google:
language: en-US
# Example of text-to-speech configuration using the internal TTS engine
tts:
language: en-US
# If you want to explicitly enable a plugin or backend that requires no configuration (for example if you want
# to access the web tab of a plugin through the main web panel), then just set disabled: False as its configuration).
# Example configuration for the WeMo Switch plugin (even if empty, this will make the WeMo Switch web tab pop up)
switch.wemo:
disabled: False
# Example configuration for the TP-Link smart switch devices (even if empty, this will make the WeMo Switch web tab pop up)
switch.tplink:
disabled: False
# Example IFTTT plugin configuration. All you need is your IFTTT API key and start setting up
# web hooks recipes that can be triggered by Platypush through trigger_event calls.
ifttt:
ifttt_key: your_ifttt_key
# Example configuration for the AutoRemote plugin. If you install and configure AutoRemote on your Android devices
# you'll be able to send messages and notifications to them through Platypush and build logic on them through Tasker.
# Each device will have its own unique name and API key.
autoremote:
devices:
MyAndroidPhone:
key: autoremote_key_1
MyAndroidTablet:
key: autoremote_key_2
MyAndroidTv:
key: autoremote_key_3
# ---
# --- Backends configuration
# ---
backend.kafka:
server: your_server:9092
topic: platypush
backend.pushbullet:
token: your_pushbullet_token_here
device: your_pushbullet_virtual_device_name
2017-12-11 04:24:05 +01:00
2017-12-24 01:33:06 +01:00
# ---
# --- Event hooks configuration
# ---
event.hook.AssistantConversationStarted:
if:
type: platypush.message.event.assistant.ConversationStartEvent
then:
action: shell.exec
args:
cmd: 'aplay /path/conv_start.wav'
event.hook.MusicPlayAssistantCommand:
if:
type: platypush.message.event.assistant.SpeechRecognizedEvent
phrase: "play (the)? music" # Regexes on single terms are supported
then:
action: music.mpd.play
event.hook.LightsOnAssistantCommand:
if:
type: platypush.message.event.assistant.SpeechRecognizedEvent
phrase: "turn on (the)? lights"
then: # Multiple actions are supported
-
action: light.hue.on
args:
groups: Living Room
-
action: switch.wemo.on
args:
device: Bulbs