Virtual Panel Plugin

@BOFH,

Doing some final testing now. We now have a Persistent Toggle and can set any of the control actions to be display only. In fact the toggles can even be one sided in other words they can be set to command one side of the toggle while blowing off the other. This all the while reflecting the state.

The delete issue was due to me being a language snob and not realizing lua was developed by academics for non-programmers. Indexing is to say the least is non-deterministic. It’s funny how one can start with raw power like C and throw away the underlying pointers. But, I suppose non-programmers don’t do pointer arithmetic and from now on I won’t rely on index positions in an array. I should have realized my folly when I had to build my own hashing.

Anyhoo, when I finish my testing I will post up a v1.2 with the new features and the bug fixes. The issue with reading the config remotely will have to wait for now as I am going to have to do some research on what is actually occurring. I haven’t found anything regarding impersonation in the Lua language. Who knows maybe the problem is actually the path to the files and not permissions.

I have been busting up your panel config. Take a look at the screenshot below (I had to hook it up to a switch since the wife no longer wanted to participate and my 7lb dog doesn’t need anymore treats). The Device Variable to Monitor reflect the state. When the condition (Status == 1) evaluates to true the button will appear green. If it evaluates false then the button will appear silver (it is actually gainsboro I believe).

On the command side I have it executing a scene. When the button is silver it will execute the scene Dock Lights On. Consequently this turns on the dock lights which eventually changes the status variable on the Dock Light device. Voila the button will change to green. If the state evaluates to true then it will perform the action to be performed to change the state to off. The state will change and the button will return to silver.

Great plugin - lots of flexibility! This will pull in a few UI5 users to U17 and may work well with this:

http://forum.micasaverde.com/index.php/topic,30931.0.html

On the I_VirtualPanel.xml install: adding this to D_VirtualPanel.xml under the device tag should make the install easier:

<implementationList> <implementationFile>I_VirtualPanel.xml</implementationFile> </implementationList>

I know that I just put 1.0 up the day before and 1.1 yesterday but 1.2 adds some really great features. And while I have a few of you on the hook to give me suggestions I will continue to keep the releases rolling.

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

[ol][li]Download the VirtualPanel v1.2.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]

After you have updated the files, you may need to save one of the controls on your panel and reload luup again. This will refresh the command structure (for toggle buttons) as there have been changes to support the budding state engine contained within.

[quote=“a-lurker, post:42, topic:186313”]Great plugin - lots of flexibility! This will pull in a few UI5 users to U17 and may work well with this:

http://forum.micasaverde.com/index.php/topic,30931.0.html

On the I_VirtualPanel.xml install: adding this to D_VirtualPanel.xml under the device tag should make the install easier:

<implementationList> <implementationFile>I_VirtualPanel.xml</implementationFile> </implementationList>[/quote]

Thanks for that tip. I’ll add it so that it goes out with the next build. I sure hope mcv fixes some of the positioning quirks. I’m sure I’ll need to adjust if they do.

so after 45 minutes of tinkering I’ve attached the outcome. One panel taking the place of what would have otherwise been 13 device panels.

The Home button switched the HouseModes plugin between Home and Away.
The All Gone one runs a scene that does the housemodes buth also arms/disarms teh sensors in the living area.

A bit crowded but not bad for a 1st panel.

@BOFH,

that is AWESOME!!! (bad lego movie reference). I assume the persistent toggle worked as you expected. I think next might be the ability to create custom triggers and events. Now that we have panels how cool would it be make them participate in triggering events based upon the overall state or user defined state of the panel, not just the individual devices on the Vera. I’ll toy around a bit with this to see where the limits might be.

It works great. Even with none of the motion sensors armed I can see them pop on if they get triggered by myself or by the dogs. I only implemented notifications for the door and motion sensors at thsi time. Next will be the ability to trigger or untrigger them.

I was hoping to add the new MP shock sensor to the panel but somehow the package is in limbo somewhere. I’ve been promised a replacement if it doesn’t arrive by the 13th.

But yeah, a panel state as a trigger would be great!

Since my house is only 1100 sq ft and I got some good deals on zwave motion and door sensors, I decided to forego a dedicated alarm panel and all the wiring hassle that comes with that. Your virtual panel basically gives me an alarm panel within Vera. Now only if we could get Garrett to unhold authomationHD development just long enough to bolt on support for your virtual panels. That would put the cherry on the cake for me.

I could build a build a state engine for all this but maybe the right answer is to reach out to Richard. I don’t use PLEG yet (waiting on my OpenSprinkler delivery… should have been here Friday) but a built in expression editor via PLEG to set button states and execute PLEG as an action might be what the doctor ordered. He’s done a bunch of good work and leveraging that might just push all of this over the top.

Richard any thoughts if you are listening?

Just thought you may be interested. Attached is my Garage panel that I created using the plugin. It lets me consolidate everything garage related into a single panel. Yes the current plugin version is capable of all you see here but I am working on a style editor to allow you to do this more easily.

This would also be nice for the Nest with the thermostat, presence, and humidity devices.

@rstrouse: My garage door is incorporated on my ‘sensors’ panel as a button but if you have multiple doors and lights I can see it warrant it’s own panel. I just created an 'All Panel’s room to get the panels at the top of Vera’s dashboard page. I’m thinking of creating ‘room’ panels that have all zwave devices in a room on one panel. In preparation of hopefully GetVera adding support in their Android app for your panels.

BTW, how did you get the lines below the 2 and 4 car garage labels?

Word of Warning! The new firmware upgrade released today screws with the layout in the Virtual Panel plugin.
Guess I have to go tinker with the layout and see if I can re-arrange all the moved items back to their original locations

Before and after pictures attached.

@rstrouse

I admittedly have no clue what I’m talking about, but it seems to me you two should maybe be chatting? sorry if I overstepped or am off base here.

http://forum.micasaverde.com/index.php/topic,30310.105/topicseen.html

Nah you are not overstepping. Right now, I’m smarting a little bit though. I think amg0 is planning on having participants but it may be a bit early for him.

Hi This is a great plugin that I was waiting for. I was planning to use it to have more real time out of my ECO-device.
And I am not sure if this post should be here or in the Eco-device?

Now, any good idea what would be the best way to get a Panel with one Variable being updated real time by the Eco-device? I was thinking using the M2M function of the Eco-device, something like this :/data_request?id=variableset&DeviceNum=112&serviceId=urn:upnp-org:serviceId:VContainer1&Variable=Variable2&Value=$T127, but not sure what service to use for the Panel device and not sure if this is the best method. Also with this method, I am limited to ONE information coming out of the Eco-device. And I want more.
I know there is scripting for Eco-device integration (that is what I am using today), but this is not real-time. Today I run every 15 min.
Thanks for any suggestion.

mikelux57

Hi,
I was about to give this a try and then 7.05 came along. it seems that ignores the top and left settings completely and just strings all together based on the order the definitions appear in the JSON. So a negative top to move a control next to the con no longer works. If you do manage to find a way to move the controls about please let us know how.

Cheers Rene.

[quote=“tomgru, post:53, topic:186313”]@rstrouse

I admittedly have no clue what I’m talking about, but it seems to me you two should maybe be chatting? sorry if I overstepped or am off base here.

http://forum.micasaverde.com/index.php/topic,30310.105/topicseen.html[/quote]

To add praise, it seems both @rstrouse and @amg0 have produced superior interfaces… it’s MCV that should be talking to them.

These two gentlemen have single-handedly produced superior interfaces that took MCV well over a year to produce the inferior interface that is UI7.

[quote=“reneboer, post:56, topic:186313”]Hi,
I was about to give this a try and then 7.05 came along. it seems that ignores the top and left settings completely and just strings all together based on the order the definitions appear in the JSON. So a negative top to move a control next to the con no longer works. If you do manage to find a way to move the controls about please let us know how.

Cheers Rene.[/quote]
@Rene,

7.05 seems to officially make plugin developers 2nd class citizens when it comes to dashboard layout. It really pissed me off (and that’s hard to do) but I won’t get into the twisted religions that software developers get into. It becomes a debate in the ecumenical and not steeped in reality. Ultimately, I will again get smited for my comments. What I mean by this is that I have found no (supported) way as a plugin developer to create a dashboard panel that looks like for instance…[url=http://forum.micasaverde.com/index.php/topic,31174.msg224513.html#msg224513]http://forum.micasaverde.com/index.php/topic,31174.msg224513.html#msg224513[/url]. This pleasure is limited to the people with access to view and inteface.js. Plugin developers are now limited to liquid layouts. It simply cannot be done without brute force – it can be done but it would be fragile and I wouldn’t want to put myself or any of you through that… again.

I get the liquid scheme for the outer panels but a 320 (.25vga) strategy was roughly what the original positioning on the panel was based. This would have been great if the logical coordinate mapping had been completed in the JSON and all the controls followed the rules. But alas, that was not the case (for those of you that were around for that evolution – think postscript). To be fair I don’t know why the direction changed (and just guessing here) but I suspect that they were compelled to violate the rules for buttons and vertical sliders by some plugin developer simply did not understand. Who knows maybe the reason was a really good one so don’t beat MCV up over this as they do build some really good stuff. In the throws of software production you sometimes throw bits against the wall to see what sticks. Think of it as natural selection.

Now back to philosophy. I always say when life feeds you lemons you open a 25 year old McCallan and share it with a Montecristo. So after my scotch and cigar I have come up with a solution. Granted it won’t be as robust as the original but it will allow you to create a panel on the detail tab that is every bit as robust as before. The dashboard will follow the limits of the shackles that I bear. Essentially, there will be two sets of positioning and I will give you some advanced formatting options that may make your desired output not so elusive. MCV did remove the vertical restrictions so the 24px wasted space at the top of each panel (for battery status) and the padding for the icon and name become less problematic. Still, if you are listening, moving the 24px out of the flow would give us back 24px. If you list 10 average panels you lose the space of a full panel.

Either way you will have reason to use the plugin. Again, the detail tab will let you position, but the dashboard panel will force you to build the screen as if you were doing it in Excel without the ability to merge cells vertically. This is actually a benefit. Think of the fun you will have tweaking your layout… you will become addicted (as the dream scene music plays in the background).

All of this requires quite a bit of re-coding on the definition side so bear with me as I get this pulled together. I do this in my spare time and the research takes longer than the actual coding. I now have pulled together my action plan so perhaps sometime this coming weekend when I get time to work on it, I’ll post an update and a path to fix your existing panels. We’ll see what gets done (wringing hands).

…If you read the novel stay tuned for the plot.

Currently this plugin is only for the UI looks right? Besides editing I never use the UI for normal control would this help in other Apps? Does it only merge current devices or allows new virtual ones?

@rstrouse: You rock again. I’ve been seriously considering rolling back the upgrade to the backup I made in the process to restore my sensor panel. I swear this plugin is like crack. :slight_smile: Now if only GetVera includes support for it in their Ui7 Android/iOS apps, I woudl allow a lot of customization of the look. I started tinkering with a panel that controls the YamahaHTTP plugin (That one is mostly scene driven) and the virtual panel would allow me to create a UI panel for it in probably less than an hour. Imagine those panels supported in Android/iOS Windows apps.

Andrei, Marc, Colin: Any chance you could give rstrouse a helping hand with documentation etc to reduce his workload?