Incorrect pin state in GPIO command status report?

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
oversc0re
Normal user
Posts: 3
Joined: 22 Sep 2016, 22:22

Incorrect pin state in GPIO command status report?

#1 Post by oversc0re » 31 Mar 2019, 11:00

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!

User avatar
schnurzel59
Normal user
Posts: 32
Joined: 18 Feb 2019, 12:41
Location: Germany
Contact:

Re: Incorrect pin state in GPIO command status report?

#2 Post by schnurzel59 » 31 Mar 2019, 18:47

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.
Greetings Martin

Oh God, my English is horrible.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests