DS2423 counter
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 1
- Joined: 25 Feb 2021, 19:04
DS2423 counter
I have a DS2423 counter for 1-wire net. It has 2 inputs and a battery backup. Is it possible to connect this counter to a Wemos D1 mini?
Its connected to a S0 output at my powermeter.
My wemos has this firmware: ESP_Easy_mega_20210223_normal_ESP8266_4M1M
I had this counter in a 1-wire net before wich i dont use anymore. Sinse it is still connected to my S0 output i thought it would be fun to connect it to a wemos instead
This is how counter are connected to my powermeter today. https://wiki.m.nu/index.php/Inkoppling_ ... C3%A4knare
Sorry for the Swedish in that link.
Could anyone please help me how i should connect and configure ESP Easy.
Its connected to a S0 output at my powermeter.
My wemos has this firmware: ESP_Easy_mega_20210223_normal_ESP8266_4M1M
I had this counter in a 1-wire net before wich i dont use anymore. Sinse it is still connected to my S0 output i thought it would be fun to connect it to a wemos instead
This is how counter are connected to my powermeter today. https://wiki.m.nu/index.php/Inkoppling_ ... C3%A4knare
Sorry for the Swedish in that link.
Could anyone please help me how i should connect and configure ESP Easy.
Re: DS2423 counter
Hmm the documentation page for the plugin is lacking some in-depth info I guess....
https://espeasy.readthedocs.io/en/lates ... #p100-page
The plugin is included in the "custom" builds, not the "normal" build.
Its label suggests it should be in the "testing" build, but it is later excluded for "LIMIT_BUILD_SIZE" builds, which is... the testing build
https://espeasy.readthedocs.io/en/lates ... #p100-page
The plugin is included in the "custom" builds, not the "normal" build.
Its label suggests it should be in the "testing" build, but it is later excluded for "LIMIT_BUILD_SIZE" builds, which is... the testing build

Re: DS2423 counter
I wrote that plugin, at least in my home environment it's working fine. You just need to build the image yourself to include it.
You need three wires between Wemos D1 mini and the Dual Counter board:
* +5V to 5V on Wemos
* GND to G on Wemos
* DQ to D4 (GPIO-2) on Wemos, on D4 you don't need an external pullup resistor for the 1-wire bus
You need three wires between Wemos D1 mini and the Dual Counter board:
* +5V to 5V on Wemos
* GND to G on Wemos
* DQ to D4 (GPIO-2) on Wemos, on D4 you don't need an external pullup resistor for the 1-wire bus
Re: DS2423 counter
Do you know if exist pluggin of DS2423 which allow to simply reads counter A and B ?ToniA wrote: ↑26 Feb 2021, 21:02 I wrote that plugin, at least in my home environment it's working fine. You just need to build the image yourself to include it.
You need three wires between Wemos D1 mini and the Dual Counter board:
* +5V to 5V on Wemos
* GND to G on Wemos
* DQ to D4 (GPIO-2) on Wemos, on D4 you don't need an external pullup resistor for the 1-wire bus
The current one give incremental value, which is not useful in my application.
Re: DS2423 counter
That wasn't yet supported, though the value is available, it just wasn't accessible. I've added PR #5276. This GH Actions run is started to build the binaries for you to test.
The CountTotal value is available from rules, on displays etc. by using variable [<TaskName>#CountTotal]
Please report your findings

/Ton (PayPal.me)
-
- Normal user
- Posts: 10
- Joined: 08 Mar 2025, 20:47
Re: DS2423 counter
Yep, you can definitely connect the DS2423 to your Wemos D1 Mini using the 1-Wire plugin in ESPEasy. Just connect DQ to GPIO4 (D2) with a 4.7kΩ pull-up to 3.3V, GND to GND, and VCC to 3.3V. Then, enable the 1-Wire plugin in ESPEasy and set it up. Should work great!
Re: DS2423 counter
@Sherif Are you able to test the build with the added feature of CountTotal? When logged in to your (free) Github account you can download the desired binaries from here
/Ton (PayPal.me)
Re: DS2423 counter
My apologise for late answer, I have not received any notification about answer.
I upload new FM but dont see any changes, in device I do see same choice and got only delta: I m begginer in ESP so dont know what do you mean by [<TaskName>#CountTotal]
Re: DS2423 counter
Everywhere in ESPEasy where you want to reference a "taskvalue" (meaning an output value of some measurement), you can refer to it using this notation.
For example if you have a task for a very common temperature/humidity/air-pressure sensor named "bme280" which has task values "temperature", "humidity" and "pressure".
Then you can refer to those values using these kind of notations:
Code: Select all
[bme280#temperature]
[bme280#humidity]
[bme280#pressure]
Or use them in calculations, in an email, in logs, etc.
So when Ton mentions [<TaskName>#CountTotal]
He means you can replace <TaskName> with the name of your task you created for this DS2423 counter plugin.
Assume you have named your task "MyCounter", then you can use [MyCounter#CountTotal] (including the square braces [] )
Re: DS2423 counter
I've considered to add the CountTotal value as a 'visible' value for the plugin, but that will increase the code size somewhat more, as it should be possible to disable (disabled by default), to not break current configurations that send the CountDelta value to a controller.
Will add this as an optional setting.
Will add this as an optional setting.
/Ton (PayPal.me)
Re: DS2423 counter
I've added an option to enable CountValue as a regular Value for the plugin, disabled by default, and also enabled the Plugin Stats feature.
@Sherif:
As you seem to be using an ESP8266 build (and GH Actions Runs are not building every committed change, at the moment), I've compiled an ESP8266 Collection B build for you to test: Please report your findings.
@Sherif:
As you seem to be using an ESP8266 build (and GH Actions Runs are not building every committed change, at the moment), I've compiled an ESP8266 Collection B build for you to test: Please report your findings.

/Ton (PayPal.me)
Re: DS2423 counter
ok, but what I have to do with this syntax ?TD-er wrote: ↑15 Mar 2025, 00:39 For example to show the latest measured values on a display.
Or use them in calculations, in an email, in logs, etc.
So when Ton mentions [<TaskName>#CountTotal]
He means you can replace <TaskName> with the name of your task you created for this DS2423 counter plugin.
Assume you have named your task "MyCounter", then you can use [MyCounter#CountTotal] (including the square braces [] )
When I executed it as command I got:
Command unknown: 0.00
Also what define a device name ? If it is in device tab then there is no possiblity to choose TotalSum for A and B.
Re: DS2423 counter
You should start with enabling Rules in the Tools/Advanced page, if that's not already enabled.
There is no TotalSum available from this plugin, as only the count from either the A or the B counter is read, but we can still retrieve that value:
- You already have Licznick_A for task (device) 1, ok.
- Add another device task, using the same plugin DS2423, and probably should name that Licznik_B. Give that the same settings as Licznik_A, except using Counter B.
- Add another device task, using the Dummy Device, give that the Name Licznik (used as an example), and change the Values name from dummy to TotalSum. It can have an Interval setting of 0.
- For each task you can configure the Controller as desired, if you are using a Controller.
- Add in the Rules tab this code:
Code: Select all
on Licznik_A do
let,1,[Licznik_A#CountTotal]+[Licznik_B#CountTotal] // Add both values
TaskValueSetAndRun,Licznik,TotalSum,[var#1] // Store the value in the Dummy Device, and send the data out
endon
You now have all counter values available:
- [Licznik_A#CountDelta]
- [Licznik_A#CountTotal]
- [Licznik_B#CountDelta]
- [Licznik_B#CountTotal]
- [Licznik#TotalSum]
And they can all be sent to a Controller (not sure what you are using to collect the data)
When finding this via search:
NB: This requires the feature of having the CountTotal value available, as newly introduced via the PR linked above!
NB2: The PR has been merged on 2025-03-15, so releases after this date will have this feature available.
Last edited by Ath on 16 Mar 2025, 15:08, edited 1 time in total.
/Ton (PayPal.me)
Re: DS2423 counter
Thank you so much !!!Ath wrote: ↑15 Mar 2025, 12:14 I've added an option to enable CountValue as a regular Value for the plugin, disabled by default, and also enabled the Plugin Stats feature.
@Sherif:
As you seem to be using an ESP8266 build (and GH Actions Runs are not building every committed change, at the moment), I've compiled an ESP8266 Collection B build for you to test:
ESP_Easy_mega_20250315_collection_B_ESP8266_4M1M.zip
Please report your findings.![]()
Yes, it is working

Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests