MQTT Publish Only On Input Change

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
prairietech
Normal user
Posts: 31
Joined: 20 Oct 2017, 23:47

MQTT Publish Only On Input Change

#1 Post by prairietech » 21 Oct 2017, 00:07

I have v2.0.0 dev12 running on a Adafruit Feather. Task 1 is setup for a switch input on GPIO-13 with switch button type set to normal switch. I have a MQTT controller enabled and can see the published result on Node Red. But MQTT is publishing at the Delay rate set for the input.

What do I change so that the input status is only published when the switch status changes?

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: MQTT Publish Only On Input Change

#2 Post by enesbcs » 21 Oct 2017, 07:18

prairietech wrote: 21 Oct 2017, 00:07 I have v2.0.0 dev12 running on a Adafruit Feather. Task 1 is setup for a switch input on GPIO-13 with switch button type set to normal switch. I have a MQTT controller enabled and can see the published result on Node Red. But MQTT is publishing at the Delay rate set for the input.

What do I change so that the input status is only published when the switch status changes?
set Delay=0

prairietech
Normal user
Posts: 31
Joined: 20 Oct 2017, 23:47

Re: MQTT Publish Only On Input Change

#3 Post by prairietech » 21 Oct 2017, 13:57

enesbcs wrote: 21 Oct 2017, 07:18
prairietech wrote: 21 Oct 2017, 00:07 I have v2.0.0 dev12 running on a Adafruit Feather. Task 1 is setup for a switch input on GPIO-13 with switch button type set to normal switch. I have a MQTT controller enabled and can see the published result on Node Red. But MQTT is publishing at the Delay rate set for the input.

What do I change so that the input status is only published when the switch status changes?
set Delay=0
Wow! That was easy! I've got to stop complicating the easy things.
Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 97 guests