Creating a Local Variable for the Lock code dashboard

No, that is not a problem. I have the "Display Current Values" option turned off in my rule (affects only display, both on the screen and if you have logging enabled, but does not affect rule execution). It just adds the current value of device attributes/states, variables, etc. to the display so you can see their current state if that is helpful for you when writing the rule. I find they get in the way most of the time and confuse people more than they help, but they are on by default, unlike this screenshot.

I think you're just missing the step to select "Variable" instead of "Device" where it says "Tile Type," based on your screenshot.


Robert, So this is the end result?

Robert is theri a document that would allow me to create something like this:

Regarding the first issue, it should be noted that this document was written with specifically variable names in mind, if you are using different names, you will have to adjust where needed, I'm not sure if you're having problems still, but that is likely it if so.

For the second issue, a device tile with the "Attribute" template and choosing "lockCodes" as the attribute would get you an ugly view but a view nonetheless, assuming you're asking how to see the current codes. Otherwise, it looks like that person is using a couple custom (not built in) drivers or apps to get that particular display,

Robert, yes the tile works In its native state it display โ€œ2:0โ€. I tried adding a code by typing โ€œ10:1214:Anneโ€and the code appeared in the lock code manager, so thank you for holding my hand to get this done.

For the second issue, do I create the tile via the Rule Machine first, then incorporate it to the existing dashboard as a second tile?

The batteries for my lock are draining rapidly. The logs show a high level of activity. Did I miss a step in the lock configuration?
Norman

Rule Machine per se can't create Dashboard tiles, so this isn't where I'd start. I'd try just adding a device tile for your lock (in your Dashboard--and make sure you authorize the lock first), choose "Attribute" as the template, and pick "lockCodes" as the attribute. This won't be pretty (it will be in JSON format), but it will show you the information.

If you want something prettier, you could possibly use Rule Machine or a custom app to read this data instead, spit it out to a variable or device attribute, and then display that pretty version on Dashboard instead. I do not have steps on how to do this, as I have never tried, but it looks like you found something that might help if you wanted.

I think adding or removing a lock code might cause the driver to do a fetch of all lock codes to update the list (but at the very least a fetch for the requested position). Z-Wave locks are battery powered and normally "sleeping," but commands from the hub like this send a signal to wake them up for a little bit. This will probably drain batteries faster than if they were just sleeping. If this still happens in "regular" use, I might be concerned; but if you've just been playing around recently and adding/removing codes, it's probably that.

Robert, for the battery consumption, understood. I was concerned when I saw the "debug" blue box. I thought debug signaled an action that had to be taken.

Concerning creating the dashboard tile. When I select Apps / Lock Codes as a child of Hubitat Dashboard, I see my existing tile. I don't see how to add it from that screen. Do I need to create an additional dashboard child.

Robert, I just figured out that it is in the settings of the lock code dashboard.

Iโ€™m not getting what I was expecting.

That's just some "extra" information from the driver (or app, depending on the source of the log -- "dev" on the left is a device). You can turn that off on the device detail page. It should automatically get disabled 30 minutes after adding the device or after being manually enabled any time after, at least with stock drivers. It doesn't mean you need to do anything--just there to help debug if something goes wrong, say, the driver doesn't work as expected for a device you just added.

That looks like it should work. I'm not sure why it's saying to select an attribute when you already did. Maybe try removing the tile and re-creating? (There could also be something wrong with this particular attribute, maybe it not liking the JSON format; I've never tried, but I've also never heard of problems.)

Hi Robert, I'm having a bit of an issue with the notifications I receive. I'm expecting to get a "name" and I get "null"



What am I doing wrong?

Can't say without seeing the full rule, but for that to work, you'd need a variable called name that, at the moment the notification is sent, is populated with the expected value.

If you just want notifications when a lock code is used, you could trigger on Lock Code, use the "any code" option for the code, and then %value% will be the code name, so no need to create something yourself. (Such "built in" variables refer to the trigger event, so you'd need a real trigger to test this, BTW, not a "Run Rule Actions.")

Robert, for the unlock notification, all I want is Name associated with the code and the time stamp.

When you write, I reread you numerous times to ensure I understand what you wrote, Iโ€™m not yet at the point of seasing all you write. I summize that I can get the end result without using the Notification app, correct? Rather I use rule Machine to create a new Rule Call it lock code notification, the trigger is lock codes, the code is *any lock code". What is my capability for the new trigger event, "lock' or "lock codes", then what goes in Edit trigger event and Delete trigger event. Norman

Here is my full notification



Robert I'm not sure what you wanted full detail on here is my lock code notification that works partially except for display the name.

Also, in the tools, very top NOTIFICATIONS Last 20 notifications sent to device. Mine get deleted after a given period, any way of actually leaving them there no matter how old to a maximum of 20.



Interesting, not sure why that second Notifier wouldn't work, but you could try using %text% instead to see if that helps. Unlike the others, this depends on the driver to set the value, but if it does, it's usually something like "User X unlocked Lock Y," which seems like what you want (just maybe add in the time like you already are).

I was thinking about Rule Machine above, which I assumed you were using, so you can ignore that if not. It's normally more complicated than you need for notifications, but I couldn't remember if Notifier could handle lock codes.

Robert, I added all below in the notification text to see what would stick. I still can't seem to generate the name.


It looks like that was unlocked physically from the inside, not via a lock code. If that isn't what really happened, then the driver must not be reporting the lock codes. (Most do, but I've run into one that doesn't.)

One way to tell what the driver is doing is to check "Events" (at the top) on the device detail page for your lock. That will show you event history. If you don't see lock codes there, this kind of notification won't work since your driver must not be reporting them.

Robert, you are absolutely correct, I'm such an idiot, I can't expect a code when I unlock the door without using a code. You exercise a high degree of diplomacy, thank you. Robert I do have it working now but it repeats the notification. What %term% should I delete to have but one occurence, or do have to do trial and error with each one.


I'm not sure what the problem is. You should get one notification per event. The app will show you a history of recent notifications, and I'm not sure of any way to clear those, but they'll age out eventually. Otherwise with normal use, you'd just get notifications in real time, which is presumably what you want.

The three-dots icon on the dashboard tile will also let you see event history for the device (if you don't disable this icon), subject to the history limit you can set on the device detail page, without needing to go into the admin UI. Depending on what you want, that may also help you see if it's history you're after.

There might be people here willing to help. For visibility and the fact that it's a different kind of request than originally made here, you might want to post a new topic to put out some feelers along with a description (like above, maybe also linking back to it) of the kind of help you're looking for. Good luck!