bug in switch plugin about "inversed" option?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
megamarco83
Normal user
Posts: 119
Joined: 13 Apr 2017, 23:09

bug in switch plugin about "inversed" option?

#1 Post by megamarco83 » 22 Nov 2018, 20:50

hi i have last build of espeasy
i set a task with a normal switch and set for example gpio0 and deselect inversed logic

when i give the command:
http://192.168.0.155/control?cmd=GPIO,0,1
i measure +3,3v on GPIO0
device page show gpio0 = 1

http://192.168.0.155/control?cmd=GPIO,0,0
i measure 0v on GPIO0
device page show gpio0 = 0


now if i select inversed logic:

when i give the command:
http://192.168.0.155/control?cmd=GPIO,0,1
i measure +3,3v on GPIO0 (same situation of not selecting inverse logic)
device page show gpio0 = 0 (opposite)

http://192.168.0.155/control?cmd=GPIO,0,0 (same situation of not selecting inverse logic)
i measure 0v on GPIO0
device page show gpio0 = 1 (opposite)



so it seams that selecting inverse logic, only change what is show in device page, but the command "high" and "low" will drive is the same way of not selecting inverse logic.
it's on purpose that???

Tecumseh
Normal user
Posts: 28
Joined: 30 Sep 2016, 09:42

Re: bug in switch plugin about "inversed" option?

#2 Post by Tecumseh » 23 Nov 2018, 07:18

You are using an input plugin (switch) and are switching the output using the GPIO command. For GPIO commands there is no option to inverse the output, 1 is high and 0 is low.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests