How to trigger automation by mqtt message?

Hi all, few months ago I bought cheap IP cameras which can forward messages to “alarm server” on port 15002. Today I found a perl-script that simulate alarm server and can forward messages to mqtt.
Now I’d like to create some automation based on received message.
Is it possible to trigger automation based on mqtt messages?

Yup, see below.

2 Likes

Could you perhaps point me to the script you’re using? Looking for something similiar.

The link above gives you how to setup the trigger.

Per your request, below is an example of a full automation that I am using.

Maybe the script is: https://gist.github.com/667bdrm/0aa3d0b474ad0bea2e32 (Alarm port 15002)

But related with this I found that exists two interesting projects:

  1. https://gitlab.com/667bdrm/sofiactl/-/tree/master Develop in perl
  2. https://github.com/NeiroNx/python-dvr Develop in python

Both are related with CAM and protocol Sofia powered Hi35xx DVR devices (both using port 34567)

I think will be interesting for Home Assistant have a good library to manage this.

Hope this helps.

1 Like

Here is perl python version with dockerfile as well