I am just getting started with ESPEasy, and like the idea of what it offers, but am having a really basic problem - I can't get any inputs to my board to work.
I can set pin output values ok to turn on and off an LED, but when I try to read an input value, I just get 0 as the status, even if I have connected the input pin to Vin. Am I missing some other crucial step ?
Thanks for pointing out anything obvious ! ESP Easy looks great, but some of the basics are a bit opaque, and this might be one of them.
Basic problem with inputs
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 4
- Joined: 17 Jun 2017, 09:21
Basic problem with inputs
You do not have the required permissions to view the files attached to this post.
Re: Basic problem with inputs
You've hit something that's due to unfinished development. The Wiki command reference states "Show status on previously controlled pins", meaning that it only reports the pin state if a pin has been set using an earlier command. But some plugins like the MCP, PCF8574 actually report input states without earlier commands to it.
ESP Easy should actually report "?" in this case... So that would be a bug...
Or should try to figure out the real state for a pin that has not been altered using a command. (this could be the tricky part)
ESP Easy should actually report "?" in this case... So that would be a bug...
Or should try to figure out the real state for a pin that has not been altered using a command. (this could be the tricky part)
-
- New user
- Posts: 4
- Joined: 17 Jun 2017, 09:21
Re: Basic problem with inputs
Thanks for the reply. I had seen a question mark response earlier, and was unclear on how to interpret what was going wrong, so thanks for explaining what it means. Why is figuring out the state of pin tricky ? Isn't it just a case of reading the voltage directly ?
So perhaps I was going about it the wrong way, but all I really want to do is read in a value from a pin of any sort, and none of them are working so I figured that this command approach would be the simplest test.
But if it's not, then that takes me back to the originating issue, which is that I want to read in the value of a potentiometer from the analog pin, and i can't get any values to show up there either: There's definitely power going through, and the output from the pot is connected to pin A0, so I'm not sure why the value stays as zero no matter what I do. Is there some other step needed to have values show up here as well ? Or is the absence of a value here also due to something as-yet missing in the implementation ?
So perhaps I was going about it the wrong way, but all I really want to do is read in a value from a pin of any sort, and none of them are working so I figured that this command approach would be the simplest test.
But if it's not, then that takes me back to the originating issue, which is that I want to read in the value of a potentiometer from the analog pin, and i can't get any values to show up there either: There's definitely power going through, and the output from the pot is connected to pin A0, so I'm not sure why the value stays as zero no matter what I do. Is there some other step needed to have values show up here as well ? Or is the absence of a value here also due to something as-yet missing in the implementation ?
You do not have the required permissions to view the files attached to this post.
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: Basic problem with inputs
Hello,
as far as i can see from your screenshot you're using a R12x or R14x version of ESPEasy.
You did not set an IDX value. The framewokr of these versions depends heavily on the IDX,
If it is missing no value is shown.
If you're not using Domoticz, you can use any value from 1 to around 250,
just use unique numbers within the same ESP-device.
Regards
Shardan
as far as i can see from your screenshot you're using a R12x or R14x version of ESPEasy.
You did not set an IDX value. The framewokr of these versions depends heavily on the IDX,
If it is missing no value is shown.
If you're not using Domoticz, you can use any value from 1 to around 250,
just use unique numbers within the same ESP-device.
Regards
Shardan
Regards
Shardan
Shardan
-
- New user
- Posts: 4
- Joined: 17 Jun 2017, 09:21
Re: Basic problem with inputs
Yes - it's the 120 version.
Thanks for the IDX tip. I may be missing a section of the docs, but where would I go to find out that IDX is important ? I can find very little info on that sort of thing.
So now I have a value appearing in the web page and in the log - great !
Which raises the next issue - at one extreme end of the pot range i get a value of 5, and at the other end of the range, i get a value of 6. I was expecting a range between 0 and 1023, so am presuming something is still not quite right. Perhaps some formula is required to map onto a more sensible value range ?
Also, what is the Delay value measured in ? I assume it's a time delay between readings, and thought at first it was milliseconds, but now think it might be seconds ?
Thanks for the IDX tip. I may be missing a section of the docs, but where would I go to find out that IDX is important ? I can find very little info on that sort of thing.
So now I have a value appearing in the web page and in the log - great !
Which raises the next issue - at one extreme end of the pot range i get a value of 5, and at the other end of the range, i get a value of 6. I was expecting a range between 0 and 1023, so am presuming something is still not quite right. Perhaps some formula is required to map onto a more sensible value range ?
Also, what is the Delay value measured in ? I assume it's a time delay between readings, and thought at first it was milliseconds, but now think it might be seconds ?
-
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
Re: Basic problem with inputs
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



-
- New user
- Posts: 4
- Joined: 17 Jun 2017, 09:21
Re: Basic problem with inputs
OK, got that part - but can I suggest that you default the value to 1, if defaulting to 0 causes frequent issues for noobs like me ?
-
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
Re: Basic problem with inputs
That would (potentially) cause problems for Domoticz. But this is a non-issue as of 2.0.0 which is due for release this summer. (You only need IDX if you use Domoticz as a controller).
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Who is online
Users browsing this forum: Anthropic Claude Bot [bot], opensiteexplorer.org/dotbot [bot] and 13 guests