I use the virtual switch plugin. How to use, when the switch turn on then must be 4 digit pin?
Etc. alarm systems
Not possible with the Virtual Switch plugin.
Is this possible at all?
In my opinion, no. You’d have to store the PIN inside Vera, and since anyone with access to Vera effectively has root and can read anything, the PIN is fair game too.
Which leads back to the oft-stated assertion that if you want a security system, buy a security system.
It’s like passwords. You never store passwords in the clear either. You store a “salted” or one-way hash copy of the PIN. When an external device wants to ask if the pin that was entered, it is hashed and if the answers compare, it was the correct PIN.
Better keep that salt nice and secret. Imagine how long it would take to generate a rainbow table of 4-digit PINs.
(By induction, we are back to my assertion that there’s no security on Vera. You can’t keep the salt secret either.)
Just thought I’d share something that is related
I was also looking to do something similar and I found this html code online for a keypad - which I have had running on my NAS (for fun)
It is setup after 4 digits to direct the person to a URL of their choice (so you can set it up to point to a Vera lua_invoke one).
If it is of interest, I’m sure someone with more programming skills than I could make this work a little differently…
A pin is essentially a very insecure password. There are only 10,000 combinations. By creating a rainbow table, all the pins are matched against their hashes ahead of time. So if you had a way to record the hash value that was sent, the pin is one of a very few possiblities.
Of course you would not use a four digit pin to launch a nuclear tipped-missile either.