12.10.2016, 13:03
Without os.sleep your script is consuming all available CPU resources.
The only way to check for new devices is to do polling, so there's no way to further optimize this script. You can try increasing sleep value to lower CPU load. I suppose users can hold the keyfob a little bit longer if they have proper feedback (door opening).
The only way to check for new devices is to do polling, so there's no way to further optimize this script. You can try increasing sleep value to lower CPU load. I suppose users can hold the keyfob a little bit longer if they have proper feedback (door opening).