04-10-2024, 08:24 PM
Hello,
please help me with the setup. I don't know what to do anymore.
I bought a device with wiegand26/36. I have it set to 26.
The manufacturer has assured me that the fingerprint tag is also sent via wiegand.
https://www.aliexpress.com/item/10050067...1802rCmbOz
Model: TF109S-EM-W
I have set the fingerprint for ID:002 according to the instructions. The unlock works but I don't see any unlock log in the esphome log. The lock physically unlocks.
Communication when entering the code works normally in esphome.
Any advice?
esphome yaml:
# Example configuration entry
wiegand:
- id: mykeypad
d0: GPIO15
d1: GPIO2
on_key:
- lambda: ESP_LOGI("KEY", "received key %d", x);
on_tag:
then:
- lambda: ESP_LOGI("TAG", "received tag %s", x.c_str());
- if:
condition:
lambda: |-
return x=="2";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="02";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="002";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="0002";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="00002";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="000002";
then:
switch.toggle: test_output1
on_raw:
- lambda: |-
std:tring bits_str = "";
for (int i = bits - 1; i >= 0; i--) {
bits_str += ((value >> i) & 1) ? '1' : '0';
}
ESP_LOGI("RAW", "received raw %d bits, value %llx, bits: %s", bits, value, bits_str.c_str());
# on_raw:
# - lambda: ESP_LOGI("RAW", "received raw %d bits, value %llx", bits, value);
# Example configuration entry
key_collector:
- id: pincode_reader
source_id: mykeypad
min_length: 3
max_length: 3
end_keys: "#"
end_key_required: true
back_keys: "*"
clear_keys: "C"
# allowed_keys: "0123456789"
timeout: 5s
on_progress:
- logger.log:
format: "input progress: '%s', started by '%c'"
args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]
on_result:
- logger.log:
format: "input result: '%s', started by '%c', ended by '%c'"
args: [ 'x.c_str()', "(start == 0 ? '~' : start)", "(end == 0 ? '~' : end)" ]
- if:
condition:
lambda: |-
return x=="101";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="102";
then:
switch.toggle: test_output1
on_timeout:
- logger.log:
format: "input timeout: '%s', started by '%c'"
args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]
please help me with the setup. I don't know what to do anymore.
I bought a device with wiegand26/36. I have it set to 26.
The manufacturer has assured me that the fingerprint tag is also sent via wiegand.
https://www.aliexpress.com/item/10050067...1802rCmbOz
Model: TF109S-EM-W
I have set the fingerprint for ID:002 according to the instructions. The unlock works but I don't see any unlock log in the esphome log. The lock physically unlocks.
Communication when entering the code works normally in esphome.
Any advice?
esphome yaml:
# Example configuration entry
wiegand:
- id: mykeypad
d0: GPIO15
d1: GPIO2
on_key:
- lambda: ESP_LOGI("KEY", "received key %d", x);
on_tag:
then:
- lambda: ESP_LOGI("TAG", "received tag %s", x.c_str());
- if:
condition:
lambda: |-
return x=="2";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="02";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="002";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="0002";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="00002";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="000002";
then:
switch.toggle: test_output1
on_raw:
- lambda: |-
std:tring bits_str = "";
for (int i = bits - 1; i >= 0; i--) {
bits_str += ((value >> i) & 1) ? '1' : '0';
}
ESP_LOGI("RAW", "received raw %d bits, value %llx, bits: %s", bits, value, bits_str.c_str());
# on_raw:
# - lambda: ESP_LOGI("RAW", "received raw %d bits, value %llx", bits, value);
# Example configuration entry
key_collector:
- id: pincode_reader
source_id: mykeypad
min_length: 3
max_length: 3
end_keys: "#"
end_key_required: true
back_keys: "*"
clear_keys: "C"
# allowed_keys: "0123456789"
timeout: 5s
on_progress:
- logger.log:
format: "input progress: '%s', started by '%c'"
args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]
on_result:
- logger.log:
format: "input result: '%s', started by '%c', ended by '%c'"
args: [ 'x.c_str()', "(start == 0 ? '~' : start)", "(end == 0 ? '~' : end)" ]
- if:
condition:
lambda: |-
return x=="101";
then:
switch.toggle: test_output1
- if:
condition:
lambda: |-
return x=="102";
then:
switch.toggle: test_output1
on_timeout:
- logger.log:
format: "input timeout: '%s', started by '%c'"
args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]