Are we able to set PINs from a variable?

Posted on
Tue Jun 19, 2018 7:04 am
eric offline
Posts: 59
Joined: Dec 22, 2014

Are we able to set PINs from a variable?

I can't see to find a way to set PINs from a variable. Am I missing something?

If not, I think this feature would be a great addition - it would allow a series of variables, one per user, containing PINs to be changed from Indigo Touch and automatically updated in the locks, using triggers.

Posted on
Tue Jun 19, 2018 9:54 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Are we able to set PINs from a variable?

Oooooh!

How long have you been able to modify variables in Touch?!?!?!

Sorry, back on topic.

I can’t remember whether I implemented this or not.

If I did, then you set the pin value in the action to be something like %v:123456% where 12346 is the variable ID in Indigo.

Lookup variable substitution in the Indigo docs if you’re at a pc; I’m on phone and not back till later.

Peter


Sent from my iPhone using Tapatalk Pro

Posted on
Tue Jun 19, 2018 10:43 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Are we able to set PINs from a variable?

howartp wrote:
Oooooh!

How long have you been able to modify variables in Touch?!?!?!



At least a couple of years. Quite possibly longer than that!


Sent from my iPhone using Tapatalk

Computer says no.

Posted on
Tue Jun 19, 2018 1:06 pm
FlyingDiver online
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Are we able to set PINs from a variable?

I just looked at the code. String substitution has not been implemented.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Jun 19, 2018 2:25 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Are we able to set PINs from a variable?

howartp wrote:
If I did, then you set the pin value in the action to be something like %v:123456% where 12346 is the variable ID in Indigo.

Right, grab 1.0.50 then enter the following in the Set Pin action:

%%v:123456%%

Where 123456 is the variable ID from Indigo.

The v is case-sensitive.

Peter

Posted on
Tue Jun 19, 2018 3:28 pm
eric offline
Posts: 59
Joined: Dec 22, 2014

Re: Are we able to set PINs from a variable?

That was an amazingly quick response. Trying it now.

Thanks!

Posted on
Tue Jun 19, 2018 3:30 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Are we able to set PINs from a variable?

It only took 17 characters of coding! :-)


Sent from my iPhone using Tapatalk Pro

Posted on
Tue Jun 19, 2018 4:30 pm
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Are we able to set PINs from a variable?

I only count 12 :twisted: :mrgreen:

Late 2018 mini 10.14

Posted on
Tue Jun 19, 2018 4:55 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Are we able to set PINs from a variable?

mat wrote:
I only count 12 :twisted: :mrgreen:


Self.Substitute()





Sent from my iPhone using Tapatalk Pro

Posted on
Tue Jun 19, 2018 11:37 pm
eric offline
Posts: 59
Joined: Dec 22, 2014

Re: Are we able to set PINs from a variable?

This all works very well - I have ten variables and each contains a PIN. If I change any one of them (either on the desktop or Touch) then the lock is instantly updated with the new PIN.

There's one thing that's stumping me: I would like to be able to make a variable blank (empty) and have indigo delete that PIN. Currently when you make a variable blank it simply leaves the same PIN functioning.

Any thought on how to program this in Indigo?

Thanks

Posted on
Tue Jun 19, 2018 11:49 pm
eric offline
Posts: 59
Joined: Dec 22, 2014

Re: Are we able to set PINs from a variable?

Any thought on how to program this in Indigo?


Figured it out - never mind.

When writing the new PIN using the trigger, I first delete the pin, then write it. So a blank variable will result in a deleted PIN.

Posted on
Wed Jun 20, 2018 12:21 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Are we able to set PINs from a variable?

Hehe, yep that will work.

I was also going to say yes it can be done easily - I’ll intercept a blank pin in the setPin() routine in code, and redirect to clearPin() instead when it sees blank.


Sent from my iPhone using Tapatalk Pro

Posted on
Thu Jul 05, 2018 6:32 pm
chrisfromthelc offline
Posts: 38
Joined: Oct 08, 2014

Re: Are we able to set PINs from a variable?

I'm unable to set a PIN from a variable.

I can read the PIN just fine.

Code: Select all
Action Group                    Get Pin
   Z-Wave Lock Manager             Requesting PIN for user 1
   Z-Wave                          sent "Front Door Deadbolt" raw command [63 02 01]
   Z-Wave Lock Manager             Status:  User code 1 is 9 5 9 9 [Node: 13]


I can also set the PIN by manually assigning it in the action.

Code: Select all
Action Group                    Set Pin
   Z-Wave Lock Manager             Setting PIN for user 1 to: 7135
   Z-Wave                          sent "Front Door Deadbolt" raw command [63 01 01 01 37 31 33 35]
   Z-Wave Lock Manager             Status: User 1 updated [Node: 13]
   Action Group                    Get Pin
   Z-Wave Lock Manager             Requesting PIN for user 1
   Z-Wave                          sent "Front Door Deadbolt" raw command [63 02 01]
   Z-Wave Lock Manager             Status:  User code 1 is 7 1 3 5 [Node: 13]


However, using the %%v:123456%% format (which I've doublechecked that I've used my own variable ID) doesn't seem to work.

Variable with ID
Screen Shot 2018-07-05 at 5.27.40 PM.png
Screen Shot 2018-07-05 at 5.27.40 PM.png (7.05 KiB) Viewed 4107 times


Action setup
Screen Shot 2018-07-05 at 5.29.53 PM.png
Screen Shot 2018-07-05 at 5.29.53 PM.png (76.4 KiB) Viewed 4107 times


The PIN is unchanged.

Code: Select all
  Action Group                    Set Pin
   Z-Wave Lock Manager             Setting PIN for user 1 to: %%v:710549162%%
   Z-Wave                          sent "Front Door Deadbolt" raw command [63 01 01 01]
   Action Group                    Get Pin
   Z-Wave Lock Manager             Requesting PIN for user 1
   Z-Wave                          sent "Front Door Deadbolt" raw command [63 02 01]
   Z-Wave Lock Manager             Status:  User code 1 is 7 1 3 5 [Node: 13]


(yes, the PIN in the variable is different; I made sure of that)

Any ideas? I have a Kwikset 910TRL. It seems to otherwise work fine...it's just the variable issue that's got me stumped.

Posted on
Thu Jul 05, 2018 6:37 pm
chrisfromthelc offline
Posts: 38
Joined: Oct 08, 2014

Re: Are we able to set PINs from a variable?

...and I feel like a dummy. I downloaded what I thought was the latest version from the pinned post in this subforum. I got the real latest version from the plugin store, and it works fine now.

Image

Posted on
Thu Jul 05, 2018 6:54 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Are we able to set PINs from a variable?

Hehe, I love it when you solve things for me. :-)

I do need to check/remember to update the pinned post.


Sent from my iPhone using Tapatalk Pro

Who is online

Users browsing this forum: No registered users and 1 guest