ALTUI : New Features Suggestions

[quote=“amg0, post:40, topic:188330”][quote=“dalhoj, post:39, topic:188330”]Hi,

Keep up the good Work.

It would be cool if the web page had the posiblity to be fullscreen on Ios devices

I have used these meta in top of some of my websites:

regards Jens[/quote]
i did not know that was possible. its cool, it is in the next version. it seems that it only works when the user first save the page as an icon on its home page, and then ipad opens it in full screen mode. do you confirm that is the expected behavior ?[/quote]

Yes that is true, It works like it should. But if you will you can make a .png file there is 114x114 px and make an icon for the site. And link to it with this meta: then it uses that image for the “app” on the homescreen.

Hello amgo - the work is progressing well !

I have the situation where the internet connection is only available sometimes. When it is unavailable, AltUi will not function. As previously discussed, it is only the availability of the Google graphing library that causes this stoppage. All the other libraries are cached by the browser and are available off line. Can I suggest an “internet available” flag be maintained and be used to enable/disable the menu items that use graphing.

If the network is down, for whatever reason, it would be a major plus to be able run the AltUI.

[quote=“a-lurker, post:42, topic:188330”]Hello amgo - the work is progressing well !

I have the situation where the internet connection is only available sometimes. When it is unavailable, AltUi will not function. As previously discussed, it is only the availability of the Google graphing library that causes this stoppage. All the other libraries are cached by the browser and are available off line. Can I suggest an “internet available” flag be maintained and be used to enable/disable the menu items that use graphing.

If the network is down, for whatever reason, it would be a major plus to be able run the AltUI.[/quote]

The LocalCDN variable of altUI device is here for that. If not empty, it can point to a web path on Vera where key JS and CSS files can be put, and thus not even depending on the browser cache.

So in that mode , and except for the Google gauge, everything should be functional without Internet.
localcdn – Alternate UI Contains an example of a LocalCDN folder which you could put under /www on your Vera and point LocalCDN variable to it.
For the gauge , I never had the courage yet to rewrite this to have a local one.
The failure of getting the gauge JS files will not prevent altUI from working , gauge will simply not displays. All other d3.js graphic would work.

Hope that helps.

The start up of AltUI does appear to be dependent on the availability of the Google graphics library - it is not cached, where as everything else is (for a year). So the LocalCDN folder would not help - the browser already has it all. If the graphics library load fails the library load call back never occurs and AltUi doesn’t start up.

The graphic library is also interactive - that is calls are made to the Google servers dynamically by the browser, to do back end graphing work.

I have a plugin with some buttons on it. Some buttons run a function immediately and others run a function as a job. Those that are run as jobs fail as the action URL is not issued by AltUI. So for example RunTest works but JobTest fails:

[code]
urn:testing-org:serviceId:Test1
RunTest
runTest()

    <action>
    <serviceId>urn:testing-org:serviceId:Test1</serviceId>
    <name>JobTest</name>
    <!-- this can take up to 15 minutes to execute: run it as a job -->
    <job>jobTest()</job>
    </action>[/code]

Maybe just a parsing problem of the XML file?

[quote=“a-lurker, post:45, topic:188330”]I have a plugin with some buttons on it. Some buttons run a function immediately and others run a function as a job. Those that are run as jobs fail as the action URL is not issued by AltUI. So for example RunTest works but JobTest fails:

[code]
urn:testing-org:serviceId:Test1
RunTest
runTest()

    <action>
    <serviceId>urn:testing-org:serviceId:Test1</serviceId>
    <name>JobTest</name>
    <!-- this can take up to 15 minutes to execute: run it as a job -->
    <job>jobTest()</job>
    </action>[/code]

Maybe just a parsing problem of the XML file?[/quote]

I use a lot of my own plugin ( IPHoneLocator , with actions implemented as JOB ) without problem, and ALTUI is not really parsing that information and the parser is the std jquery/Js xml parser. would be surprise we have an issue here.

so it is got to be somewhere else, what exactly is the command that these buttons are doing ? do they call a UPNP action ?
if so, you can try the MISC/DEBUG/Javascript command and type

MultiBox.runActionByAltuiID(altuiid, service, action, params)

where altuiid is 0-nnn

and spy simultaneously what is happening in terms of http communication between ALTUI and the VERA

Re: “problem with the parsing” - bad choice of words. More a question of jobs and non jobs possibly being treated differently?

I tried the MultiBox.runActionByAltuiID() function and that issues the URL perfectly OK and the call works. It seems to be some higher level problem. The UI button push is not invoking the action.

[quote=“a-lurker, post:47, topic:188330”]Re: “problem with the parsing” - bad choice of words. More a question of jobs and non jobs possibly being treated differently?

I tried the MultiBox.runActionByAltuiID() function and that issues the URL perfectly OK and the call works. It seems to be some higher level problem. The UI button push is not invoking the action.[/quote]

we have to look somewhere else then.
a) can you first confirm where is this button appearing in ALTUI ? on which page exactly ? the small dashboard ? the control panel ?
b) when press the button which is no working can you please capture the console.log as well as the http traffic at the same time using the browser debugger
c) what plugin this is ( device type ? ) , can you please provide the JSON file that is used by this plugin

thank you

The button is on the Control Panel. This error appears:

Uncaught TypeError: Cannot read property 'length' of undefined m.extend.each @ jquery.js:358 (anonymous function) @ J_ALTUI_uimgr.js:3531 m.event.dispatch @ jquery.js:4670 r.handle @ jquery.js:4338

[quote=“a-lurker”]The button is on the Control Panel. This error appears:

Uncaught TypeError: Cannot read property 'length' of undefined m.extend.each @ jquery.js:358 (anonymous function) @ J_ALTUI_uimgr.js:3531 m.event.dispatch @ jquery.js:4670 r.handle @ jquery.js:4338[/quote]
Ah… Getting there.
So I would need the device type and Json files of this device to investigate further,
Also a confirmation of altUI version you are running so I can check source file line.
Thx

EDIT: I suspect something around the Control Command definition in JSON, would like to see how this device defines it and whether or not it has a parameter clause for instance

Envoy? de mon iPad en utilisant Tapatalk

Would you be interested in a slight extension of the new variable watch trigger syntax?

Currently, we have:

the lua expression is anything with a valid LUA syntax, where x is the placeholder for the watched variable value. so for instance: true, or x==2 , or x>=30 or even (x>10)and(x<20) are valid expressions. Be careful with lua operators : ==, <, >, <=, >=, ~=

…could you provide another placeholder, say ‘y’ (or maybe ‘old’) which contains the old value of the variable? Then you could have expressions like

[ul][li]x > y, the value has increased[/li]
[li]x < y, the value has decreased[/li]
[li](x > 42) and (y < 42), the value has passed the threshold value of 42 going in a positive direction[/li][/ul]

…and so on.

It seems, on the face of it, straight-forward, since the Luup callback provides both old and new values.

[quote=“akbooer, post:51, topic:188330”]Would you be interested in a slight extension of the new variable watch trigger syntax?

Currently, we have:

the lua expression is anything with a valid LUA syntax, where x is the placeholder for the watched variable value. so for instance: true, or x==2 , or x>=30 or even (x>10)and(x<20) are valid expressions. Be careful with lua operators : ==, <, >, <=, >=, ~=

…could you provide another placeholder, say ‘y’ (or maybe ‘old’) which contains the old value of the variable? Then you could have expressions like

[ul][li]x > y, the value has increased[/li]
[li]x < y, the value has decreased[/li]
[li](x > 42) and (y < 42), the value has passed the threshold value of 42 going in a positive direction[/li][/ul]

…and so on.

It seems, on the face of it, straight-forward, since the Luup callback provides both old and new values.[/quote]
great point, added in next release

EDIT: I suspect something around the Control Command definition in JSON, would like to see how this device defines it and whether or not it has a parameter clause for instance

The command has no parameters - as per this example in the json file:

"Command": { "Service": "urn:test-org:serviceId:Test1", "Action": "Testing" }

using AltUI ver v0.64.602 - yes; this is an older version but this gets back to the problems I’m having with my internet connection only being connected occasionally.

[quote=“a-lurker”]

EDIT: I suspect something around the Control Command definition in JSON, would like to see how this device defines it and whether or not it has a parameter clause for instance

The command has no parameters - as per this example in the json file:

"Command": { "Service": "urn:test-org:serviceId:Test1", "Action": "Testing" }

using AltUI ver v0.64.602 - yes; this is an older version but this gets back to the problems I’m having with my internet connection only being connected occasionally.[/quote]

Yes reading wiki I thought parameters was mandatory at least to be []
Latest version of altUI should fix that.

Envoy? de mon iPad en utilisant Tapatalk

Great - thanks to you for your efforts.

Hi amg0, for Network Quality, I guess I can infer from the color the quality of communication? Is there a simple color legend you could add that explains the color usage? I’d like to work on how to improve my network’s quality for maximum reliability.

with the new routing in UI7 10 & 11, I am not sure of the validity overall of the graph.
Basically I was taking AutoRoute or ManualRoute and getting the quality metrics put by the controller just after the “-” sign

Then I apply a D3 quantization this way, so basically the gradient of color is applied “red”,“orange”,“yellow”,“green” to the links quality; the highest number ( = poorest quality ) are red, the lowest are green and anything else in the middle falls into the orange or yellow bucket. the quantization is a split into the number of buckets but the values of the boundaries between color depends on your highest quality route number and your poorest quality route number

linkcolor = d3.scale.quantize() .domain( [d3.max(data.links, function(d) {return d.quality;} ),d3.min(data.links, function(d) {return d.quality;} )] ) .range(["red","orange","yellow","green"]);

with the new routing in UI7 10 & 11, I am not sure of the validity overall of the graph.
Basically I was taking AutoRoute or ManualRoute and getting the quality metrics put by the controller just after the “-” sign

Then I apply a D3 quantization this way, so basically the gradient of color is applied “red”,“orange”,“yellow”,“green” to the links quality; the highest number ( = poorest quality ) are red, the lowest are green and anything else in the middle falls into the orange or yellow bucket. the quantization is a split into the number of buckets but the values of the boundaries between color depends on your highest quality route number and your poorest quality route number

linkcolor = d3.scale.quantize() .domain( [d3.max(data.links, function(d) {return d.quality;} ),d3.min(data.links, function(d) {return d.quality;} )] ) .range(["red","orange","yellow","green"]);[/quote]

Ok, I understand, thanks for the explanation.

Hi amg0

A couple of queries: using AltUI v0.77.708: on some of my scenes the last run date is not shown - not sure why? Here is the raw json - the first displays the time; the second doesn’t.

[code][{“name”:“Sunset trigger”,“enabled”:1,“template”:“1”,“device”:140,“arguments”:[{“id”:“1”,“value”:“0”}],“lua”:“”,“last_run”:1443168690}]

[{“device”:148,“template”:1,“name”:“AUTO_GENERATED”,“arguments”:[{“id”:1,“value”:2}],“autogen”:1,“enabled”:“1”,“last_run”:1443188349}]

[/code]

Same code made pretty and reordered:

[
    {
        "device": 140,
        "name": "Sunset trigger",
        "template": "1",
        "enabled": 1,
        "arguments": [
            {
                "id": "1",
                "value": "0"
            }
        ],
        "lua": "",
        "last_run": 1443168690
    }
]
[
    {
        "device": 148,
        "name": "AUTO_GENERATED",
        "template": 1,
        "enabled": "1",
        "arguments": [
            {
                "id": 1,
                "value": 2
            }
        ],
        "autogen": 1,
        "last_run": 1443188349
    }
]

Only differences appear to be the types in “arguments”, the variable “autogen” and the variable “Lua”

I also have a Aeon minimote scene controller and all of the setup tabs in the control tab are missing in AltUI except the “Control” tab. What do you need to figure that one out? All the missing tabs use this style of json:

{ "Label": { "lang_tag": "ui7_settings", "text": "Settings" }, "Position": "1", "TabType": "javascript", "ScriptName": "shared.js", "Function": "simple_device" },

[quote=“a-lurker, post:59, topic:188330”]Hi amg0

A couple of queries: using AltUI v0.77.708: on some of my scenes the last run date is not shown - not sure why? Here is the raw json - the first displays the time; the second doesn’t.

[code][{“name”:“Sunset trigger”,“enabled”:1,“template”:“1”,“device”:140,“arguments”:[{“id”:“1”,“value”:“0”}],“lua”:“”,“last_run”:1443168690}]

[{“device”:148,“template”:1,“name”:“AUTO_GENERATED”,“arguments”:[{“id”:1,“value”:2}],“autogen”:1,“enabled”:“1”,“last_run”:1443188349}]

[/code]

Same code made pretty and reordered:

[
    {
        "device": 140,
        "name": "Sunset trigger",
        "template": "1",
        "enabled": 1,
        "arguments": [
            {
                "id": "1",
                "value": "0"
            }
        ],
        "lua": "",
        "last_run": 1443168690
    }
]
[
    {
        "device": 148,
        "name": "AUTO_GENERATED",
        "template": 1,
        "enabled": "1",
        "arguments": [
            {
                "id": 1,
                "value": 2
            }
        ],
        "autogen": 1,
        "last_run": 1443188349
    }
]

Only differences appear to be the types in “arguments”, the variable “autogen” and the variable “Lua”

I also have a Aeon minimote scene controller and all of the setup tabs in the control tab are missing in AltUI except the “Control” tab. What do you need to figure that one out? All the missing tabs use this style of json:

{ "Label": { "lang_tag": "ui7_settings", "text": "Settings" }, "Position": "1", "TabType": "javascript", "ScriptName": "shared.js", "Function": "simple_device" }, [/quote]

regarding the scene, these json are not the scene json, they are the device event trigger json, so it is not related , we need to look at the scene json. you can get it this way
do to Misc / debug and choose javascript command and type

MultiBox.getScenesSync()

we should see lastrun attribute but at the scene object level.
also check if this lastrun is also displayed in UI5 or UI7

regarding the minimote, can you give me the json file that it uses ? ALTUI does not display javascript tabs which are with “ScriptName”: “shared.js”
these are UI5/7 and it is impossible to display them unless I reemplement the complete api of UI5 UI7 which is not really possible nore desirable
there could be other way, lets first see the json and tell me the kind of UI you are missing, maybe we can implement some custom panels