[Wiegand] Add 18-bit values #3518
Replies: 3 comments 1 reply
-
|
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
-
|
Do you have any documentation on 18-bit values? |
Beta Was this translation helpful? Give feedback.
-
|
This can be closed. I was using this component for a long time, back then it was a own repository and either didn't had documentation regarding the raw values, or I did not recognize it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Component name
Wiegand
Link to component documentation on our website
https://esphome.io/components/wiegand/
Describe the enhancement
I'm using the Wiegand component together with a s-Touch Reader ( https://www.i-keys.de/de/sTouch-Leser-R-w.html ), which is working fine so far. However, the reader does have a Bell button, which sends a 18 bit value. I pressed the button three times, it always sends the same value "2e00d", it appread in the log as following:
[D][wiegand:116]: received unknown 18-bit value: 2e00d
[D][wiegand:116]: received unknown 18-bit value: 2e00d
[D][wiegand:116]: received unknown 18-bit value: 2e00d
I would love to get this tag in HA to trigger an automation for bell-ringing, but since 18 bit is not in the code, it logs it just in the debug log, but does not transfer/create a tag in HA.
Solutions might either be add 18-bit values as in the following example:
if (count == 18) {
char tag_buf[12];
buf_append_printf(tag_buf, sizeof(tag_buf), 0, "%" PRIu32, static_cast<uint32_t>((value >> 1) & 0xffffff));
ESP_LOGD(TAG, "received 18-bit tag: %s", tag_buf);
for (auto *trigger : this->tag_triggers_)
trigger->trigger(tag_buf);
}
OR, another idee might be an configurable option, so one can choose, if only "well-known" values should deliver tags to HA, or "all values" should deliver tags to HA.
Use cases
Trigger automations based on button press from i key reader, which ends up as 18-bit values/tag in HA.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions