Successfully Integrating Threema for Notifications in Home Assistant

Hello everyone, I wanted to share my recent project where I integrated Threema into my Home Assistant setup for notifications. If you’re not familiar, Threema is a secure messaging app that offers end-to-end encryption, which is a huge plus for privacy-conscious users like myself.

Why Threema?

I’ve always been cautious about using WhatsApp due to its advertising practices, so when I decided to set up a notifications system, I knew I wanted something more private and less intrusive. Threema fit the bill perfectly, and I was excited to see if it could integrate smoothly with Home Assistant.

Setting It Up

The process was straightforward once I found the right resources. I started by purchasing a Threema Gateway, which acts as a bridge between my Home Assistant instance and the Threema network. This gateway allows me to send messages programmatically without needing to interact with the app manually.

In my configuration.yaml, I added the following code snippet to configure the notification service:
yaml

Threema Notifications

notify:

  • name: Threema
    platform: rest
    resource: https://msgapi.threema.ch/send_simple
    method: POST
    message_param_name: text
    target_param_name: to
    data:
    from: !include privates/threema_from.yaml
    secret: !include privates/threema_secret.yaml

Automation in Action

Once the configuration was set, I created an automation to notify me when the trash collection day was approaching. Here’s a quick look at the automation setup:
yaml

  • service: notify.Threema
    data:
    target: ‘xxxxxx’
    message: “The {{ state_attr(‘sensor.abfall_tage’, ‘tonne’) }} will be emptied tomorrow. :articulated_lorry: Please bring out the trash bin.”

The Results

I’ve been using this setup for several months now, and it’s been nothing short of amazing. The notifications are timely, reliable, and most importantly, secure. I no longer worry about my data being exposed, which gives me peace of mind.

Future Plans

Looking ahead, I’m interested in exploring Threema’s encrypted API for even more advanced integrations. I can already see possibilities for automating more aspects of my daily life while maintaining the privacy I value.

Final Thoughts

If you’re hesitant about using mainstream messaging apps for your smart home notifications, I highly recommend giving Threema a try. It’s a fantastic alternative that balances functionality with privacy. Happy automating everyone! :rocket: