EspEasy not counting
Moderators: grovkillen, Stuntteam, TD-er
EspEasy not counting
Despite a lengthy search, I cannot find a solution to my ESPEasy problem. S0 counter outputs are to be monitored
I flashed a WemosD1 with ESPEasy_mega-20200703 and set up a generic counter on each of the pins D3 D4 D6 D7 D8.
Debounce 1000ms, Type Delta / Total / Time, Mode Change.
Because there was no reliable count in a previous experiment, I have the relevant inputs with 10kOhm
Pull-up resistors placed on the 3.3V pin
In the Devices tab, some values already appear for GPIO-2, -15, -13 even though nothing is connected, GPIO-0 and -12 show 0
In the ioBroker mqqt-objects I can see that the total of GPIO-2 and -15 are continuously increasing by 10 each (although still nothing is connected)
GPIO-0 and -12 remain at 0 and with GPIO-13 there is not even a 0 in the value field but rather "blank"
The automatic counting up ends when I set the mode to "low".
But if I put the inputs on ground as a test, nothing happens, it doesn't count.
It's probably not because of the Wemos, because I've already flashed the third one with the same result.
Does anyone have an idea why this might be?
Regards Gerhard
I flashed a WemosD1 with ESPEasy_mega-20200703 and set up a generic counter on each of the pins D3 D4 D6 D7 D8.
Debounce 1000ms, Type Delta / Total / Time, Mode Change.
Because there was no reliable count in a previous experiment, I have the relevant inputs with 10kOhm
Pull-up resistors placed on the 3.3V pin
In the Devices tab, some values already appear for GPIO-2, -15, -13 even though nothing is connected, GPIO-0 and -12 show 0
In the ioBroker mqqt-objects I can see that the total of GPIO-2 and -15 are continuously increasing by 10 each (although still nothing is connected)
GPIO-0 and -12 remain at 0 and with GPIO-13 there is not even a 0 in the value field but rather "blank"
The automatic counting up ends when I set the mode to "low".
But if I put the inputs on ground as a test, nothing happens, it doesn't count.
It's probably not because of the Wemos, because I've already flashed the third one with the same result.
Does anyone have an idea why this might be?
Regards Gerhard
Re: EspEasy not counting
Not sure about all pins you're using here, but at least GPIO-15 does have a pull-down resistor.
See: https://espeasy.readthedocs.io/en/lates ... on-esp8266
So by adding a pull-up resistor to it, you may cause it to fail boot or at least undo the existing pull-down and thus make it prone to false readings.
Have you tried running only one pulse counter?
Also the pulse counter can only be at one of the first few task positions (3 or 4).
What task positions are the tasks that have faulty count values?
See: https://espeasy.readthedocs.io/en/lates ... on-esp8266
So by adding a pull-up resistor to it, you may cause it to fail boot or at least undo the existing pull-down and thus make it prone to false readings.
Have you tried running only one pulse counter?
Also the pulse counter can only be at one of the first few task positions (3 or 4).
What task positions are the tasks that have faulty count values?
Re: EspEasy not counting
I have Wemos D1 mini with two pulse counters counting S0 pulses, GPIO-14 (D5) and GPIO-12 (D6). I also have external pullup resistors. Works fine, although the build I have is really old (ESP Easy Mega build 20102).
Re: EspEasy not counting (solved)
@TD-er
Thanks. Removed PullUp from GPIO-15 connected again, all devices showed 0 but only GPIO-0 was counting.
Deleted all remaining not working counters.
@TonyA
Created new counters on D5 and D6. Are working now. Created additional counter on D7 also counting.Counters are on Task 1, 2, 3 ,4
Still need one additional, will try to find one
Thanks for help.
Thanks. Removed PullUp from GPIO-15 connected again, all devices showed 0 but only GPIO-0 was counting.
Deleted all remaining not working counters.
@TonyA
Created new counters on D5 and D6. Are working now. Created additional counter on D7 also counting.Counters are on Task 1, 2, 3 ,4
Still need one additional, will try to find one
Thanks for help.
Re: EspEasy not counting
There is still a limitation in the source where only interrupt driven call back calls can be registered on only the first 4 tasks.
So please don't waste too much time to find a work-around, unless you actually try to adapt the code for it.
So please don't waste too much time to find a work-around, unless you actually try to adapt the code for it.
Re: EspEasy not counting
I realized that no matter what I try 4 counters seem to be the max.
Regards Gerhard
Regards Gerhard
Re: EspEasy not counting correctly
Hi,
I cannot get working my counters.
The Wemos is now connected to the S0 electricity meters in site. Their inputs are normally high 3,3V in case of pulse they become low. As I am still waiting for delivery of a scope I cannot determine the actual value of the low. I see unly a small blip on the voltmeter. In my understanding the trigger might be "falling" but then it is not counting. The only possibility to get the counter counting is when trigger is "change" but in this case count in iobroker objects is not 1 but 3 or 4 as well total is increased as such. Fiddling with debounce time is affecting count. With 500 msc it increases until 10 with 6000msec it reduces to 1-2 but never constantly 1. I can change the script to increase by 1 when total is changing but the calculation of actual power is incorrect. The cable from meter to Wemos is less then half meter. It is not shielded. It seems that I am the only one where these counters dont work.
Has anybody a idea what else I could try?
Regards Gerhard
I cannot get working my counters.
The Wemos is now connected to the S0 electricity meters in site. Their inputs are normally high 3,3V in case of pulse they become low. As I am still waiting for delivery of a scope I cannot determine the actual value of the low. I see unly a small blip on the voltmeter. In my understanding the trigger might be "falling" but then it is not counting. The only possibility to get the counter counting is when trigger is "change" but in this case count in iobroker objects is not 1 but 3 or 4 as well total is increased as such. Fiddling with debounce time is affecting count. With 500 msc it increases until 10 with 6000msec it reduces to 1-2 but never constantly 1. I can change the script to increase by 1 when total is changing but the calculation of actual power is incorrect. The cable from meter to Wemos is less then half meter. It is not shielded. It seems that I am the only one where these counters dont work.
Has anybody a idea what else I could try?
Regards Gerhard
Re: EspEasy not counting
Can you draw the schematics of how things are connected?
If you doubt the signal levels, it is best to have a look at the current flowing through the S0 port.
And the simplest way can be to add a resistor and LED parallel to the GPIO pin you're using for visual feedback.
Also check what task nr you're using for the counter.
The counter must be at task 1...4.
If you doubt the signal levels, it is best to have a look at the current flowing through the S0 port.
And the simplest way can be to add a resistor and LED parallel to the GPIO pin you're using for visual feedback.
Also check what task nr you're using for the counter.
The counter must be at task 1...4.
Re: EspEasy not counting
Please tell me how you can integrate the library https://github.com/maxzerker/PZEM-017-v1 into ESP Easy.
Re: EspEasy not counting
That's got nothing to do with this topic, or am I missing something?olegvstt wrote: ↑12 Sep 2020, 08:58 Please tell me how you can integrate the library https://github.com/maxzerker/PZEM-017-v1 into ESP Easy.
Re: EspEasy not counting
I just asked how to integrate a ready-made library into ESP Easy, or tell me where you can read about it.
Re: EspEasy not counting
Well that means I have to read into that library to see what it offers, to give you a clear answer as the existing source code apparently isn't clear on how to do it.
It looks like that library you linked is only "slightly modified" according to its readme, from the 004 version of that PZEM sensor.
So I think it should be quite easy to modify https://github.com/letscontrolit/ESPEas ... M-004T.ino this one to use that library.
Please do not try to hijack other topics for it, but rather open a new one, or add an issue for a feature request to Github.
Re: EspEasy not counting
@TD-er
This is the devive: https://www.amazon.de/gp/product/B078M1 ... UTF8&psc=1
The S0 outputs are connected to ground and GPIO 14, 13, 12 and 0 which are pulled to 3,3V with 10kOhms
Current measurement is difficult because contacts are NO and pulsewith is rather small.
Connected LEDs are illuminated and show a very small interuption when output LED of S0 is blinking.
At manual short of the contact the LED is off.
Using only task 1..4.
Shall try again with a ESP32 or ESP8266
Sorry for delayed reply.Can you draw the schematics of how things are connected?
If you doubt the signal levels, it is best to have a look at the current flowing through the S0 port.
And the simplest way can be to add a resistor and LED parallel to the GPIO pin you're using for visual feedback.
Also check what task nr you're using for the counter.
The counter must be at task 1...4.
This is the devive: https://www.amazon.de/gp/product/B078M1 ... UTF8&psc=1
The S0 outputs are connected to ground and GPIO 14, 13, 12 and 0 which are pulled to 3,3V with 10kOhms
Current measurement is difficult because contacts are NO and pulsewith is rather small.
Connected LEDs are illuminated and show a very small interuption when output LED of S0 is blinking.
At manual short of the contact the LED is off.
Using only task 1..4.
Shall try again with a ESP32 or ESP8266
Who is online
Users browsing this forum: No registered users and 72 guests