How to publish to get the value or state of the gpio?
Posted: 07 Feb 2019, 21:14
Hi,
I want to poll a gpio to see what the pin status is, how do I use publish to get the value or state of the gpio?
device nset in gpio 0 as a switch
Name: switch, Value: swi
I tried on the rules command: publish,/wemos01/gpio/0,[switch#sw1] but only shows "[switch#sw1] not the value.
Not much info in the docs (says to be added).
Any advice?
Thanks
I want to poll a gpio to see what the pin status is, how do I use publish to get the value or state of the gpio?
device nset in gpio 0 as a switch
Name: switch, Value: swi
I tried on the rules command: publish,/wemos01/gpio/0,[switch#sw1] but only shows "[switch#sw1] not the value.
Not much info in the docs (says to be added).
Any advice?
Thanks