Control Page Keypad Plugin

Posted on
Mon Jun 27, 2016 7:01 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Control Page Keypad Plugin

forum.png
Control Page Keypad
forum.png (273.98 KiB) Viewed 16619 times


"Add a keypad to your control pages for a variety of uses."

This plugin lets you set up a keypad on your control pages and use that keypad to control devices in Indigo. The security keypad can be used for an Indigo alarm system or really any situation you can think of where you need to passcode lock an Indigo action. The dimmer lets you punch in precisely what you want the brightness to be on one or more devices dynamically. The sprinkler keypad lets you either enter a manual schedule to run now or modify a currently running schedule to add time to the zones.

NAVIGATE: Plugin Store Download | GitHub Downloads & Release Notes

__________________________________________________________________________________________________________________________________________________________________________________________

Introduction


NOTE: This plugin is NOT designed exclusively for Room-O-Matic and/or LCD Creator, the screenshots here are just examples of how I utilize this plugin. Also, no graphics come with this plugin.

With the security keypad you define what the code is and then, using your control page, you enter that code and the plugin takes actions depending on if the code was correct or not. With the dimmer control you can either pre-define which devices to control up front or do it dynamically via an action call - or both - and when you enter a number between 0 and 100 it will set the brightness of all the devices.

In both cases the plugin gives real-time feedback so that you can do everything via a single line and whatever keys you want to use on your control pages. See the example from Room-O-Matic for how I implemented these in my Indigo network.

Features
  • Security Keypad
    • Standard security keypad features such as auto-accepting the code after a certain number of characters, actions to take after a configurable number of bad attempts, locking out the keypad in the event of too many failures, and the ability to input one character and show a generic character on the screen (such as you enter a character but the display shows **** or ####)
    • Multiple "actions" allow you to define what happens when the code is sent to the device, these "actions" can be action groups, device control or variable changes
    • Actions can be configured for:
      • Code successfully entered and accepted
      • Each code submission that is incorrect
      • Failed code after a configurable number of attempts
      • Special action codes (such as hitting 911 for emergency or 999 to turn on all lights, etc)
  • Dimmer Keypad
    • Allows you to set the exact brightness of one or more devices either as a statically defined group of devices or a dynamically changing list of devices (allowing you to use a single keypad for all of your Indigo devices)
  • Sprinkler Keypad
    • Lets you create a schedule on the fly and run it immediately or add time on a zone-by-zone basis to a schedule that is currently running

Configuration and Use

Available Actions
  • Send Character: Sends whatever character you choose to the plugin. Each key you define on your control page will execute this same action with a different character
  • Send Devices to Dimmer: You can choose to either use pre-configured devices for the dimmer keypad or send them on the fly. This is handy if you want only a single keypad for your entire Indigo system but want to dynamically decide which device or devices to dim or brighten
  • Delete Last Character: Backspace, essentially
  • Process Current Code: Enter, essentially. If you don't auto-accept your codes then you'll need to send this command to tell the plugin you are done

If you want a "readout" of the display simply link your control page image to the "Current value of characters sent" state.

Security Keypad

Screen Shot 2016-06-27 at 6.07.32 PM.png
Security Keypad Configuration
Screen Shot 2016-06-27 at 6.07.32 PM.png (100.83 KiB) Viewed 109274 times
Screen Shot 2016-06-27 at 6.07.49 PM.png
Security Keypad Action Options
Screen Shot 2016-06-27 at 6.07.49 PM.png (24.92 KiB) Viewed 109274 times


  • Security Code: The code that must be submitted to be considered successful
  • Auto Accept; How many character until the device automatically submits the entered code (or 0 if you want to submit it manually via an "enter" key)
  • Attempts: How many incorrect code submissions until you take action as a "fail" state
  • Seconds Until Reset: How many seconds you want to give the user to enter the code in, after this time whatever has been entered already is cleared and they start over
  • UI Character: Leave this blank to show the code that is being entered or put a "obfuscation" character here such as an asterisk or pound symbol
  • Success / Incorrect / Fail actions:
    • UI: What should be displayed in the UI when this event is raised
    • Action Type: When this event is raise if you want to run an action group, control a device or change a variable
    • Device/Variable/Action: The device, variable or action you want to run/change
  • Action Codes 1 & 2: Special codes that when entered do their own actions. These are auto-complete codes so if you put 911 as the code then as soon as the 2nd "1" is entered this automatically executes. You can leave the codes blank if you don't want to use this.

Dimmer Keypad

Screen Shot 2016-06-27 at 6.40.32 PM.png
Dimmer Keypad Configuration
Screen Shot 2016-06-27 at 6.40.32 PM.png (63.28 KiB) Viewed 109274 times


  • Devices: The dimmable devices in your Indigo network. This is optional as you can also define these devices via an action
  • Prompt: What you want your readout to say while awaiting input for brightness
  • When Devices Sent: You can choose to ignore devices added via the action, add those devices to these devices or use those devices exclusively

Sprinkler Keypad

Screen Shot 2016-06-28 at 2.46.21 PM.png
Sprinkler Keypad Configuration
Screen Shot 2016-06-28 at 2.46.21 PM.png (95.48 KiB) Viewed 83452 times


  • Sprinkler Device: Up to 3 different sprinkler devices to work with
  • Prompts: What you want the UI to show when waiting for input. If a zone has a value it will show the value, if it does not then it will show the UI values you put here
  • If Running: What to do if the sprinkler device you are changing the schedule for is currently running. You can choose to stop the current schedule and run your newly input schedule or you can add time to any zone and the schedule will be stopped and restarted with the new times added

Use: If you are using just a single sprinkler device then you will be prompted first for the run time for zone 1, simply use the "Send character" actions to add time and the "Next field" action to move to the next zone. Next will cycle all 8 zones and circle back to zone 1. You aren't required to enter anything for the zones, you can simply "Next" through the zones you don't care about until you get to a zone you want to change, when you do this the plugin assumes a new or added duration of zero for skipped zones.

If you are using multiple sprinkler devices you will be prompted to first choose which sprinkler you are changing, you can either use "Send character" to send 1, 2 or 3 or you can create quick buttons on your control page with keywords #dev1, #dev2 or #dev3. Once the device is selected the process is the same as if you had a single device.

Advanced

This plugin is pretty straightforward, the security keypad is a bit more advanced but also self-explanitory. If in doubt simply take all the defaults and see where it leads you.

Examples of Use

  • Example: Makeshift Indigo alarm
    • Device: Set up a security keypad with the code to disable your alarm and actions to take when the wrong code is entered or if someone hits special keys such as 911
    • Control Page: Create a grid of 12 images for 0-9, asterisk and pound, set the action for 0-9 to be "Send character" and the character to send is the same as the key. Use asterisk and pound to link to actions for "Delete character" or "Send complete code".
    • Use: When the proper code is entered your security devices are turned off and everything is good. When it is not you can do whatever your heart desires (or that Indigo allows at least) to let the world know that something is wrong.
  • Example: Dynamic keypad to control the brightness of every device in your Indigo network
    • Device: Set up a dimmer keypad and don't select any devices, then use the default of "Replace these devices" as the action
    • Control Page: Create a grid of 12 images for 0-9, asterisk and pound, set the action for 0-9 to be "Send character" and the character to send is the same as the key. Use asterisk and pound to link to actions for "Delete character" or "Send complete code".
    • Control Page: Set up some buttons to change the device configuration of the dimmer keypad as well as a client action to redirect the user to the keypad page when they tap on the control on your page to change the brightness
    • Control Page: Set up a "back" button to return to the previous control page once the desired brightness has been set
    • Use: On your normal control pages you have a button to change the brightness of a device, that button is configured to send a list of devices (or a single device) to the plugin so it knows which devices to control and the client action of that button redirects them to the keypad. The user punches in a number for the brightness (0 to 100 - anything over 100 will revert to 100), submits the value and all the devices will now be at that brightness

#Version|1.11#
Attachments
header.png
Control Page Keypad
header.png (333.58 KiB) Viewed 16622 times
Screen Shot 2016-06-27 at 6.06.54 PM.png
Display when the correct code was entered
Screen Shot 2016-06-27 at 6.06.54 PM.png (181.92 KiB) Viewed 109274 times
Screen Shot 2016-06-27 at 6.05.56 PM.png
Example using LCD Creator and Room-O-Matic (Security)
Screen Shot 2016-06-27 at 6.05.56 PM.png (696.41 KiB) Viewed 109274 times

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Jun 28, 2016 12:44 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: Control Page Keypad

I've run out of superlatives to describe your plugins - yet another awesome contribution!

I hope your wife isn't planning on coming home anytime soon!


Sent from my iPhone using Tapatalk

Posted on
Tue Jun 28, 2016 4:02 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: New Plugin: Control Page Keypad

howartp wrote:
I've run out of superlatives to describe your plugins - yet another awesome contribution!

I hope your wife isn't planning on coming home anytime soon!


Everytime i see the word superlatives i read it as 'superlaxitives'.

And yes this plugin looks awesome.. again.. i seriously need to find some time to implement a lot of changes in Indigo with these awesome additions! (Who needs Indigo 7 eh? ;) )

Computer says no.

Posted on
Tue Jun 28, 2016 4:46 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: Control Page Keypad

durosity wrote:
(Who needs Indigo 7 eh? ;) )

Says you who's been running it for a month!


Sent from my iPhone using Tapatalk

Posted on
Tue Jun 28, 2016 4:51 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: New Plugin: Control Page Keypad

Well Matt and jay did say that as I'm the best indigo user ever I could have it early. It's all finished, they're just making you wait! It's awesome btw.. They've managed to get every single wishlist item in there , even the ones that contradict others! And just wait until you see the new.. Oh perhaps I've said too much ;)

Computer says no.

Posted on
Tue Jun 28, 2016 6:34 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: New Plugin: Control Page Keypad

howartp wrote:
I hope your wife isn't planning on coming home anytime soon!

LOL, that makes one of us :).

howartp wrote:
Says you who's been running it for a month!

Only a month? I've been running the final release for almost a year now, pfft.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Jun 28, 2016 9:43 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: New Plugin: Control Page Keypad

Very cool!

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jun 28, 2016 3:01 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: New Plugin: Control Page Keypad (Updated)

I was anxious to get the irrigation keypad working so I coded that all up and have updated the plugin to now include that as a device. The docs above have been updated to show how it works. I had someone who was using Device Extensions request this feature and when I got to thinking about it I thought it would be a cool addition to the plugin.

The idea is that if you want to just run your sprinklers "manually" you can punch in the durations and let it go. If your sprinklers are already running and you think "hmmm, zone 5 could use another 20 minutes" then it will add 20 minutes to the time remaining on that zone (i.e., zone 5 was set for 30 minutes, ran for 6 so the new duration would be 24 + 20 = 44 minutes). For zones that have already passed (i.e., zones 1-4) they will only get any new duration you enter and not start over from the original duration.

This keypad was really quite tricky to write, much more so than I had anticipated, but in my environment it's working quite well, anxious to hear how it works for others.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Jun 28, 2016 4:59 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: New Plugin: Control Page Keypad (Updated)

Awesome plugin! The killer app for me though would be that functionality in a popup window.

Carl

Posted on
Thu Jun 30, 2016 11:44 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: Control Page Keypad (Updated)

Can't you set a control page to be 'pop up' and return to previous?

I haven't done it, I'm just trying to remember the button options in CP's.


Sent from my iPhone using Tapatalk

Posted on
Thu Jun 30, 2016 12:10 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: New Plugin: Control Page Keypad (Updated)

howartp wrote:
Can't you set a control page to be 'pop up' and return to previous?

Yes you can, one is an action and the other is a client action. But not a "pop up", just a page that can run an action and ALSO return to the previous page at the same time.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jun 30, 2016 12:57 pm
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: New Plugin: Control Page Keypad (Updated)

I'm impressed by what I've seen of this plugin although I haven't had time to implement. Thanks so much for the new capabilities! I have need for all types of these keyboards actually... irrigation, dimming, and security codes. I won't have time to install this until after the 4th of July holiday... sadly, too much going on right now, but I see other uses for these control pads too including natural gas flow to outdoor firepits, setting bbq temperature, setting timers... and possibly for direct volume setting on my Yamaha receivers (they set in dB from -30 through +16dB or so. Is there a "negative" number symbol key?

-Al

Posted on
Thu Jun 30, 2016 2:39 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: New Plugin: Control Page Keypad (Updated)

akimball wrote:
Is there a "negative" number symbol key?

No, but there aren't any other keys either, you supply the key yourself and tell the plugin what you want it to be. So if you want a hyphen then you put a hyphen graphic on your page and the action is to tell the plugin to send a hyphen.

Easy peezy.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jun 30, 2016 2:50 pm
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: New Plugin: Control Page Keypad (Updated)

Ah... I see. I was thinking actually in terms of an "action" that would convert the number read in to it's 1's compliment... but I see the folly in that since I can do that easily. Can't wait to try it out. :) Thanks for the plugin.

-Al

Posted on
Sat Jul 16, 2016 3:49 am
Coolcaper offline
Posts: 299
Joined: Aug 30, 2013
Location: Australia

Re: Control Page Keypad Plugin

Hi,

Tried to implement the keypad in my security control page and it accepts all the characters and even shows 'Disarmed' on my CP but nothing happens. This is the error I get:

WebServer request to execute "SecureMini" control #1 from 10.0.1.22
WebServer request to execute "SecureMini" control #1 from 10.0.1.22
WebServer request to execute "SecureMini" control #1 from 10.0.1.22
WebServer request to execute "SecureMini" control #1 from 10.0.1.22
EPS - Control Page Keypad Error Exception in plugin.runAction line 1246: 'key successsuccessVariableValue not found in dict'
CODE: if dev.ownerProps[prefix + "Type"] == "variable" and dev.ownerProps[prefix + "Variable"] != "": indigo.variable.updateValue(int(dev.ownerProps[prefix + "Variable"]), value=dev.ownerProps[prefix + "successVariableValue"])

Regards

Edit: The values for the EPS are setup as per default except the disarm code and the 'Success Action Type' is set to change a variable
Last edited by Coolcaper on Sat Jul 16, 2016 7:51 pm, edited 1 time in total.

Who is online

Users browsing this forum: No registered users and 1 guest