How does work eventlist2 ?

Hi all,

Sorry for my stupid question, but the link “http://wiki.micasaverde.com/index.php/UI4_UI5_Migration#Developer_changes” isn’t clear for me.

To get a working personal device with text, I Have to get a variable out of my I_…xml and use it in my json file ?

Could someone give an example, google weather is too complicated for me to understand.

Holiday plugin or snd is easier ?

Could someone help me I do a plugin, everything work except the text in the device’s layout .

Gilles.

If you’re looking for an example for displaying text on the UI5 dashboard:

{
    "flashicon": "icons\/generic_icon.swf",
    "imgIconBody": "",
    "imgIconDimmable": "",
    "imgIconTurnable": "",
    "imgIconMin": "",
    "imgIconMax": "",
    "halloIconsDir": "pics\/hallo",
    "inScene": "0",
    "x": "2",
	"y": "5",
    "DisplayStatus": {
    },
    "doc_url": {
        "doc_language": 1,
        "doc_manual": 1,
        "doc_version": 1,
        "doc_platform": 0,
        "doc_page": "devices"
    },
    "Tabs": [
        {
            "Label": {
                "lang_tag": "tabname_control",
                "text": "Location data"
            },
            "Position": "0",
            "TabType": "flash",
            "ControlGroup": [
                {
                    "id": "1",
                    "scenegroup": "1"
                }
            ],
            "SceneGroup":[
                {
                    "id": "1",
                    "top": "0",
                    "left": "0",
                    "x": "3",
                    "y": "5"
                }
            ],
            "Control": [
             {
                "ControlType": "label",
                "Label": {
                    "lang_tag": "lblMsg",
                    "text": "Location:"
                },
                "Display": {
                    "Top": 10,
                    "Left": 20,
                    "Width": 200,
                    "Height": 20
                }
              },
              {
   			"ControlGroup":"1",
     			"ControlPair":"1",
     			"ControlHeader":"1",
                "ControlType": "variable",
                "Display": {
                    "Service": "urn:upnp-ap15e-com:serviceId:WAI1",
                    "Variable": "Location",
                    "Top": 40,
                    "Left": 20,
                    "Width": 500,
                    "Height": 20
                }
              }
          ]
         },
        {
            "Label": {
                "lang_tag": "advanced",
                "text": "Advanced"
            },
            "Position": "2",
            "TabType": "javascript",
            "ScriptName": "shared.js",
            "Function": "advanced_device"
        }
    ],
    "DeviceType": "urn:schemas-ap15e-com:device:WAI"
}

So sorry, my request isn’t clear.

I want my Ui5 device print an information like old plugins in UI 4.

For example I’m working on a notification device and want it to print how many notifications were sent.

My variable is a counter in my implantation device but how to use it to show this on my own plugin ?

Envoyé depuis mon GT-I9000 avec Tapatalk

Edit: I compare your example and mine, the difference is scenegroup. So I modify and now, I’ve got a partiel text and a number supperposed. I have to work and find how to display that clearly. perhaps two id ?

OK

I Understand a little more, your file + this link: http://wiki.micasaverde.com/index.php/Luup_plugin_tabs + some tests help me.

I got only one problem, my display text on dashboard is trunk like that “Notificatio…”. the name is “Notifications”. How avoid to trunk this text.

It’s a bug which has already been reported to MCV. I get it too.

UI5 requires changes to (almost?) all plugins that use the dashboard to display information.

But as usual, the documentation for developers is incomplete and the UI5 presentation manager implementation is broken, so don’t expect plugins like [tt]SND, DAD, GWC, DSS, AUC, …[/tt] to be ported to UI5 anytime soon …

Hi,
Thank you Futzle for your information. Where can I add discovered bug, is there a method or a link ?

It’s funny, My xmpp plugin display an uncomplete text, whereas the SND that I modify display exactly the text.

@Ap15e

I agree with you, I’m not a developper but can develop some easy code. Finding information in wiki without forum users would be impossible for me.

For others users:

In general if we want to display some texts and/or variables we have to add some code lines in .json device.

After the llne

 "halloIconsDir": "pics\/hallo",

add (adapt to your prefered dimension):

"x": "2",
"y": "3",

After that (thank you to Ap15e) for the tab position 0 in controlgroup add or modify:

[code]“ControlGroup”: [

            {

                "id": "1",

                "scenegroup": "1"

            }		

        ],

    "SceneGroup":[

            {

                "id": "1",

                "top": "1.5",

                "left": "0.25",

                "x": "2",

                "y": "3"

            }

        ],[/code]

For the “ControlGroup”: “1”, add “top”: “0” and “left”: “0” corresponding to the first line of the device in the dashboard for example a text and then add “top”: “1” and left “0” for displaying the variable in the second line of the device.

[code]“Control”: [

         {

              "ControlGroup":"1",

   		"ControlPair":"1",

			"ControlHeader":"1",

	"top": "0",

            "left": "0",

            "ControlType": "label",

            "Label": {

                "lang_tag": "lblMsg",

                "text": "Messages sent:" 

            },

            "Display": {

                "Top": 10,

                "Left": 10,

                "Width": 100,

                "Height": 20 

            } 

          },

          {

		"ControlGroup":"1",

 			"ControlPair":"1",

 			"ControlHeader":"1",

	"top": "1",

            "left": "0",

            "ControlType": "variable",

            "Display": {

                "Service": "urn:upnp-ap15e-com:serviceId:SND1",

                "Variable": "MessagesSent",

                "Top": 10,

                "Left": 120,

                "Width": 150,

                "Height": 20 

            } [/code]

After that save, upload the D_xxxx.json file in vera and reload.

Gilles

edit: if you want text and variable in one line you could use: “top”: “0” and “left”: “0.5” for example.

The bug tracking system is at bugs.micasaverde.com.

As usualy,

Thank you Futzle.

Gilles.