Skip to content
/ her Public

Home assistant. Integrate MQTT, Telegram bot and Alexa custom skills

Notifications You must be signed in to change notification settings

tommyblue/her

Repository files navigation

Her

Her is a home assistant.

Features

  • Connect to a MQTT server
  • Connect to a Telegram bot
  • Subscribe to MQTT topics and send notifications to Telegram when the value changes
  • Run a server able to receive commands from Alexa
  • Create alarms on MQTT topics. Send messages to bot if an alarm is triggered

Config

Create a toml file with your configuration and use it with her. You need a valid token to send messages to your Telegram bot and its channel id. To obtain the channel id you can use the instructions provided in this Stackoverflow question

The config.example.toml file contains all possible configurations, so use it as a template.

Alexa integration

Add [[intents]] to manage calls from Alexa. Her will listen for POST requests from your custom Alexa skill and will publish a MQTT message.

In AWS Alexa, create a new custom skill, using JS for the lambda. Use the alexa-skill-lambda.js file to fill in your index.js in the skill (you need) to customize the intents in the js file to match the intents you create in the skill. I used SwitchOnTheLight and SwitchOffTheLight that send a POST request with this JSON payload:

{
    "action": "switch-on (or switch-off)",
    "room": "<room>"
}

This is generated by my skill with an utterance like:

Alexa, chiedi alla luce di accendersi in cucina
              ^^^^^^^^^    ^^^^^^^^^^^^^ ^^^^^^
              invocation      utterance   room

Build

To build her, run make build. If you want to build it for Raspberry Pi, run make build-pi.

About

Home assistant. Integrate MQTT, Telegram bot and Alexa custom skills

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published