Virtual Panel Plugin: Example Vera Status Panel

Oh and if the data is empty for LastTripped it will also display nothing. Try adding a label on there and don’t forget the two steps.

[quote=“rstrouse, post:5, topic:186476”]Create the Last Heal date/time variable

  1. In the Panel Elements list hit the + icon to bring up the “Select the type of element to add” dialog.
  2. Choose Variable from the dropdown and press the Select Control Type button. This will bring up a dialog that will allow you to place a variable on our new panel.
  3. Select the device where the variable resides in this case it is on ZWave.
  4. Enter urn:micasaverde-com:serviceId:ZWaveNetwork1 in the Service Id field. Again if your browser supports it, this will seed as you begin typing or you can select it from a list.
  5. Enter LastHeal for the Variable field. Like all the other fields this will auto-fill or you can select it from a list.[/quote]

Hello :slight_smile:
I did setup until here but LastHeal is not in the list. (see image)
I am on the latest UI7

[quote=“rstrouse, post:20, topic:186476”]TwannieM,

There are two steps you need to perform after you finish editing a panel. These include Reloading Luup then refreshing your browser. Did you perform both of these steps?[/quote]

Hi, Sorry missed your message…
Yes I did but to be sure I took it one step back to use your excellent manual to setup the Vera panel.
This works (although i selected someting else from the list (see previous message)
So now i am going to try to setup my own panel now :slight_smile:

TwannieM,

If the variable is empty it won’t show anything. Empty is not the same thing as 0 it is sometimes referred to as nul or nil. However, if the variable later changes to something other than empty it will display. With dates however, these need to start out as numbers (Unix Time). They will look something like this 1426544960 if you look at the device on the advanced tab. Play around with it a bit and have fun.

Thanks!! :smiley:

[quote=“rstrouse, post:24, topic:186476”]TwannieM,

If the variable is empty it won’t show anything. Empty is not the same thing as 0 it is sometimes referred to as nul or nil. However, if the variable later changes to something other than empty it will display. With dates however, these need to start out as numbers (Unix Time). They will look something like this 1426544960 if you look at the device on the advanced tab. Play around with it a bit and have fun.[/quote]

I am having fun for sure, what a great tool my friend!.. This does only work in the webinterface right?
I still can’t find "LastHeal "… only Last “LastUpdate”… is that the same??

Hmm… i am trying to setup a slider controlling a dimmer but it does not work…
Do I forget something?

@TwannieM,

Yup, you are having some fun! You are close with your slider but simply setting a slider’s target to 100 will not initiate a dimming command to the actual device. See the example that I included below. To do this create your slider so that it initiates a SetLoadLevelTarget command when the position of the slider moves.

Pay particular attention to the way the action parameters are set up. The newLoadlevelTarget parameter for a slider would be newLoadLevelTarget (notice the capitalization) if it followed the convention. This is the only device type I have run into so far that does not follow it.

BTW: You should update the plugin to the new version 1.6. Go to the plugin thread to get the new version.

aha!.. i did see the “call an action of a device” but did know what to enter.

Thank you sir!!! :smiley:

I will do the update.
How does this work with aswitch>, is there a list somewere which targents can be set?

Nice update!!!.. where can I check for new versions?
I notice the sliders do not go to the right level (current level node) when loading the page… the original sliders do

TwannieM,

For now I am attaching the most recent version to this post as an attachment.
http://forum.micasaverde.com/index.php/topic,31128.msg223995.html#msg223995

Virtual Panel v1.6 is the most recent version and you do not have to uninstall it simply copy the new files up per this post.
http://forum.micasaverde.com/index.php/topic,31128.msg227708.html#msg227708

As for your dimmer position this is contained in the LoadLevelStatus variable. If you set it to this variable you will find that it will follow the state set on the dimmer.

Great

I still have one question left…
I still can’t find "LastHeal "… only Last “LastUpdate”… is that the same??

No it is not the same. Have you ever run a network heal?

hmmm… no
when and how should i do that?

By the way, i am trying to set a virtual switch to toggle it’s state when motion is detected
I am trying to run this in a scene but something is not right… can you check whats wrong?

local DevNum = 622 local CheckSwitch = luup.variable_get("urn:dcineco-com:serviceId:MSwitch1","Status1",DevNum) or 0 If (CheckSwitch==1) then luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",0,DevNum) else luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",1,DevNum) end

You should run a heal any time you add or remove a z-wave device. This sets up your mesh network and determines the communication routes for devices. CheckSwitch is actually as string and you are trying to compare it with a number. Use tonumber(CheckSwitch) == 1 or you can use CheckSwitch == “1”

Everytime I add a device?.. i never did that… the button is under zwave settings right?
so this should work?

local DevNum = 622 local CheckSwitch = luup.variable_get("urn:dcineco-com:serviceId:MSwitch1","Status1",DevNum) or 0 If tonumber(CheckSwitch==1) then luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",0,DevNum) else luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",1,DevNum) end
or

[code]local DevNum = 622 local CheckSwitch = luup.variable_get("urn:dcineco-com:serviceId:MSwitch1","Status1",DevNum) or 0 If (tonumber(CheckSwitch==1)) then luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",0,DevNum) else luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",1,DevNum) end

Can I also read it as a boolean, not a string?

I am sorry, don’t know how to heal zwave

By the way, if i run the code in luup test it fails

[quote=“TwannieM, post:37, topic:186476”]Everytime I add a device?.. i never did that… the button is under zwave settings right?
so this should work?

local DevNum = 622 local CheckSwitch = luup.variable_get("urn:dcineco-com:serviceId:MSwitch1","Status1",DevNum) or 0 If tonumber(CheckSwitch==1) then luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",0,DevNum) else luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",1,DevNum) end
or

[code]local DevNum = 622 local CheckSwitch = luup.variable_get("urn:dcineco-com:serviceId:MSwitch1","Status1",DevNum) or 0 If (tonumber(CheckSwitch==1)) then luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",0,DevNum) else luup.variable_set("urn:dcineco-com:serviceId:MSwitch1","Status1",1,DevNum) end[/quote]

Neither of these should work since you are trying to compare apples to oranges using the == operator. First off the tonumber cannot convert a Boolean value (true or false) into a number. This is not defined this way in Lua. Since CheckSwitch is a string and the digit 1 is a number you cannot compare those either. tonumber looks at the string CheckSwitch and converts it into a number that can be compared with a number. So tonumber(CheckSwitch) == 1 is your expression or CheckSwitch == “1” is an alternative. In the first correct case you are comparing a number to a number and the second correct case you are comparing a string with a string.

Also, this is really getting off-topic for this thread. Folks that are trying to work through the sample really shouldn’t be reading about us debugging your luup code. So if you have more questions about this please post it in another thread.