Author Topic: Virtual Panel Plugin  (Read 57612 times)

Offline tomgru

  • Hero Member
  • *****
  • Posts: 1402
  • Karma: +18/-6
Re: Virtual Panel Plugin
« Reply #15 on: March 07, 2015, 12:21:47 pm »
Oh man... this almost makes me want to finally upgrade  ;D

Offline rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #16 on: March 07, 2015, 12:23:58 pm »
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

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.
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 rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #17 on: March 07, 2015, 02:33:35 pm »
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. :P

@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.
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 rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Virtual Panel Plugin v1.1 Released
« Reply #18 on: March 07, 2015, 04:06:45 pm »
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
  • 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
  • Unzip all the files into a directory on your computer
  • Go to Apps --> Develop Apps --> Luup files on your Vera
  • Drag all the files from the zip file onto the Drag & drop files panel on your Vera.
  • After the files have been uploaded to your Vera click on the Serial Port configuration menu and press Reload Luup
  • Refresh your browser
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 BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2391
  • Karma: +111/-138
Re: Virtual Panel Plugin
« Reply #19 on: March 07, 2015, 04:12:01 pm »
@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. ;) 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?
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 robw

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Virtual Panel Plugin
« Reply #20 on: March 07, 2015, 05:33:29 pm »
Afraid I too am getting the

"JobHandler_LuaUPnP::REQ_Handler no handler for lr_vpnl_GetConfiguredPanels <0x745a5520>"

appearing in the logs when I try to add a Panel.

Basically when I try to "provide a name for your new panel" and click "Add Panel" - nothing appears to happen

Incidentally I have also noticed that when I go into the edit of the virtual Panel - Status, Debug and Compression seem to be overwrighting each other. This is both IE11 and Chrome....

I have tried reloading LUA by both manually restarting the LUA and have also rebooted my Vera, and have updated to 1.1

Help!

Rob

Offline rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #21 on: March 07, 2015, 06:08:32 pm »
Rob,

What FW version are you running on your 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

Offline rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #22 on: March 07, 2015, 06:24:29 pm »
On a hunch, I wonder if the post where the dkjson.lua file wasn't actually included in the standard Vera FW distro like I saw in several posts describing it as part of the firmware.  Easy enough to fix.  Do you have WinSCP installed or can you ssh to see if the file dksjon.lua exists in usr/lib/lua?

If it isn't there you can get it from dkjson.lua or I can post a version right here.
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 BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2391
  • Karma: +111/-138
Re: Virtual Panel Plugin
« Reply #23 on: March 07, 2015, 06:31:32 pm »
Just got a chance to install and am running in to the same issue. Vera 3 with FW 1.7.513

/usr/lib/lua/dkjson.lua exists but as a link to /mios/usr/lib/lua/dksjson.lua (perms lrwxrwxrwx)
/mios/usr/lib/lua has dkjson.lua size 16414 and perms -rw-r--r--

I noticed that the Virtual Panel master device is showing 'no handler' at the top. See attached screen shot


Did you install that dkjson.lua in /user/lib/lue or is your setup the same as mine where it is a link?


« Last Edit: March 07, 2015, 06:36:45 pm by BOFH »
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 rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #24 on: March 07, 2015, 06:50:18 pm »
Nope this is the same setup as mine it is a link.  I have deleted everything Virtual Panel on my Vera and will install with the distro to see if I can hammer it out by going through the install procedure.
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 rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #25 on: March 07, 2015, 07:09:18 pm »
Ok, not sure why but the implementation file is not getting set on the panel manager when it is installed using Create Device.  Go to the panel manager -- Advanced Tab and set the impl_file attribute to I_VirtualPanel.xml and it should work.  I did this twice in a row and the first time it set the value and the second it did not.  I will amend the installation instructions to have new users type this in when they create the device.

Without the implementation file the lua will not load.  At least it's not the dkjson and the posts that I read about that lib are still true in my mind.
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 BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2391
  • Karma: +111/-138
Re: Virtual Panel Plugin
« Reply #26 on: March 07, 2015, 07:22:34 pm »
Had to perform a LUUP reload after setting the impl_file but I can now create a panel and it shows up. Tinkering with layout now.
« Last Edit: March 07, 2015, 07:30:15 pm by BOFH »
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 rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #27 on: March 07, 2015, 07:28:02 pm »
Yeah I wish I would have found that prior to deleting all my panels but I saved the configs and can reconstitute them pretty easily.  On I side note I noticed that the initial config on the panel does not initialize the icon when it is first created.  If you want to change the default icon, add a state icon and delete it.  Then the panel icon will operate as advertised.  I fixed the lua so that this will not occur on later versions.

Btw thanks for helping me get unbend the kinks that will occur in the wild.
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 BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2391
  • Karma: +111/-138
Re: Virtual Panel Plugin
« Reply #28 on: March 07, 2015, 07:33:12 pm »
You just beat me on that one. Just about to report that peculiarity.

Quick question. When deleting an item from the layout it says the item will not be deleted until the 'Save Configuration' button is clicked. I must be missing something but I can't find that one...
« Last Edit: March 07, 2015, 08:02:35 pm by BOFH »
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 rstrouse

  • Hero Member
  • *****
  • Posts: 781
  • Karma: +27/-9
Re: Virtual Panel Plugin
« Reply #29 on: March 07, 2015, 08:19:55 pm »
That is an artifact.  Originally, I had a button that would perform all the reload luup functions and kill off the cache so that the user wouldn't have to remember to refresh their browser and reload luup.  This proved to be a bit too ambitious so the items are deleted when you actually hit the delete button but the changes don't get reflected until you reload luup and refresh your browser. 

So, It should say that the changes will not be reflected on your panel until you hit the Reload Luup button and refresh your browser.  Thanks, I have seen that message 1,000 times and didn't realize that it needed a mod.
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