Notifications from homeassistant and icinga2

Hi,

I’d like to send status messages from e.g. homeassistant and icinga2, to a DeltaChat group. What is the best practice for this since version 2? Should I create an account via the desktop app, then export the public key from SQLite and send it as a “normal” email, or should I program a bot for this? Or is there a current DeltaChat CLI that works with v2? Or is there a completely different solution?

There is a cmsend for an example of sending with chatmail core, you can use it as a starting point. You can make it join the group with cmsend --join ... and then send messages to the group this way. This should work as is already.

I think it is better to turn the bot into a long-running process though so the bot listens to incoming messages and can e.g. notice when a new member has been added to the group. And maybe instead of the group use the channel. But this is something you can do later, cmsend is enough to get started with sending notifications.

If you are fine with sending not to the group, but e.g. as 1:1 message to yourself, then constructing a normal OpenPGP encrypted message and sending it is good enough. Tracking the group, keys and addresses of the members and so on is not that easy, for that better build a bot.

A few months ago I started working on a home assistant integration.

The home assistant documentation is really painful and their plugin system has quite a lot of constraints.

I kind of gave up on it, but if there are more users who want to use this, maybe i’ll try to motivate myself again :slight_smile:

I will be totally be interested in this, I have a similar setup with octoprint Telegram

Which I also happily replace with Delta chat.

If anyone wants, I have created a template-repo that gives an access to a Delta Chat bot via REST API.

This might help you a bit, as you would not need to interact with a CLI. In addition to serving REST API, it can forward new messages / events to a specified webhook:

Hope that would be helpful :slight_smile:

Hey Michael,

I have some proof of concept here.

It is not an integration but a standalone app for AppDaemon that works to provide a transport layer working as DeltaChat bot. Using that we implement bot related automations on the Home Assistant side with a MQTT trigger and all user actions. Repo has all example. I use this bot since last year, and it works stable.

Happy to share, and hope it would help you making a great integration that will be used more userfriendly to unprepared HA users :slight_smile:

Cheers.

I created a proof of concept which uses the chatmail core crate directly:

EDIT: Added GitHub - caronc/apprise: Apprise - Push Notifications that work with just about every platform! · GitHub plugin