{"action":"opened","issue":{"url":"https://api.github.com/repos/omersiar/esp-rfid/issues/132","repository_url":"https://api.github.com/repos/omersiar/esp-rfid","labels_url":"https://api.github.com/repos/omersiar/esp-rfid/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/omersiar/esp-rfid/issues/132/comments","events_url":"https://api.github.com/repos/omersiar/esp-rfid/issues/132/events","html_url":"https://github.com/omersiar/esp-rfid/issues/132","id":346620141,"node_id":"MDU6SXNzdWUzNDY2MjAxNDE=","number":132,"title":"Wiegand keypad support?","user":{"login":"koffienl","id":6832264,"node_id":"MDQ6VXNlcjY4MzIyNjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6832264?v=4","gravatar_id":"","url":"https://api.github.com/users/koffienl","html_url":"https://github.com/koffienl","followers_url":"https://api.github.com/users/koffienl/followers","following_url":"https://api.github.com/users/koffienl/following{/other_user}","gists_url":"https://api.github.com/users/koffienl/gists{/gist_id}","starred_url":"https://api.github.com/users/koffienl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koffienl/subscriptions","organizations_url":"https://api.github.com/users/koffienl/orgs","repos_url":"https://api.github.com/users/koffienl/repos","events_url":"https://api.github.com/users/koffienl/events{/privacy}","received_events_url":"https://api.github.com/users/koffienl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-01T14:16:52Z","updated_at":"2018-08-01T14:16:52Z","closed_at":null,"author_association":"NONE","body":"I stumbled upon this project and it looks very promising. In some spare time I'n building something similar but it's not as extended as this project.\r\nI'm using a wiegand RFID with keypad reader in my project. Looking at the demo and source code it looks like there is no keypad support yet? Is this something that will be added in the future? \r\nLooking through the issues I also saw some questions about support for buzzer, would be a very nice to have to enable.\r\nWith buzzer support you could send a command to the ESP to start buzzing so the user is notified to enter a code / tag. Also after accepting a code it could start buzzing to notify the user the system is armed.\r\n\r\nSome code snippets I use for keypad support:\"\r\n````\r\n  int timeout = 10000;\r\n  long KeyTimer = 0;\r\n  int keylength = 4;\r\n\r\n  // Keep an eye on timeout waiting for keypress after starting with a *\r\n  // Clear code and timer when timeout is reached\r\n  if (KeyTimer > 0 && millis() - KeyTimer >= timeout)\r\n  {\r\n    Serial.println(\"Keycode timeout\");\r\n    CurrentInput = \"\";\r\n  }\r\n\r\n  // When * is pressed start keytimer to capture code\r\n  if (String(wg.getWiegandType()) == \"4\" && String(wg.getCode(), HEX) == \"1b\")\r\n  {\r\n    Serial.println(\"Start capture keycode . . .\");\r\n    KeyTimer = millis();\r\n  }\r\n\r\n  // When key is pressed AND timer is running AND CurrentInput < keylength AND key is not * or #\r\n  // Then add key to the current input\r\n  if (String(wg.getWiegandType()) == \"4\" && KeyTimer > 0 && CurrentInput.length() < keylength && String(wg.getCode(), HEX) != \"d\"  && String(wg.getCode(), HEX) != \"1b\")\r\n  {\r\n    CurrentInput = CurrentInput + String(wg.getCode());\r\n    KeyTimer = millis();\r\n  }\r\n\r\n  // When captured code equals predefined keylength, stop timer and check given code\r\n  if (CurrentInput.length() == keylength)\r\n  {\r\n    Serial.println(\"Stop capture keycode . . .\");\r\n    Serial.println(CurrentInput);\r\n  }\r\n````\r\n\r\nThis snippet has a hardcoded length for keypad input, but you could change it to not only start with a ````*```` but also end with a ````#```` . Further this snippet uses a timeout to prevent the code to wait endless for the user to finish the pincode."}}
{"actor":{"display_login":"koffienl"}}