Switch Input Always 0

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
daveps
New user
Posts: 4
Joined: 09 Jul 2016, 14:57

Switch Input Always 0

#1 Post by daveps » 09 Jul 2016, 15:19

I have an ESP-03 setup to read a DHT sensor and a PIR motion detector using ESP Easy R108.

The DHT sensor works fine on various GPIO inputs but the switch value stays on 0 on any GPIO whether pulled high or low.

Device is switch input

IDX = 100

GPIO = GPIO-0

Pull Up ticked

Switch Type = switch

Switch Button Type = normal switch

Any idea what else to try ?

Cheers Dave

Zodiac69
Normal user
Posts: 85
Joined: 13 Jun 2016, 17:20

Re: Switch Input Always 0

#2 Post by Zodiac69 » 09 Jul 2016, 16:21

Hi daveps

I had similar issue, just remember that the switch status is only updated every x seconds as configured in Sensor Delay: on the config page.

daveps
New user
Posts: 4
Joined: 09 Jul 2016, 14:57

Re: Switch Input Always 0

#3 Post by daveps » 10 Jul 2016, 11:09

Thanks for the reply,
delay is set at 15 seconds but even after much longer than that value is not updated in web interface.
Will try reflashing device next.

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: Switch Input Always 0

#4 Post by kr0815 » 10 Jul 2016, 12:32

I saw this with many other sensors as well, takes a while till the web page is updated
Open parallel to the web page the debug output, you´ll see the difference
(for example when heating up a temperature sensor)

dduley
Normal user
Posts: 93
Joined: 06 Feb 2016, 17:56

Re: Switch Input Always 0

#5 Post by dduley » 11 Jul 2016, 23:41

Is the send boot state box checked? If this is not checked you will read 0 until the switch is turned off and back on again. The System seems to trigger on events so when you first reset the ESP the switch input will read 0 until an event occurs to change the value. I have seen this many times. If you check the boot state box it will go out and read the value and update it on boot.

Regards

Dave

daveps
New user
Posts: 4
Joined: 09 Jul 2016, 14:57

Re: Switch Input Always 0

#6 Post by daveps » 13 Jul 2016, 20:38

Thanks chaps,got it going.
Dave,thanks for the explanation of how this input works,makes sense now,

Post Reply

Who is online

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