A smart lock with smartphone