mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 05:46:52 +00:00
Add initial mqtt notification page
This commit is contained in:
parent
cc61c2581f
commit
6eb1c8244e
29
source/_components/notify.mqtt.markdown
Normal file
29
source/_components/notify.mqtt.markdown
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
layout: component
|
||||||
|
title: "MQTT notifications"
|
||||||
|
description: "Instructions how to add MQTT notifications to Home Assistant."
|
||||||
|
date: 2016-02-01 08:00
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: mqtt.png
|
||||||
|
ha_category: Notifications
|
||||||
|
---
|
||||||
|
|
||||||
|
The MQTT notification support is different than the other [notification](/components/notify/) platforms. It is a service. This means that you don't have to create a configuration entry but you need to provide more details while calling the service.
|
||||||
|
|
||||||
|
**Call Service** section from the **Developer Tools** allows you to send MQTT messages. Choose *mqtt/publish* from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"payload": "Test message from HA", "topic": "home/notification", "qos": 0, "retain": 0}
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the [REST API](/developers/rest_api/#post-apiservicesltdomainltservice) to send a message to a given topic.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
||||||
|
-d '{"payload": "Test message from HA", "topic": "home/notification"}' \
|
||||||
|
http://IP_ADDRESS:8123/api/services/mqtt/publish
|
||||||
|
```
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user