Author Topic: Virtual Panel Plugin  (Read 42068 times)

Online rstrouse

  • Hero Member
  • *****
  • Posts: 732
  • Karma: +25/-6
Virtual Panel Plugin
« on: March 06, 2015, 06:12:50 pm »
Virtual Panel Plugin
This plugin provides the ability to create a user defined dashboard panel.  This includes changing the icons and positioning the controls on it without writing a single line of Luup.  You can hook these up to device commands, http get/post, execute scenes, and set variables by filling out a few forms.  The plugin files are included in this post.  Documentation is in the next post.

This plugin is designed for use on systems running 7.05 and above.  It will not work on prior firmwares.
Features:
  • Set Variables
  • Monitor Devices
  • Execute Scenes
  • Send Http GET/POST commands
  • Directly Execute Luup from controls defined on your panel

Control Elements:
  • Labels
  • Buttons
  • Toggles
  • Sliders
  • Vertical Sliders
  • Horizontal Rules
  • Horizontal Spacers
  • Line Breaks
  • Scene Groups
  • Control Groups
  • Color Indicators

Known Issues:
  • When multiple sliders are defined on the same panel Vera will not send the value from the current slider.  This is a reported bug in the Vera javascript files.
  • The installation guide is missing a key item:  When you Create Device for the Panel Manager you need to set the Upnp Implementation Filename to I_VirtualPanel.xml  If you missed this then you can go to the Advanced Tab on the Panel Manager and set it there.  Then Reload the Luup Engine again.
  • The configuration will not load when connected through home.GetVera.com.  To edit panels you must be connected locally.  After they have been saved the panels will work fine through home.GetVera.com

Release History:
  • v1.9 11-10-2015:
    • Bug Fix: Fixed issue where Execute Lua commands could be confused when more than one command is defined on a panel.
    • Feature: Added min/max values for vertical sliders.
    • Feature: Added the ability to define the suffix value for horizontal sliders.
    • Feature: Changed the horizontal slider to reflect the current state variable on the dashboard and Detail sample panels.
  • v1.8 07-03-2015:
    • Bug Fix: Fixed issue where dashes in format types would be interpreted incorrectly.
    • Feature: Added Hide on Dashboard.  When checked the control will only appear on the detail panel.
    • Feature: Added Execute Lua action.  Luup code can now be attached to any action on the panel.  This includes an internal syntax checker and the ability to run the code immediately to see its effect.
    • Feature: Added Color Indicator control.  Provides the ability to display a colorized indicator on your panel that reflects the current state of any device variable.
    • Change: Moved the elusive Reload Luup button so that it can never be obscured by the floating sample screens.
    • Change: Increased the size of the detail panel to match the default Vera panel size.
    • Rework: Removed the hack that was in place to deal with the multi-dimmer display variable bug on Vera.  MCV fixed the issue so the hack is no longer welcome.
  • v1.7 04-05-2015:
    • Bug Fix: Fixed icon conditions to allow numeric comparisons.  Previously, conditions would only evaluate the string representation of a numeric value which would yield unpredictable results.
    • Feature: Added horizontal width support for slider controls.
    • Feature: Added validation for numeric configuration values.
    • Change: Moved the layout tab to the top bar under device details so you do not have to scroll down to find the layout editor.  The option will move to the top after you have saved your panel edits for the first time after the update.
  • v1.6 03-28-2015:
    • Bug Fix: Fixed issue where HTTP settings for GET and POST were overwriting each other.  You could only get an HTTP command to work if you filled it out for get and post then changed to the option you wanted.
    • Feature: Dashboard view shows the panel layout as you add or modify controls on it.
    • Feature: Drag and drop editor for the detail tab view.
    • Feature: Added scene group capabilities.
    • Feature: Added control group capabilities.
    • Feature: Added format type for percentage values.
    • Feature: Added the ability to duplicate controls on the panel.  Bring up the control in the edit screen and hit add instead of save.
  • v1.5 03-20-2015:
    • Bug Fix: Fixed issue where invalid format strings could cause the panel manager to crash.  Now if invalid formats are provided it will show Format Error! in place of the variable.
    • Bug Fix: If a panel was added then saved and then immediately deleted sometimes Vera would not return the DeviceId until the next time the panels in the panel manager were saved.
    • Bug Fix: Fixed issue where spaces were not being preserved when drawn on the dashboard panel.
    • Bug Fix: If margins were supplied on variables it would inadvertently remove the formatting when it was rendered.
    • Feature: Added text alignment for labels and variables.  This will allow you to neatly align your labels and variables.  You will find these options on the text styler widget for variables and labels.
    • Feature: Added additional format types for numeric values.
    • Feature: Added quick help screen for common formats.
    • Change: Changed labels and variables so that the dashboard now honors the width entered when you define the them.  This should reduce the need for spacers in many situations and ensure alignment when the information being displayed varies.  The flow will only consume the width you entered when you defined the label or variable, so you may need to make some adjustments to existing panels.
  • v1.4 03-17-2015:
    • Bug Fix: Fixed issue where FireFox was closing the text style popup as soon as it was opened.
    • Bug Fix: Fixed issue where element parameters were required if you wanted to call an action on another device.
    • Feature: New text format styles for numeric and dates values.
    • Feature: Added storage for variables in their decorated and undecorated form.  Variables that are formatted for the screen will show on the panel device as _Formatted.
  • v1.3 03-14-2015:
    • Rework: Reworked existing positioning to account for 7.05.
    • Feature: Added ability to style text elements within the panel.
    • Feature: Added Line Break and Spacer elements to conform to the new control layouts for 7.05.
    • Bug Fix: Fixed positioning issues for items on the Details tab.
    • Bug Fix: Dialogs used to center on the screen without taking the current scroll position into account.  Dialogs will now center regardless of the scroll position.
  • v1.2 03-08-2015:
    • Feature: Added persistent toggle button style.  This allows the state of the button to be monitored on one variable while executing two different commands based upon the toggled state of the button.
    • Feature: Added command type to allow for no action.  When selected the command will do nothing.  This will allow any of the controls to operate as read only controls that simply reflect the state.
    • Bug Fix: Fixed issue where items were not being deleted after the delete confirmation was clicked.
    • Bug Fix: Fixed issue where changes sometimes resulted in duplication of the control.
  • v1.1 03-07-2015:
    • Feature: Added ability to reference state from another device for the icon state. BOFH security panel scenario
    • Bug Fix: Fixed issue where the Add Element dialogs were not closing after the add button was pressed
    • Bug Fix: Fixed issue where the delete state icon was not being saved until the default icon was saved
    • Bug Fix: Fixed issue where new state icons would not be reflected until other changes were made on the panel
  • v1.0 03-06-2015:
    • First release into the wild
« Last Edit: November 10, 2015, 08:24:22 pm by rstrouse »
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Online rstrouse

  • Hero Member
  • *****
  • Posts: 732
  • Karma: +25/-6
Virtual Panel Plugin : Documentation
« Reply #1 on: March 06, 2015, 06:15:42 pm »
Here is the current documentation for the plugin. 

Some examples of how to use the plugin:
Vera Status Panel
Sensor Panel
Master Dimmer
« Last Edit: July 06, 2015, 08:37:57 pm by rstrouse »
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Offline steets250

  • Full Member
  • ***
  • Posts: 151
  • Karma: +3/-2
Re: Virtual Panel Plugin
« Reply #2 on: March 06, 2015, 06:30:03 pm »
AMAZING!!  ;D ;D  Does it work on UI5 as well?

Offline Brientim

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2491
  • Karma: +77/-7
Re: Virtual Panel Plugin
« Reply #3 on: March 06, 2015, 06:32:47 pm »
I have reported you to the fun police.
You may make a lot of people happier with user definable and dynamic designed controls

Online rstrouse

  • Hero Member
  • *****
  • Posts: 732
  • Karma: +25/-6
Re: Virtual Panel Plugin
« Reply #4 on: March 06, 2015, 06:38:43 pm »
AMAZING!!  ;D ;D  Does it work on UI5 as well?

I don't think it will.  I don't have a UI5 Vera and I used the new js API.  I have created a .js file that might work but I can't really test it.  As you can imagine this was a bit of a feat.

I have reported you to the fun police.
You may make a lot of people happier with user definable and dynamic designed controls

Thanks.  It was fun building it but I've notified the guards at the gate not to let the cops in.
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Online RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9102
  • Karma: +690/-126
    • RTS Services Plugins
Re: Virtual Panel Plugin
« Reply #5 on: March 06, 2015, 06:39:35 pm »
Nice Job ... add PLEG and you can do some very customized automation ... that until present have been limited by Virtual (Multi) Switches.

Online rstrouse

  • Hero Member
  • *****
  • Posts: 732
  • Karma: +25/-6
Re: Virtual Panel Plugin
« Reply #6 on: March 06, 2015, 06:47:58 pm »
Nice Job ... add PLEG and you can do some very customized automation ... that until present have been limited by Virtual (Multi) Switches.

Thanks RTS, we'll see what the peeps do with it.
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Online BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2209
  • Karma: +101/-131
Re: Virtual Panel Plugin
« Reply #7 on: March 06, 2015, 07:11:48 pm »
Bang up job RSTROUSE!

I'm wondering if I can have device variables or scenes actually set the button states on your Virtual Plugin?
My intended use would be to give me a quick overview of my motion and windows/door sensor statuses on the one panel. Using eg the Toggle button for Arm/Disarm and a persistent button to show if triggered or not. (I'm assuming you can only define one icon/image?) Naturally those toggle buttons can be used to change the Arm status on the sensors. (arm/idarm all is also envisioned) 

I've looked at your manual but I'm not clear if the state setting would be something it already allows.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Online rstrouse

  • Hero Member
  • *****
  • Posts: 732
  • Karma: +25/-6
Re: Virtual Panel Plugin
« Reply #8 on: March 06, 2015, 07:44:57 pm »
Bang up job RSTROUSE!

I'm wondering if I can have device variables or scenes actually set the button states on your Virtual Plugin?
My intended use would be to give me a quick overview of my motion and windows/door sensor statuses on the one panel. Using eg the Toggle button for Arm/Disarm and a persistent button to show if triggered or not. (I'm assuming you can only define one icon/image?) Naturally those toggle buttons can be used to change the Arm status on the sensors. (arm/idarm all is also envisioned) 

I've looked at your manual but I'm not clear if the state setting would be something it already allows.
Yes, you can and you can define n-number of Icons for the state with n-number of conditions (all of them AND though... think PLEG).  As far as setting the states you simply associate them with the status.  Mirroring The state can be driven from anywhere within Vera. 

I apologize for the manual. It is a work in progress and I am trying to keep it < 1024k all in so it fits in a single post.
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Offline steets250

  • Full Member
  • ***
  • Posts: 151
  • Karma: +3/-2
Re: Virtual Panel Plugin
« Reply #9 on: March 06, 2015, 07:53:00 pm »
FYI: Doesn't work on UI5. The JS page won't load, and the text is positioned incorrectly. Looks like I will have to be upgrading to UI7!!

Online rstrouse

  • Hero Member
  • *****
  • Posts: 732
  • Karma: +25/-6
Re: Virtual Panel Plugin
« Reply #10 on: March 06, 2015, 08:03:22 pm »
Yeah I figured as much given the gymnastics to get it all working.  FWIW UI7 has come a long way since November when I got my Vera.
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Online BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2209
  • Karma: +101/-131
Re: Virtual Panel Plugin
« Reply #11 on: March 06, 2015, 08:19:06 pm »
@RSTROUSE: Oh boy! And my weekend is packed already with To-Do's. Your effort just added another one to that list. ;)

No need to apologize for the manual. It's always the last thing that gets done on a development project. If this goes they way I envision, a lot of my UI7 Vera devices may lose dashboard status and be combined in panels to make the most of the real estate.

Lets hope GetVera makes sure their UI7 apps support this plugin fully. Pity Garrett has put AuthomationHD development on hold.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline vosmont

  • Hero Member
  • *****
  • Posts: 663
  • Karma: +55/-8
Re: Virtual Panel Plugin
« Reply #12 on: March 07, 2015, 03:23:14 am »
I've just given a try, but I can't add a new panel (does nothing)
There's an error in the logs :
JobHandler_LuaUPnP::REQ_Handler no handler for lr_vpnl_GetConfiguredPanels

Offline RexBeckett

  • Master Member
  • *******
  • Posts: 3888
  • Karma: +475/-10
Re: Virtual Panel Plugin
« Reply #13 on: March 07, 2015, 05:16:45 am »
Now that is nice work, @rstrouse. This should save all those folk who want to change the appearance and/or behavior of standard devices from needing to write their own plugins. Think of the memory savings! :D

I hope you can persuade some of the mobile Apps' authors to support your initiative.
 

Offline mnaz

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
Re: Virtual Panel Plugin
« Reply #14 on: March 07, 2015, 08:45:21 am »
Very nice work!

In the future it would be nice if this app supported loading profiles to create virtual devices. If the configuration data is separated from the profile it would be simple to share these profiles with other Vera users. Think of the potential to eliminate a number plugins that just need very simple command and control.

This community is what makes my home automation fun, keeps me thinking and experimenting....