Replies: 2 comments 4 replies
-
I belive tha it depends if the expanders interrupt pin is wired to the cpu.
Can you verify the circuit?
El El mié, 21 ago. 2024 a la(s) 08:58, Andreas Delleske <
***@***.***> escribió:
… I am planning to use a Kincony KC868-AI device with Tasmota. It contains
an ESP32, even with LAN / Ethernet.
Some other devices of Kincony are already being supported
<https://blakadder.com/kincony-KC868-A8/>, even via blakadder's
templates, which is awesome!
The KC868-AI offers 48 digital inputs, all are acquired via six PCF8574
Chips.
Firstly, I guess there should be no problem configuring Tasmota to use the
inputs as mere inputs and read them.
Now, I would like to use the inputs as counters, that is, each HI to LO
transition (or LO to HI) should increment a counter which should then be
somehow readable.
In the docs, I've read there is a counter feature already but it seems to
work only for inputs wired directly to the ESP - or can I add the counter
feature even for the inputs that are read in via I2C?
I have browsed the PCF8574 manual but it does not mention the word
"counter" (except in a different context). It might have to be a software
counter...
I know it's not that easy because some debouncing should occur. Also, the
counter values should survive a power fail, if possible - at least store
some older status in flash.
As I am planning to use the counters for water counters that provide 1
pulse per litre, I guess 1 Hz or lower will be sufficient.
Thankful for every hint!
Andreas
—
Reply to this email directly, view it on GitHub
<#21988>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4KGCTGYAP74AU57HA3ZSR6GRAVCNFSM6AAAAABM33VDY2VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGA3TQNRVGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
-
If the frequency is low as you say, may be you can count with a button rule
;
“
Button2#State when a button changes state:
0 = OFF
1 = ON
2 = TOGGLE
3 = HOLD
“
El El mié, 21 ago. 2024 a la(s) 10:31, Andreas Delleske <
***@***.***> escribió:
… Ok thanks!
—
Reply to this email directly, view it on GitHub
<#21988 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4OQFRT6G7BZ4QMEYOTZSSJD7AVCNFSM6AAAAABM33VDY2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBQG44DAOI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am planning to use a Kincony KC868-AI device with Tasmota. It contains an ESP32, even with LAN / Ethernet.
Some other devices of Kincony are already being supported, even via blakadder's templates, which is awesome!
The KC868-AI offers 48 digital inputs, all are acquired via six PCF8574 Chips.
Firstly, I guess there should be no problem configuring Tasmota to use the inputs as mere inputs and read them, as Tasmota already offers USE_PCF8574_SENSOR (see Blakadder's article)
Now, I would like to use the inputs as counters, that is, each HI to LO transition (or LO to HI) should increment a counter which should then be somehow readable.
In the docs, I've read there is a counter feature already but it seems to work only for inputs wired directly to the ESP - or can I add the counter feature even for the inputs that are read in via I2C?
Having the idea that the chip could count on its own, I have browsed the PCF8574 manual but it does not mention the word "counter" (except in a different context). Thus, I guess it will have to be a software counter...
I know it's not that easy because some debouncing should occur. Also, the counter values should survive a power fail, if possible - at least store some older status in flash.
As I am planning to use the counters for water counters that provide 1 pulse per litre, I guess 1 Hz or lower will be sufficient.
Thankful for every hint!
Andreas
Beta Was this translation helpful? Give feedback.
All reactions