Virtual Panel Plugin

[ul]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:

[list]
[li]v2.1 07-23-2018:

  • Bug Fix: Fixed issue with recent fw 7.0.27+ where the configuration data was not being decoded from Vera.
  • Feature: Added the min/max device control.

[/li]
[li]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.

[/li]

[li]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.

[/li]

[li]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.

[/li]
[li]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.

[/li]
[li]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.

[/li]
[li]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.

[/li]
[li]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.

[/li]
[li]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.

[/li]
[li]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

[/li]
[li]v1.0 03-06-2015:

  • First release into the wild

[/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. http://forum.micasaverde.com/index.php/topic,31128.msg223995.html#msg223995[/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?

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy