Page 1 of 1

MQTT listen to a GPIO, but not name

Posted: 22 Mar 2020, 22:36
by BlueMan
I have a problem with switching a state for a relay (Przekaznik) with MQTT - I would like to use the name of device instead gpio. This will be the same way as espeasy broadcasting a message of changed state of a device.

To change a state, with this command:

Code: Select all

ESP_Gabinet/gpio/12 1
(or zero to turn it off) is working fine, but when I want to use

Code: Select all

ESP_Gabinet/Przekaznik/State 1
then nothing happens.

Re: MQTT listen to a GPIO, but not name

Posted: 23 Mar 2020, 06:59
by grovkillen
You should use the cmd topic. See here: https://espeasy.readthedocs.io/en/lates ... mmand.html