Plugin - Variable Container

Can anyone confirm it’s working with the updated json files on UI4?

My vera3 arrived yesterday, soon I will be able to test UI4 on my vera2 myself…

Me. :slight_smile: I installed this plugin on a user’s Vera yesterday and I noticed that there were only two tabs, and none was selected. The missing tab was the javascript tab that you added. So I added the Position tag to all the tabs and this fixed all the issues.

Thanks again for the hint mcvflorin!

I am unable to retrieve variables from this device. I tried the following code which should dim the light to 50% (variable1 is set to 40, which is the device id for the light), but it doesn’t.

local variable1 = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”,“Variable1”, 78)
call_action(“urn:upnp-org:serviceId:Dimming1”,“SetLoadLevelTarget”,{ newLoadlevelTarget=“50” }, variable1)

Is there any way for me to trace the error?

Thanks in advance,
ComputerScience

Two things come to mind. One: you may have to convert the device id to a number with tonumber (). Two: the capitalization looks dodgy in newLoadlevelTarget with its lowercase L.

[quote=“computerScience, post:24, topic:170119”]local variable1 = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”,“Variable1”, 78)
call_action(“urn:upnp-org:serviceId:Dimming1”,“SetLoadLevelTarget”,{ newLoadlevelTarget=“50” }, variable1)[/quote]

The first thing which I see is that it should be “luup.call_action(…)” not “call_action”.

You could use "luup.log(“The Value of Variable1 is: " … variable1)” after getting the variable to show the value of the variable in the log. Then you know if the problem is about getting the value or calling the action…

Thanks for the replies. It should indeed contain ‘luup.’ in the begining as you mentioned, it was something i missed to copy when pasting here.
However after logging I found that:
02/19/12 15:08:09.445 luup_log:0: The Value of Variable1 is: 40 <0x2c0 c>
So I tried to solve it with tonumber() and it works great now.

Thanks once again for the help.

Hello -

This plugin works great - thanks for sharing.

Now, can anyone tell me how to delete a variable? In the process of figuring it out, I created several variables that I need to get rid of. (some of them are actually named the same…)

Thanks!

I don’t think as for the moment there is an easy way to remove these variables:
http://forum.micasaverde.com/index.php/topic,3593.msg17560.html#msg17560

The quickest way would probably be to delete the device and then create a new one again. Then you should only have the initial variable left.

Chixxi,
Thanks for the plugin.
I am trying to install the plugin on Vera2/UI4, but am a little confused by the thread.
The pinned top posting says to download V1.0 for UI4.
But then later in the code, someone points a tag required for tabs to work properly.
It seems, but not positive, you incoprorated those changes into 3508 for UI4.
But later when you ask if the UI4 plugin is working, the same previous tech pointed out that a patch is needed, and i am not sure if that patch is included in your 3508 release.
I hopeful you can point me in the right direction of installation on UI4.
Thanks
Sean

@smilligan:

The fix is included in the newest version, so download the version 1.3 (=build 3508)

Basically I just didn’t adjust the info in the first post of this thread, may bad sorry. As far as it’s possible I’ll always try to make the same version of my plugins compatible with UI4 and UI5.

Chixxi,

Thanks for the clarification.
I have installed the 3508 version on our Vera2/UI4 host and it is working great.

here is what I noted:

  1. I tried to install by logging into the mios.com web portal to the target VERA2. The files uploaded fine (at least it appeared) but when i created the device, it did not have proper tabs… I then checked the LUUP files and it did not show the files VC files that had been previously uploaded. So i connected directly (via port forward) to the target VERA and re-uploaded the VC files. After which time all seemed to work OK. I am not sure i you want to include that for UI4 the user should be connected locally prior to uploading the VC files…
  2. We are using your VC with LONG Text strings of 30+ characters in some instances. When we try to post long strings to the VariableX the strings wrap around after what appears to be 18 characters. because there is a lot of space/realestate on the VC’s “View Variables” tab, could you extend the size/format of this variable to support more characters?

Thanks again for a great tool

Kind Regards
Sean

Chixxi,

I was wondering what would be required to increase the variable CHAR size width as it displays on UI4?

It seems that each of the 5 Variable slots on the Variable Container only support a literal width of about 18 characters before it wraps around and overwrites the next variable.

Thanks
Sean

[tt]http://bugs.micasaverde.com/view.php?id=2095[/tt].

IIRC, there are some duplicates of this bug in the bug tracking tool.

Doesn’t seem to be of any priority to MCV.

@AP15e

THanks for the link to the bug ticket re Variable presentation.

The problem we are experiencing is on UI4 (not UI5), and the problem is not elipses at end of literal, but rather that the literal “wraps” to the next line, thus overwriting all subsequent variable literals.

Do you feel these problems are related in Both UI5 and UI4?

Thanks
Sean

That’s an easy one:

Just increase the ‘Width’ (and the ‘Left’) parameters in the [tt]D_*.json[/tt] file - another incompatibility between UI4 and UI5 …

The problem you are experiencing on UI4 and the UI5 bug I’ve linked to are unrelated.

Ap15e,

Made the changes you suggest and all is fine now.
Thanks for your support.
Sean

sorry for this late answer. I saw your first request and honestly forgot about it :-\ I am still glad you got it working!

@ap15: thanks for your answers/solutions!!

I will include the fix in the next update, but that will be next week, quiet busy at “real” work at the moment.

Chixxi,
I appreciate your plugin and support.
I have already made the changes to the json as Ap15e suggested.
I made the width 200 on all VariableX controls and it works fine.
There is no rush on implementing on your end, and it takes a matter of seconds next time you are editing the json file.
However, i would like to continue using your standard fork for both UI4 and UI5, so hopeful these changes will find there way into your code someday.

On another note; On the latest UI4 version we noted that VariableX do not display on main device icon and only on the Tools page. Would it be possible to put the first three VariableX on the main device icon (without VariableName)? (we had modified your very first UI5 version to work on UI4 and put variables on main page of variable container as per the attachment; but as you continue to evolve the VC concept, we would like to use your published forks to maintain some standard) Just food for thought. Either way it has been a great help to use your VC.

Thanks
Sean

My general problem concerning vera2 and ui4:
I don’t have a vera2 with ui4 for testing, since I got my vera3 I sold my vera2. I asked micasa verde to provide me the vera3 for free, but they only made it $99 cheaper. Therefore I sold my vera2, I am not willing to develop plugins, provide support and pay for all of that. So I can not recreate what your are asking me for, so it’s quiet hard for me to test ui4 compatibility.

Could you post some more screenshots of the plugin in UI4 and let me know what adjustments you made to show the variables in UI4?

In UI5 all variable names and all variable values are shown on the device’s icon, see screenshot attached.