Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Mqtt trigger an automation

$
0
0

@odechr wrote:

Hi all!

First time im trying out MQTT. I have made myself a small project with an RFID chip and things are working good. But i struggle to use it to trigger an automation. My plan is to use the RFID to start and stop my alarm. But first i need to get the automation to trigger when i scan the chip.

I have set all the configurations and i do get a respons in Node-red debug when i scan my RFID chip.
Im not gonna use Node-red, i just used the debug function to see if it actually worked.

This is from debug. I did set my topic as “esprfid” in the software.

{"topic":"esprfid/send","payload":"{\"type\":\"access\",\"time\":1584569740,\"isKnown\":\"true\",\"access\":\"Admin\",\"username\":\"christian\",\"uid\":\"76e160a3\",\"door\":\"esp-rfid\"}","qos":0,"retain":false,"_msgid":"9795222b.c29b1"}

Just did a test -only- on the topic, but that doesnt work either.

- id: '1584564727759'
  alias: test
  description: ''
  trigger:
  - platform: mqtt
    topic: esprfid
  condition: []
  action:
  - data:
      message: test
    service: notify.mobile_app_sm_g965f

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>