Creating a Local Variable for the Lock code dashboard

Thank you for your help, I managed to pass the ''variable'' step however I don't have the connector column. When I go back to settings / Hub Variables it does appear. So how is it that the Connector column appears in the Hub Variables but not in the ''Lock Code Rule''.

I forgot that local variables no longer have connectors in Rule 5.1. You'd need to use a hub variable for this instead. (There may also be a different/better approach in general; I don't think anyone has tried this in quite a while. In the unlikely even you have an existing install called "Rule Machine Legacy," you could do this as-is using that instead.)

Local variables and hub variables are completely separate -- local variables only work in this particular rule -- so I'm not sure what you mean here. (If you have two with the same name, that is coincidental but also something I'd avoid.)

Berta, I do not have access to Rule Machine Legacy. I deleted the Variable and the rule that I created that was missing the Connector column and tried the process over again from scratch and I get the same results. In named the variable I added ''Lock Code Var'' to reduce my confusion as many items are labelled ''Lock Codes''. The Local Variables table is still missing the Connector column.

You mention that I need to use a hub variable instead. In Settings, when I select Hub Variables I am brought to this page

How do I access local variables to complete the lock code dashboard.

Hub variables and local variables are separate. Hub variables are available to any app on the hub. Local variables are a similar feature but only available to the specific rule in which they are created and not visible outside that context. You cannot access local variables from hub variables -- that is outside the design.

What I was suggesting is to create a hub variable instead of a local variable, then use that in the rule instead of a local variable (for any variable where you need a connector; this may not be all of them). You may need to adjust the names to make it less confusing, especially if you're doing this in multiple rules, since again, hub variables are shared among all apps.

Supposed to be Bert (for "Robert"), but back when I joined, the software backing the forum just took part of what was then my e-mail address for my now unfortunate username, and either you couldn't change it back then or I didn't know how, and now it's kinda stuck... :rofl:

Hi Robert, (my younger brother is a Robert we call him Bob). So it sounds like a local variable would work better for me because in the near future I'll have 3 hubs out there and each will have a Lock code dashboard so what I believe you are saying is that the Hub variable would be visible when working on the other hubs and could create confusion, while a Local variable would be present strictly in the Hub for that given location. So in naming this ''Hub variable'' I need to add a location in it's title.

From my perusing when I go to settings / Hub Variables /. I still come up with the last screen shot I sent you. Is that screen shot that of a Local variable or a Hub Variable (the title seems to indicate Hub variable). If it is a local variable I suppose I delete this and created a Hub variable. If this is a Hub Variable how do I integrate it into the dashboard making process. Norman

OK, I think it became easier to update the document (as long as the original 50-some steps and screenshots were...) than to keep picking it apart to find the thing that have changed. :smiley:

I think it is up to date now and works (possibly with a few typos given how terrible both this system's spellcheck and my keyboard-mashy fingers are). At the very least, the screenshot at the end of the first section is an actual working rule from the hub I tested the steps on:

https://docs2.hubitat.com/en/how-to/use-dashboard-to-manage-lock-codes

Hope this helps!

strong text Good Morning Robert,

I’m astonished that you wrote to me so late last night. I don’t know what time zone you are on but even for the West coast wow, bravo.

For some reason, I seem to be locked out of access to the community. I get a message that my email already exists or is in use. I’m using the same password to access my hub through AWS as well as to access the community, is that what I should do?

I struggled a bit at step 24 “define expression element select new condition“ where the documentation did not quite match the screens. But I think I got through it.

In reviewing what I managed to accomplish, I notice that all the characters in black below do not appear in your screen shots, is this a problem

IMG_0133

Robert I’m now attempting to create the dashboard tile and struggling a bit. Can you tell me if what appears above is accurate, if it is I’ll continue to work on creating the dashboard.

IMG_0134

Thank you Robert,

Norman G Bergeron

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