Ok I’m very new to programming, ESPHome, HA, all of that. So please bear with me.
I bought a Wiegand 26 door code input that I’m trying to set up. Having troubles with “how” to write the code. Yeah, I’ll probably need help with the exact later, but more structurally, I’m trying to figure out how I want to set it up (and be somewhat safe).
Here’s what I want to do. I want to have a list of “permenant codes”, family members and such that really won’t get deleted. But I also want to be able to add and remove temporary codes fairly easily (without necessarily having to do an OTA update to the ESP32 every time). So, I just had this idea, “what if I made the lists of codes in the !secret.yaml file”.
In the secret.yaml, I would have
doorcodes:
- "1111"
- "2222"
- "3333"
dogwalkercodes:
- "8888"
- "9999"
Would this work and how can I have ESP verify a code entered into the pad against either of these lists? And, I would like to have an input boolean or something that can “shut off” the dogwalkercodes. This will probably happen in automations, but basically the ability to instantly freeze the dogwalker codes, or not used at certain times (at night), etc.
I originally thought about making input_booleans for every code, but that’s like 10 codes, and I really want to be able to go into the secret.yaml file from my phone and add a new code if the wife texts me that a new person is coming over.
Ultimately, I want to set up sensors (or something) so that when the door is activated by a dogwalker or non-immediate family member, that the cameras will start recording, maybe alert my phone. I can handle the automations later, but just don’t know how to set up the structure and get started.
hell, I don’t even really know how I’m setting up the Wiegand, I’m just copying/pasting code until something works. Some user codes have if statements built into the template sensors, others have it built into the Key Collector on_value command.
Thanks for any insight!