/slack_greeter_balena_block

Send a message to Slack when your Balena device comes online

Primary LanguagePythonApache License 2.0Apache-2.0

Slack Greeter Balena Block

Send a message to Slack when your Balena device comes online

The greeter service provides a simple app that sends a message on Slack to notify when a vehicle becomes online. It does this by posting the message using a Slack webhook that is connected to a specific Slack channel.

Setup

First, deploy the service to your fleet. Then to get this to work, set up a webhook by following Slack's webhook documentation. This will provide you with a URL that starts with https://hooks.slack.com/services. Copy this URL, and create a Fleet-wide Variable (or a Device Variable if you want to enable this only for individual vehicles) with the name GREETER_WEBHOOK_URL, and set the webhook URL as its value. Select to enable the variable only for the greeter service This should restart the service automatically and trigger a greeting in Slack.

Further configuration

You can set the following optional environment variables to customize the application:

  • GREETER_DEVICE_NOUN - The noun to use to refer to your devices, e.g. 'device', 'robot', 'thermostat'. Default: 'device'.