Difference between revisions of "How to use Dashboard to Manage Lock Codes"

From Hubitat Documentation
Jump to: navigation, search
(Replaced content with " <big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big> <big> This document is available at: http://docs2.hubitat.com/en/how-t...")
(Tag: Replaced)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<big>Managing lock codes isn't a difficult task with Lock Code Manager, and Hubitat Remote Admin is easiest way to do this when you're away from home. However, if you're comfortable with creating Rule Machine rules and a Global Variable Connector, it's possible to create and change lock codes with Hubitat Dashboard.</big>
 
  
<big>The lock drivers built-in to Hubitat Elevation define each lock code with 3 values:</big>
+
<big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big>
  
*<big>Slot Number, which is the code position in the lock.</big>
+
<big>
*<big>The Lock Code itself, which is your 4 to 6 digit PIN code.</big>
+
This document is available at: http://docs2.hubitat.com/en/how-to/use-dashboard-to-manage-lock-codes
*<big>A name for the code.</big>
+
</big>
 
 
<big>Using Hubitat Dashboard, you can create a Dashboard tile to set each of those values for a particular lock.</big>
 
 
 
<big>'''<span style="color: red;;">WARNING!</span>''' While it's possible to set the Slot, Lock Code and Name from the Dashboard with this technique, you will not be able to see what slots are occupied in the lock and by which codes. You will need to know yourself which slots are occupied. This rule will change the code and name you enter in any slot you enter for the lock, but without any feedback to the Dashboard about the status of the lock codes on the lock. For complete control and status of your lock codes, Hubitat [[Remote Admin]] service is recommended.</big>
 
 
 
===<big>Part 1: Create a Global Variable</big>===
 
 
 
#<big>In Rule Machine create a Global Variable.</big>[[File:Step 1-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Enter '''Lock Code''' for the global variable Name, set the Variable Type to '''String''', and enter '''2:0''' in the Set initial value field.</big>
 
#*<big>'''NOTE''': Be sure to include a colon between the '''2''' and '''0'''.</big>[[File:Step 2-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Press '''Create,''' to create a Connector for the Global Variable. This will create a virtual device which will also be named '''Lock Code'''.</big>[[File:Step 3-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Set Connector Type to '''Variable''' and press '''Done'''.</big>[[File:Step 4-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
 
 
===<big>Part 2: Create a Rule Machine rule</big>===
 
 
 
#<big>Create a new Rule Machine rule.</big>[[File:Step 5-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Name the rule '''Lock Codes'''.</big>[[File:Step 6-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Set the Capability of the Trigger to '''Variable'''.</big>[[File:Step 7-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Set the Variable to '''Lock Code''' (This is the Global Variable that was created in '''Step 1''') and set the Comparison to '''*changed*'''</big>
 
#<big>Press '''Done with this Trigger Event''', and then press '''Done with Trigger Events'''.</big>[[File:Step 8-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Scroll down within the same rule window and select '''Create Local Variables.'''</big> [[File:Step 10-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Set Local Variables with the following '''Name''', '''Type''' and '''Value''' for each.</big>
 
#*<big>'''NOTE:''' For the Local Variable labelled '''name''', the Value field cannot be blank. Press the spacebar once in its "Value" field so you will be able to continue. For the Local Variable labelled '''slot''', the type is "Number", rather than "String" like the other Local Variables in the list.</big>[[File:Step 11-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Create the first action in the rule by choosing '''Set Variables''' for the Action Type, and then '''Set Variable''' for the Action.</big>
 
#<big>Choose '''temp''' for the Variable to Set, and '''Token''' for the string operation.</big>
 
#<big>In the '''String to get token from''' field, enter '''%Lock Code%'''</big>
 
#<big>Enter a ''':''' (colon) in the Delimiter field, and '''0''' in the Index field, then press the '''Done with this action''' button.</big>[[File:Step 13-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>For the next action, choose '''Conditional Actions''' for the Action Type, and then select '''Simple Conditional Action'''.</big>[[File:Step 12-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select '''Variable''' for the Action Condition capability.</big>[[File:Step 17.1-Lock Code with Dashboard.png|none|thumb|615x615px]]
 
#<big>Choose '''temp''' for the Variable and '''=''' (equals) for the Comparison, then enter '''slot''' in the String Value field.</big>
 
#<big>Press the '''Done with this Condition''' button.</big>[[File:Step 19.1-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select '''Repeat Actions, Wait''' for Action Type of the Simple Conditional Action, and '''Exit Rule''' for the Action.</big>
 
#<big>Press the '''Done with this action''' button.</big>[[File:Step 20-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>For the third action, select '''Set Variables''', then '''Set Variable'''.</big>
 
#<big>Select '''slot''' for the Variable to Set, and choose '''string''' for the operation.</big>
 
#<big>Enter '''%temp%''' in the "Numeric string" field, and press the '''Done with this action''' button.</big>[[File:Step 22-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>In the fourth action, you will again select '''Set Variables''', then '''Set Variable'''.</big>
 
#<big>Select '''code''' for the Variable to Set, and choose '''Token''' for the string operation.</big>
 
#<big>Enter '''%Lock Code%''' in the "String to get token from" field</big>
 
#<big>Type a ''':''' (colon) in the Delimiter field, and '''1''' in the Index field and press the '''Done with this action''' button.</big>[[File:Step 25.1-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>For the fifth action, you will once again select '''Set Variables''', then '''Set Variable'''.</big>
 
#<big>Select '''name''' for the Variable to Set, and choose '''Token''' for the string operation.</big>
 
#<big>Enter '''%Lock Code%''' in the "String to get token from" field</big>
 
#<big>Type a ''':''' (colon) in the Delimiter field, and '''2''' in the Index field and press the '''Done with this action''' button.</big>[[File:Step 29-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>In the sixth action, choose '''Conditional Actions''' for the Action Type, and then select '''IF (conditions) THEN'''</big>
 
#<big>Define the condition and select '''Variable''' for the Action Condition capability.</big>
 
#<big>Select '''code''' for the Variable and '''!=''' (not equal to) for the Comparison. Enter '''0''' in the String Value field.</big>
 
#<big>Press the '''Done with this Condition''' button., then press the '''Done with Conditional Action''' button.</big>[[File:Step 33-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select the Action Type '''Run Custom Action'''.</big>[[File:Step 37-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Choose '''Run Custom Action''', and '''Lock''' for the capability of the action device.</big>
 
#<big>Select the Lock to act on and press the '''Update''' button.</big>[[File:Step 38-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select '''setCode''' for the custom command and choose '''number''' for the parameter type.</big>
 
#<big>In the "string value" field, enter '''%slot%''' and then press the Tab key to update or tap in the white space of the rule.</big>[[File:Step 40.2-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Press the '''Add another parameter button.'''</big>[[File:Step 42-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Choose '''string''' for the parameter type, entering '''%code%''' in the "string value" field.</big>
 
#<big>One last time, press the '''Add another parameter button''' and choose '''string''' for the parameter type, entering '''%name%''' in the "string value" field.</big>
 
#<big>When all three parameters have been entered, press the '''Done with this action''' button.</big>[[File:Step 45-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select '''Conditional Actions''' for the Action Type and the select '''ELSE'''.</big>
 
#<big>Press the '''Done with this action''' button.</big>[[File:Step 46-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select the Action Type '''Run Custom Action''' again, just as you did in '''Step 37''', and again choose '''Run Custom Action''', and '''Lock''' for the capability of the action device.</big>
 
#<big>Select the Lock to act on and press the '''Update''' button.</big>
 
#<big>Select '''deleteCode''' for the custom command and choose '''number''' for the parameter type.</big>
 
#<big>In the "string value" field, enter '''%slot%''' and then press the Tab key to update or tap in the white space of the rule.</big>
 
#<big>Press the '''Done with this action''' button.</big>[[File:Step 50.1-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select '''Conditional Actions''' for the Action Type and the select '''END-IF'''.</big>
 
#<big>Press the '''Done with this action''' button.</big>[[File:Step 53-Lock Code with Dashboard.png|none|thumb|600x600px]]
 
#<big>Select '''Set Variables''', then '''Set Variable.'''</big>
 
#<big>Select '''Lock Code''' for the Variable to Set and the select '''Set string''' for the operation.</big>
 
#<big>In the "String to set Lock Code to" field, enter '''slot:code:name''' (don't forget to add colons between each string value.</big>
 
#<big>Press the '''Done with this action''' button, then the '''Done with actions''' button, and finally the '''Done''' button for the rule.</big>
 
#*<big>The purpose of this last action is to set the displayed name to slot:code:name so the previously entered lock code will not be shown.</big>
 
 
 
===<big>Part 3: Create a Dashboard Lock Code Tile</big>===
 
 
 
#
 
 
 
#<big>From the Apps menu, '''Create A New Dashboard'''.</big>[[File:Create new Dashboard for Lock Code.png|none|thumb|600x600px]]
 
#<big>Name the Dashboard, then choose the device Lock Code. This is the virtual device that was automatically created by the Global Variable Connector.</big>
 
#<big>Add a PIN to the '''Advanced''' settings of the Dashboard for security again anyone being able to create or delete lock codes.</big>
 
#*<big>You can further enhance security and prevent unauthorized access to your Dashboard containing the Lock Code tile by utilizing '''Per User Dashboards'''. Further details can be found in the [[Hubitat® Dashboard|Hubitat Dashboard]] documentation.</big>[[File:Dashboard setup for Lock Code rule.png|none|thumb|854x854px]]
 
#<big>Add a tile to your Dashboard with the template '''Variable String'''.</big>[[File:Add Dashboard tile for Lock Codes.png|none|thumb|600x600px]]
 
#<big>Tap the Dashboard tile and enter a '''slot''' number for the code to reside at, the lock '''code''' you want to add, and the '''name''' to be associated with the code.</big>
 
#<big>Press '''Save'''.</big>[[File:Lock Code Dashboard tile in use.png|none|frame]][[File:Lock Code entered from Dashboard.png|none|frame]]
 
#<big>Entering the slot number and a zero will delete the code at the slot number entered.</big>[[File:Enter slot number and zero to delete lock code.png|none|frame]][[File:Lock code deleted with Dashboard tile.png|none|thumb]]
 

Latest revision as of 04:23, 25 September 2022

We're moving! Please visit http://docs2.hubitat.com for the latest documentation.

This document is available at: http://docs2.hubitat.com/en/how-to/use-dashboard-to-manage-lock-codes