ALTUI on openLuup not opening on Android phone

Hi amg0,

I am trying to access the ALTUI pages that is on a Pi with the latest openLuup and everything using my Andoid 5.x or 6.x phones. However, it never gets passed the Waiting initial data message. I have tried with Chrome, Firefox and Opera, but all produce the exact same result. As it is on a phone I have no idea on how to possibly debug.

Bit annoing I have to start my PC to look at the openLuup installation. Any suggestions?

Cheers Rene

reneboer,

working fine on mine but you need to have a recent Android version. I try it on an old phone and having the same issue as you!

Which Android version are you using ?

I can confirm AltUI works well on my G920A (S6) running 6.01.

[quote=“reneboer, post:1, topic:194930”]Hi amg0,

I am trying to access the ALTUI pages that is on a Pi with the latest openLuup and everything using my Andoid 5.x or 6.x phones. However, it never gets passed the Waiting initial data message. I have tried with Chrome, Firefox and Opera, but all produce the exact same result. As it is on a phone I have no idea on how to possibly debug.

Bit annoing I have to start my PC to look at the openLuup installation. Any suggestions?

Cheers Rene[/quote]

Does it work on vera UI?
Which version?
Check where it hangs using browser network tab for uncomplete downloads and js console for script errors
WE had issues in the past with large downloads

Hi amg0,

Works fine with ALTUI running on a Vera, just not for the instance on my Pi.

I tried two phones. One is a Nexus 5 with Android 6.0.1 the other a Sony with 5.x both up to date.

I am not seeing a network tab in any of the android browsers nor an option for a js console. The only thing I can find is remote debugging via USB. I’ll see if I can give that a try.

Cheers Rene

[quote=“reneboer, post:5, topic:194930”]Hi amg0,

Works fine with ALTUI running on a Vera, just not for the instance on my Pi.

I tried two phones. One is a Nexus 5 with Android 6.0.1 the other a Sony with 5.x both up to date.

I am not seeing a network tab in any of the android browsers nor an option for a js console. The only thing I can find is remote debugging via USB. I’ll see if I can give that a try.

Cheers Rene[/quote]

hum… typical painful to debug. are you sure your openluup setup is full up to date, with web server support http 1.1 and chunked transfer ? also socket size and timer may need some tweaks, some files are big to download…

Hi,

Indeed a pain to get the remote debugging to work. But in the end I managed. Is also found the issue. It the language. My Phone is set for Dutch (NL), so that is the locale ALTUI tries to open and it fails to. Adding the lang=en option has solved this now. Lots of trouble for finding an option ::).

Anyhow, it now works. And if you get more issues like this, it is one to watch out for.

Cheers Rene

[quote=“reneboer, post:7, topic:194930”]Hi,

Indeed a pain to get the remote debugging to work. But in the end I managed. Is also found the issue. It the language. My Phone is set for Dutch (NL), so that is the locale ALTUI tries to open and it fails to. Adding the lang=en option has solved this now. Lots of trouble for finding an option ::).

Anyhow, it now works. And if you get more issues like this, it is one to watch out for.

Cheers Rene[/quote]

Thanks a lot for this effort. I normally defaults to en but I need to check what happens here.
have a nice new year’s eve

[quote=“reneboer, post:7, topic:194930”]Hi,

Indeed a pain to get the remote debugging to work. But in the end I managed. Is also found the issue. It the language. My Phone is set for Dutch (NL), so that is the locale ALTUI tries to open and it fails to. Adding the lang=en option has solved this now. Lots of trouble for finding an option ::).

Anyhow, it now works. And if you get more issues like this, it is one to watch out for.

Cheers Rene[/quote]

one way is to create another file called J_ALTUI_loc_nl.js as a copy of J_ALTUI_loc_fr.js for instance and translate the strings in it into Dutch language. then deploy that file at the same place as other ALTUI file. you can give back that file to me and I ll include it in the distribution , that will make ALTUI support another language…

[quote=“amg0, post:9, topic:194930”][quote=“reneboer, post:7, topic:194930”]Hi,

Indeed a pain to get the remote debugging to work. But in the end I managed. Is also found the issue. It the language. My Phone is set for Dutch (NL), so that is the locale ALTUI tries to open and it fails to. Adding the lang=en option has solved this now. Lots of trouble for finding an option ::).

Anyhow, it now works. And if you get more issues like this, it is one to watch out for.

Cheers Rene[/quote]

one way is to create another file called J_ALTUI_loc_nl.js as a copy of J_ALTUI_loc_fr.js for instance and translate the strings in it into Dutch language. then deploy that file at the same place as other ALTUI file. you can give back that file to me and I ll include it in the distribution , that will make ALTUI support another language…[/quote]
Hi, I can sure have a look at that. Howver, where can I find the Original English texts to start? I am clueless on French and Spanish :o

Cheers Rene

[quote=“reneboer, post:10, topic:194930”][quote=“amg0, post:9, topic:194930”][quote=“reneboer, post:7, topic:194930”]Hi,

Indeed a pain to get the remote debugging to work. But in the end I managed. Is also found the issue. It the language. My Phone is set for Dutch (NL), so that is the locale ALTUI tries to open and it fails to. Adding the lang=en option has solved this now. Lots of trouble for finding an option ::).

Anyhow, it now works. And if you get more issues like this, it is one to watch out for.

Cheers Rene[/quote]

one way is to create another file called J_ALTUI_loc_nl.js as a copy of J_ALTUI_loc_fr.js for instance and translate the strings in it into Dutch language. then deploy that file at the same place as other ALTUI file. you can give back that file to me and I ll include it in the distribution , that will make ALTUI support another language…[/quote]
Hi, I can sure have a look at that. Howver, where can I find the Original English texts to start? I am clueless on French and Spanish :o

Cheers Rene[/quote]

The file have a data structure key : value , and the key is always in English text, so you leave the key untouched and change only the second string (the localized. Value )

If you use text speech recognition, you can also localize this but in that case I will give you more assistance, information.

Hi amg0,

Attached is a Dutch locale. I doubt it is perfect as I am in no means a translator, and Dutch is a not a techology friendly language.

In the process I did notice that the Watch Display and Power chart are not working. The first on a Vera and openLuup. The latter only not on openLuup.

Also blocky starts to play up. I guess that wants a locale as well. If you tell me how to get that I can test it a bit more.

Cheers Rene

[quote=“reneboer, post:12, topic:194930”]Hi amg0,

Attached is a Dutch locale. I doubt it is perfect as I am in no means a translator, and Dutch is a not a techology friendly language.

In the process I did notice that the Watch Display and Power chart are not working. The first on a Vera and openLuup. The latter only not on openLuup.

Also blocky starts to play up. I guess that wants a locale as well. If you tell me how to get that I can test it a bit more.

Cheers Rene[/quote]

ok thx. I think powerchart depends on a legacy url that openLuup does not support maybe. check with akbooer
http:///port_3480/data_request?id=live_energy_usage

regarding Watch Display can you be more specific, maybe with a screen shot of what page is not working and maybe check out the chrome javascript console for any sign of error; could be a corruped watch desciption crashing the javascript

Under openLuup, live_energy_usage works absolutely fine…

30027	Bedside 2	MiOS-35104860	3	0
30051	Dining Table	MiOS-35104860	3	0
20373	Loft Humidity	MiOS-35104005	16	0
30131	Power Meter	MiOS-35104860	21	0
30048	Kitchen	MiOS-35104860	3	80
20353	Study Ceiling	MiOS-35104005	3	0
30094	Bedroom Ceiling	MiOS-35104860	3	0
30013	Near Beam	MiOS-35104860	3	0
30025	Reading Right	MiOS-35104860	3	0
30029	Bedroom Table Lamp	MiOS-35104860	3	0
30028	Reading Left	MiOS-35104860	3	0
30026	Bedside 1	MiOS-35104860	3	0
30008	Far Beam	MiOS-35104860	3	0
30095	Ceiling	MiOS-35104860	3	0
20366	Julia Ceiling	MiOS-35104005	2	0
20352	Study Module	MiOS-35104005	3	0
30045	Chandelier	MiOS-35104860	3	0

although, of course, you have to be using the actual port 3480 and not the /port_3480 redirect…

172.16.42.131:3480/data_request?id=live_energy_usage

[quote=“akbooer, post:14, topic:194930”]Under openLuup, live_energy_usage works absolutely fine…

30027	Bedside 2	MiOS-35104860	3	0
..
30045	Chandelier	MiOS-35104860	3	0

although, of course, you have to be using the actual port 3480 and not the /port_3480 redirect…

172.16.42.131:3480/data_request?id=live_energy_usage [/quote]
This is what I get

error in callback [live_energy_usage] : ./openLuup/requests.lua:618: bad argument #5 to 'format' (number expected, got string)

So I added a tonumber conversion with nil check for the Watts.value parameter and now it works again.

local wtts = tonumber(Watts.value) or 0 local line = fmt: format (devNo, dev.description, room, dev.category_num, wtts)

I found that two EZMotion motion sensors are having a Watts variable for what ever reason but the value is empty.

Cheers Rene

Ooooh, must fix that!

Amg0,

On the WatchDisplay I get no error, nothing. looking at the Watch Tabel I do see an empty watch. It has only a number but none of the other parameters is populated. When I try to delete it is trows this error.

GET http://192.168.178.21:3480/data_request?id=lr_ALTUI_Handler&command=delWatc?e=&scene=&expression=&xml=&provider=&providerparams=%5B%5D&_=1484078850035 500 (Internal Server Error)

Editing is not an possibility either. That gives this error.

Uncaught TypeError: Cannot read property 'altuiid' of null J_ALTUI_uimgr.js:12601

When editing one of the scenes I now get this

error happened during decoding triggers, probable duplicate ID or invalid format

Any suggestions on how I can get rid of it?

i am seeing this in the states portion of the the user_data.json that looks suspicious if you ask me

     "id":19,
      "service":"urn:upnp-org:serviceId:altui1",
      "value":"urn:micasaverde-com:serviceId:EnergyMetering1#Watts#0-20175#1#trueSince((tonumber(new) > 1000), 200)#;urn:rboer-com:serviceId:Harmony1#CurrentActivityID#0-9#7#(new ~= '-1')#;urn:rboer-com:serviceId:Harmony1#CurrentActivityID#0-9#6#(new=='-1')#;urn:micasaverde-com:serviceId:SecuritySensor1#Tripped#0-36#2#(new == '1')#<xml xmlns=\"http://www.w3.org/1999/xhtml\"><block type=\"when\" x=\"2\" y=\"68\"><value name=\"Condition\"><block type=\"logic_compare\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"new_value\"></block></value><value name=\"B\"><block type=\"text\"><field name=\"TEXT\">1</field></block></value></block></value></block></xml>;",
      "variable":"VariablesToWatch"

Cheers Rene

[quote=“reneboer, post:17, topic:194930”]Amg0,

On the WatchDisplay I get no error, nothing. looking at the Watch Tabel I do see an empty watch. It has only a number but none of the other parameters is populated. When I try to delete it is trows this error.

GET http://192.168.178.21:3480/data_request?id=lr_ALTUI_Handler&command=delWatc?e=&scene=&expression=&xml=&provider=&providerparams=%5B%5D&_=1484078850035 500 (Internal Server Error)

Editing is not an possibility either. That gives this error.

Uncaught TypeError: Cannot read property 'altuiid' of null J_ALTUI_uimgr.js:12601

When editing one of the scenes I now get this

error happened during decoding triggers, probable duplicate ID or invalid format

Anny suggestions on how I can get rid of it?

Cheers Rene[/quote]
give me your variable values : VariablesToSend and VariableToWatch.
you can also check lua logs when running in debug mode

@reneboer

…latest development branch has a fix. Would be grateful if you could test it. Thanks!

Hi amg0,

VariablesToSend is empty.

I changed VariablesToWatch to this and that makes the Watch table show as expected again, that empty entry is gone. Looking in the log file the actual watches setup at s LUUP start was going correctly. It ignored that empty/corrupt entry.

urn:micasaverde-com:serviceId:EnergyMetering1#Watts#0-20175#1#trueSince((tonumber(new) > 1000), 200)#;urn:rboer-com:serviceId:Harmony1#CurrentActivityID#0-9#7#(new ~= '-1')#;urn:rboer-com:serviceId:Harmony1#CurrentActivityID#0-9#6#(new=='-1')#;urn:micasaverde-com:serviceId:SecuritySensor1#Tripped#0-36#2#(new == '1')#

The second list on the TblWatches page still has one empty entry.

The graphic Watch Display page remains blank with no error messages shown what so ever.

I did manage to isolate the issue with the error message on editing the one scene. I tried to set notification triggers on openLuup and I pointed that to a device on an other Vera. Then I removed that device from the Vera before removing the trigger, hence the device ID in the trigger became invalid. So changed the device number in the user_data.json and that bit is now fixed. Maybe the code should be changed so that triggers on removed devices, even the ones created via VeraBridge get dumped from the configuration automatically.

Cheers Rene