I would like to turn on/off specific codes for my front door at specific times of the day. For instance I have a person to come and check on our dog but I want to be able to allow only between 10am and 4pm every day. So say that this person comes and has a code of 1111 and they try to use it at say 10pm when we are out for the night, I don't want them to be able to use it, and can I record this attempt?
Have you looked at the Lock Code Manager app?
Yes, I have. However, it doesn't allow for specific times of day, at least I have searched for it and have not found an answer. I have been using Lock Code Manager for quite awhile, but only for giving access codes.
I believe you could achieve this with custom actions in rule machine.
Youâd need a rule that triggers on a specific time before your dog walker arrives. Then the actions would be to create a new lock code, wait a period of time til after the dog walker leaves, then delete the lock code.
Seems to me like that should do it.
So I would have to delete the code everyday and then create a new one?
My thought was if I could set active times for the use of a specific code.
But as youâve noted, Lock Code Manager doesnât have the option to enable/disable based on time of day.
Iâm not a developer, but Iâd guess thatâs what LCM is doing behind the scenes when configured to enable/disable lock codes anyway. In other words itâs actually adding and deleting the code from the lock each time.
You wouldnât be creating a new code each time with the method I outlined using rule machine.
The rule would recreate the same code each morning, delete it in the afternoon, and repeat daily.
I will give it a shot.
Check that post.
That is exactly what I am looking for. Rule machine seems to be pretty convoluted, I'm not exactly sure how to work it. I use the Basic Rule function all the time. However, this Rule Machine has me going in circles.
It looks more complicated than it is...the hardest parts are finding the custom commands you need.
Rule Machine example screenshots
Start a new rule. First thing you do is create the trigger, in your case, based on time (and maybe date):
Now you have the first two actions...
Next you need to add another action (again a "Run Custom Action" to delete the code after the desired time:
...and so on...
Create one rule for each lock code you want to set/remove at specific times.
Dive in...
ya thats dead simple.. lol
i forget the guys name but i really missing the old lock manager app that was 3rd party on smarthings.
there definately is room to spruce up the lock manager functionality in my meager opinion.. i basically just manually add and delete codes in the locks directly myself.. the locks themselves are Shite and everytime you fetch or change a code it has to go through all 30m codes.. stupid.
Yeah, I used that as well, just an amazing app...
100% this. AFAIK, z-wave locks don't have an enable/disable code function.
Yes, the code is either set on the lock or it isn't. There is no way to "disable" a code and have the code stay on the lock. The only way to disable it is to delete it.
My lock codes are now entirely managed with my Google Calendar. I use Rule Machine, in combination with GCalSearch to automate lock codes. I created a calendar called "Lock Codes" and have GCalSearch check my calendar every night at midnight and enable/disable codes based on specific trigger events.
I have calendar events set up as triggers using the GCalSearch app. For example, I have one trigger that searches for an event called "House Cleaning" on my Google Calendar. I typically set the event to start 1 hour before the cleaner is supposed to arrive and ends 1 hour after they are typically gone. At the beginning of the calendar event, Hubitat is triggered to enable (add) the housekeeper's lock code to a particular slot, and then when the calendar event ends, the code is disabled (deleted) on the lock again.
I'd prefer to stay away from any cloud calendar programs. This is why I went with Hubitat. I want everything self contained on the app or on prem, nothing in the cloud. I guess rule machine is the only way to do it or write my own app (which I am not a coder). So it's rule machine or Hubitat making an update to LCM. I guess it will be trial and error and a lot of this and that.
Here is a rule that would do what you gave in your orignal example. The number 20 you see in there is the code slot, just be sure to use a unique higher number slot for each person you will be adding/removing on a schedule so they do not conflict with each other, or other permanent codes.
After the rule added the code:
setCode and delectCode are addded using "Run Custom Action" in RM and look like:
Custom Action info in docs:
Thanks I'll give it a try!
That's actually pretty slick