Page 1 of 1

Incorrect pin state in GPIO command status report?

Posted: 31 Mar 2019, 11:00
by oversc0re
Hi!

This is something I have noticed recently and I am pretty certain that it worked before:

Let's say my GPIO 13 is off and I send GPIO,13,1 to mqtt, I receive a status update of

Code: Select all

{
"log": "GPIO 13 Set to 1",
"plugin": 1,
"pin": 13,
"mode": "output",
"state": 0
}
The output is toggled, but the state value is still set to 0. If I send status request or another GPIO command, the reported state changes to 1. It looks like the status update is reported before the GPIO changes its state.

Can someone confirm, that this used to work? I checked several examples on this forum and they all seem to report correct GPIO state after switching.

Should I try another firmware or report a bug?

Thanks!

Re: Incorrect pin state in GPIO command status report?

Posted: 31 Mar 2019, 18:47
by schnurzel59
Hello,
just tested:

Code: Select all

Gpio 0 is OFF

Gpio,0,1

Gpio 0 is now ON.  The State is "0"

Again: Gpio,0,1

Now the State is "1"
The same result I do have when switching to 0.
Probably "state" shows the state before the switching process.