Virtual Panel Plugin

[ul][size=18pt]Virtual Panel Plugin[/size]
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.

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

Control Elements:
[list]
[li]Labels[/li]
[li]Buttons[/li]
[li]Toggles[/li]
[li]Sliders[/li]
[li]Vertical Sliders[/li]
[li]Horizontal Rules[/li]
[li]Horizontal Spacers[/li]
[li]Line Breaks[/li]
[li]Scene Groups[/li]
[li]Control Groups[/li]
[li]Color Indicators[/li]
[/list]

Known Issues:
[list]
[li]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.[/li]
[li]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.[/li]
[li]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[/li]
[/list]

Release History:
[list]
[li]v2.1 07-23-2018:
[list]
[li]Bug Fix: Fixed issue with recent fw 7.0.27+ where the configuration data was not being decoded from Vera.[/li]
[li]Feature: Added the min/max device control.[/li]
[/list]
[/li]
[li]v1.9 11-10-2015:
[list]
[li]Bug Fix: Fixed issue where Execute Lua commands could be confused when more than one command is defined on a panel.[/li]
[li]Feature: Added min/max values for vertical sliders.[/li]
[li]Feature: Added the ability to define the suffix value for horizontal sliders.[/li]
[li]Feature: Changed the horizontal slider to reflect the current state variable on the dashboard and Detail sample panels.[/li]
[/list]
[/li]

[li]v1.8 07-03-2015:
[list]
[li]Bug Fix: Fixed issue where dashes in format types would be interpreted incorrectly.[/li]
[li]Feature: Added Hide on Dashboard. When checked the control will only appear on the detail panel.[/li]
[li]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.[/li]
[li]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.[/li]
[li]Change: Moved the elusive Reload Luup button so that it can never be obscured by the floating sample screens.[/li]
[li]Change: Increased the size of the detail panel to match the default Vera panel size.[/li]
[li]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.[/li]
[/list]
[/li]

[li]v1.7 04-05-2015:
[list]
[li]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.[/li]
[li]Feature: Added horizontal width support for slider controls.[/li]
[li]Feature: Added validation for numeric configuration values.[/li]
[li]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.[/li]
[/list]
[/li]
[li]v1.6 03-28-2015:
[list]
[li]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.[/li]
[li]Feature: Dashboard view shows the panel layout as you add or modify controls on it.[/li]
[li]Feature: Drag and drop editor for the detail tab view.[/li]
[li]Feature: Added scene group capabilities.[/li]
[li]Feature: Added control group capabilities.[/li]
[li]Feature: Added format type for percentage values.[/li]
[li]Feature: Added the ability to duplicate controls on the panel. Bring up the control in the edit screen and hit add instead of save.[/li]
[/list]
[/li]
[li]v1.5 03-20-2015:
[list]
[li]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.[/li]
[li]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.[/li]
[li]Bug Fix: Fixed issue where spaces were not being preserved when drawn on the dashboard panel.[/li]
[li]Bug Fix: If margins were supplied on variables it would inadvertently remove the formatting when it was rendered.[/li]
[li]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.[/li]
[li]Feature: Added additional format types for numeric values.[/li]
[li]Feature: Added quick help screen for common formats.[/li]
[li]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.[/li]
[/list]
[/li]
[li]v1.4 03-17-2015:
[list]
[li]Bug Fix: Fixed issue where FireFox was closing the text style popup as soon as it was opened.[/li]
[li]Bug Fix: Fixed issue where element parameters were required if you wanted to call an action on another device.[/li]
[li]Feature: New text format styles for numeric and dates values.[/li]
[li]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.[/li]
[/list]
[/li]
[li]v1.3 03-14-2015:
[list]
[li]Rework: Reworked existing positioning to account for 7.05.[/li]
[li]Feature: Added ability to style text elements within the panel.[/li]
[li]Feature: Added Line Break and Spacer elements to conform to the new control layouts for 7.05.[/li]
[li]Bug Fix: Fixed positioning issues for items on the Details tab.[/li]
[li]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.[/li]
[/list]
[/li]
[li]v1.2 03-08-2015:
[list]
[li]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.[/li]
[li]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.[/li]
[li]Bug Fix: Fixed issue where items were not being deleted after the delete confirmation was clicked.[/li]
[li]Bug Fix: Fixed issue where changes sometimes resulted in duplication of the control.[/li]
[/list]
[/li]
[li]v1.1 03-07-2015:
[list]
[li]Feature: Added ability to reference state from another device for the icon state. BOFH security panel scenario[/li]
[li]Bug Fix: Fixed issue where the Add Element dialogs were not closing after the add button was pressed[/li]
[li]Bug Fix: Fixed issue where the delete state icon was not being saved until the default icon was saved[/li]
[li]Bug Fix: Fixed issue where new state icons would not be reflected until other changes were made on the panel[/li]
[/list]
[/li]
[li]v1.0 03-06-2015:
[list]
[li]First release into the wild[/li]
[/list]
[/li]
[/list][/ul]

1 Like

Here is the current documentation for the plugin.

Some examples of how to use the plugin:
Vera Status Panel
Sensor Panel
Master Dimmer

AMAZING!! ;D ;D Does it work on UI5 as well?

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

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.

[quote=ā€œBrientim, post:4, topic:186313ā€]I have reported you to the fun police.
You may make a lot of people happier with user definable and dynamic designed controls
. [/quote]
Thanks. It was fun building it but Iā€™ve notified the guards at the gate not to let the cops in.

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.

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.

[quote=ā€œBOFH, post:8, topic:186313ā€]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.[/quote]
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.

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!!

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.

@RSTROUSE: Oh boy! And my weekend is packed already with To-Doā€™s. Your effort just added another one to that list. :wink:

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.

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

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! :smiley:

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

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ā€¦

Oh manā€¦ this almost makes me want to finally upgrade ;D

[quote=ā€œvosmont, post:13, topic:186313ā€]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[/quote]

vosmont,

No handler typically, means the luup engine has not picked up the .lua file for the plugin. You need to restart the luup engine after installation of the plugin. Unfortunately, when you manually create a device it does not perform the reload sequence.

let me know if this resolves your issue.

Thank all of you for the encouragement. And curse your foul hides for the great suggestions. I really am looking to make all of this simpler with better end results so keep them coming. :stuck_out_tongue:

@BOFH, I ran your scenario with the alarm panel. Yes you made me want one of those too! During my configuration, I noticed that it would be nice to include external states when defining the state icons. A bit of hashing and merging later and bammo the state icons can reference the state from any other device. It does not need to be previously included on one of the local panel variables. Iā€™m packaging up a new build that supports that feature right now. Btw it also cleans up some of the js quirks I noticed along the way that will get in your way. Right thumb/left thumb sometimes get reversed.

@Maaz, Iā€™m right there with you. The configuration data is already decoupled from the device setup. Initially, I did this so that there would be a path for adding features and responding to Vera updates. A wizard to include a device on a panel would absolutely rock and the ability to share it would be remarkably straight forward. I might see how much of the jQuery draggable interface exists on the Vera to make this drag and drop. The hardest thing about creating a Virtual Panel is positioning the controls.

@RexBeckett, I did a bit of playing around to see which model placed the least load on the Vera and was careful to keep the footprint low after config load/execution. I started down the path originally of creating a plugin for each panel that I wanted on my Vera. This rabbit hole really ate up the resources. New child devices consume very few resources in comparison. Hopefully, this can limit the number of plugins that are required to get the job done.

I will reach out to the mobile App guys. Iā€™m guessing traction here will guide my ability to convince them. The funny part about this is that if they support this plugin, indirectly they will support all plugins. Iā€™m willing to transform any of the config data in any form they would like. So if your listening and you have a mobile appā€¦ call me. (thumb in ear pinky right side of the mouth).

On a side note any of you who are struggling with .json files you will find that Virtual Panel will create the contents of .json/xml files pretty quickly that you can use in your plugin and tweak. Iā€™ve spent more time than I would like to admit digging through view.js, interface.js, and the jquery custom js files to gain some level of the ui interactions with it since the rules behind each and every control is different. This was the origin of Virtual Panel.

I know that I just put 1.0 up yesterday but 1.1 adds a feature that is needed to define State Icons more easily. Also, it fixes some annoying js quirks when saving icons for the panel.

To install this update follow the instructions below. Do not uninstall the plugin

[ol][li]Download the VirtualPanel v1.1.zip file from the first post on this thread. [url=http://forum.micasaverde.com/index.php/topic,31128.msg223995.html#msg223995]http://forum.micasaverde.com/index.php/topic,31128.msg223995.html#msg223995[/url][/li]
[li]Unzip all the files into a directory on your computer[/li]
[li]Go to Apps ā†’ Develop Apps ā†’ Luup files on your Vera[/li]
[li]Drag all the files from the zip file onto the Drag & drop files panel on your Vera.[/li]
[li]After the files have been uploaded to your Vera click on the Serial Port configuration menu and press Reload Luup[/li]
[li]Refresh your browser[/li][/ol]

@rstrouse: I do apologize for putting those sensor panel ideaā€™s into you mind. IBut in all honesty, you are to blame for creating the plugin. :wink: And yes, Iā€™m already considering panel #2 to provide push button control of my Yamaha receiver via the Yamaha HTTP plugin. The latter doesnā€™t have all the fancy buttons for control and relies on scenes.

If your brainchild does what Iā€™m hoping it does, I think my dashboard will mostly consist of panels with very few ā€˜realā€™ devices as it is a wonderful way of allowing ā€˜customā€™ layouts and unclutter the dashboard.

Marc, Colin? Any chance you can get the MCV apps to support this plugin?