Skip to content

Smart-home notifications

The front door opened, a leak sensor tripped, the washing machine finished — you want to know about such events right away, not once the floor is already wet. Notifly is easy to connect both to Home Assistant and straight to MQTT — your own push infrastructure with no third-party clouds.

Describe Notifly as a rest_command in configuration.yaml — and call it from any automation:

configuration.yaml
rest_command:
notifly:
url: 'https://api.notifly.ru/message?token=AGdjfk_L.dKe8q'
method: POST
content_type: 'application/json'
payload: '{"title": "{{ title }}", "message": "{{ message }}", "priority": {{ priority }}}'

An automation for “front door opened”:

automations.yaml
- alias: 'Notifly: front door opened'
trigger:
- platform: state
entity_id: binary_sensor.front_door
to: 'on'
action:
- service: rest_command.notifly
data:
title: '🚪 Front door opened'
message: "Time: {{ now().strftime('%H:%M') }}"
priority: 7

A leak sensor — at max priority already, so it gets through even in DND:

- alias: 'Notifly: water leak'
trigger:
- platform: state
entity_id: binary_sensor.leak_kitchen
to: 'on'
action:
- service: rest_command.notifly
data:
title: '💧 Water leak in the kitchen!'
message: 'Sensor triggered — shut off the water.'
priority: 10

The washing machine finished (by a drop in power draw):

- alias: 'Notifly: washing done'
trigger:
- platform: numeric_state
entity_id: sensor.washer_power
below: 5
for: '00:03:00'
condition:
- condition: state
entity_id: input_boolean.washer_running
state: 'on'
action:
- service: rest_command.notifly
data:
title: '🧺 Washing done'
message: 'Time to hang it up.'
priority: 5
- service: input_boolean.turn_off
target:
entity_id: input_boolean.washer_running

If you’d rather reuse the shared wrapper, call notifly-send through a shell_command (the script must be accessible to the user HA runs as):

configuration.yaml
shell_command:
notifly: '/usr/local/bin/notifly-send "{{ title }}" "{{ message }}" {{ priority }}'

No Home Assistant, but you have an MQTT broker (Zigbee2MQTT, ESPHome, DIY on ESP32)? A small subscriber turns topic messages into pushes:

#!/usr/bin/env bash
# /usr/local/bin/notifly-mqtt — MQTT → Notifly bridge
set -eu
set -a; source /etc/notifly.env; set +a
# Listen to the topics you need. -v prints "topic payload".
mosquitto_sub -h 192.168.1.10 -t 'home/#' -v | while read -r TOPIC PAYLOAD; do
case "$TOPIC" in
home/door/front)
[[ "$PAYLOAD" == *'"contact":false'* ]] && \
notifly-send "🚪 Front door opened" "" 7
;;
home/leak/*)
[[ "$PAYLOAD" == *'"water_leak":true'* ]] && \
notifly-send "💧 Water leak: $TOPIC" "Shut off the water!" 10
;;
home/washer/done)
notifly-send "🧺 Washing done" "$PAYLOAD" 5
;;
esac
done

Keep the bridge alive with systemd — /etc/systemd/system/notifly-mqtt.service:

[Unit]
Description=Notifly MQTT bridge
After=network-online.target
[Service]
ExecStart=/usr/local/bin/notifly-mqtt
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Окно терминала
sudo systemctl enable --now notifly-mqtt

If your smart-home controller runs on Windows (say, a script polls the hub’s API), send a push with the same function Send-Notifly:

Окно терминала
# a snippet polling the door state
if ($door.state -eq "open" -and $prev -eq "closed") {
Send-Notifly -Title "🚪 Front door opened" `
-Message "Time: $((Get-Date).ToString('HH:mm'))" -Priority 7
}
  • Your own push with no third-party cloud. Home events go to your infrastructure.
  • Priorities by importance. A leak is 10 (gets through DND), a door is 7, a wash is 5 (see priorities).
  • A single point. Your phone, laptop and tablet get the same notification at the same time.
  • Send a snapshot from the door camera via extra fields.
  • Separate channels for “home” and “cottage” to split pushes by address.
  • Tie it to monitoring: if the smart-home hub goes silent — a separate alert that the system itself is down.