We have moved at community.getvera.com

Author Topic: Alternate UI to UI7  (Read 213112 times)

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #30 on: February 05, 2015, 09:09:27 am »
Hi,

Just stumbling across what may be a memory issue (I have reloaded, and cleared cache too). This may be related to the pull down menus not appearing at all.

Selecting ALL under Devices only displays first 27 devices, then blanks for the remainder. Furthermore when I select some rooms, these are also blank. BUT after a restart, these then show devices and other rooms then become blank. The pull down menus do not work.

Here's a screenshot of the final few of the 27 (I've got over 100 devices expected).

no I think it is something else. must be a javascript crash. are you in chrome ? There are 2 things that could help me debug here:

a) can you open the javascript console and share the error shown here ? 
b) can you open this url in your browser, capture the result and send it to me ?
http://<vera_ip>/port_3480/data_request?id=user_data2&output_format=json

Thank you



Offline dmckenna

  • Full Member
  • ***
  • Posts: 196
  • Karma: +8/-2
Re: Alternate UI to UI7
« Reply #31 on: February 05, 2015, 09:22:37 am »
Hi, here's the JSON, running Firefox 31.4

Jscript errors:
https://dmckenna.myknowhowcloud.com/Item/5f29ceaa268c486a991fc5fa0a16fae9

ReferenceError: Off is not defined J_ALTUI_utils.js line 544 > eval:1
GET http://192.168.0.24/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 6ms]
ReferenceError: Off is not defined J_ALTUI_utils.js line 544 > eval:1
GET http://192.168.0.24/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 12ms]
GET http://192.168.0.24/cmh/skins/default/img/devices/device_states/vcontainericon.png [HTTP/1.1 404 Not Found 11ms]
GET http://192.168.0.24/cmh/skins/default/icons/SceneController_0.png [HTTP/1.1 404 Not Found 11ms]

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #32 on: February 05, 2015, 09:35:32 am »
Hi, here's the JSON, running Firefox 31.4

Jscript errors:
https://dmckenna.myknowhowcloud.com/Item/5f29ceaa268c486a991fc5fa0a16fae9

ReferenceError: Off is not defined J_ALTUI_utils.js line 544 > eval:1
GET http://192.168.0.24/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 6ms]
ReferenceError: Off is not defined J_ALTUI_utils.js line 544 > eval:1
GET http://192.168.0.24/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 12ms]
GET http://192.168.0.24/cmh/skins/default/img/devices/device_states/vcontainericon.png [HTTP/1.1 404 Not Found 11ms]
GET http://192.168.0.24/cmh/skins/default/icons/SceneController_0.png [HTTP/1.1 404 Not Found 11ms]

ok so it sounds we have an issue in the evaluation of condition for dynamic icons. it is a device type that I do not have. could you edit J_ALTUI_utils on line 544 and add these lines

Code: [Select]
function _evaluateConditions(deviceid,conditions) {
var bResult = false;
var expressions=[];
$.each(conditions, function(i,condition){
var str = "({0}{1}{2})".format(
condition.value,
condition.operator,
VeraBox.getStatus( deviceid, condition.service, condition.variable )
);
expressions.push(str);
});
var str = expressions.join(" && ");

//---------------
console.log("deviceid="+deviceid);
console.log(str);
//---------------

var bResult = eval(str);
return bResult;
};

also try to find the deviceid and tell me which device type it is so I can check the device .JSON file
thx !

Offline dmckenna

  • Full Member
  • ***
  • Posts: 196
  • Karma: +8/-2
Re: Alternate UI to UI7
« Reply #33 on: February 05, 2015, 09:45:57 am »
Will do - need to pop out first..........stand by.

On example Device ID is 324 which is a StellaZ thermostat but I've now noticed that none of these StellaZ device types are appearing on any screen on ALTUI

D

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #34 on: February 05, 2015, 09:49:10 am »
also try to find the deviceid and tell me which device type it is so I can check the device .JSON file
thx !

I think I have a fix. I have attached the fixed files here
« Last Edit: February 05, 2015, 09:55:36 am by amg0 »

Offline dmckenna

  • Full Member
  • ***
  • Posts: 196
  • Karma: +8/-2
Re: Alternate UI to UI7
« Reply #35 on: February 05, 2015, 05:23:20 pm »
Bingo - yes that's fixed it - all devices appear now.

I'm still not getting the pull downs for Variables and Actions though - nothing coming up in the Javascript window. I've also tried Chrome instead of FF and the same result.

Let me know if you require anything else/debug etc.

Cheers

David

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #36 on: February 06, 2015, 01:07:54 am »
Bingo - yes that's fixed it - all devices appear now.

I'm still not getting the pull downs for Variables and Actions though - nothing coming up in the Javascript window. I've also tried Chrome instead of FF and the same result.

Let me know if you require anything else/debug etc.

Cheers

David

Thx same story , let s try the js console captured while you try to open variables / actions for a start.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #37 on: February 06, 2015, 07:15:23 am »
Bingo - yes that's fixed it - all devices appear now.

I'm still not getting the pull downs for Variables and Actions though - nothing coming up in the Javascript window. I've also tried Chrome instead of FF and the same result.

Let me know if you require anything else/debug etc.

Cheers

David

Thx same story , let s try the js console captured while you try to open variables / actions for a start.

I found one potential caveat, here is a version to try and let me know. thx !
http://code.mios.com/svn_public/mios_ipx800/trunk/AltUI/J_ALTUI_utils.js
.

it is part of latest built. I could reproduce the issue for actions  ( it was working for variables) on a test UI5 box with a dummy thermostat device ( I do not have one on my real UI7 box ) , then with this fix, it worked. it has to do with me using a file not yet received... the fun of async programming :-)

let me know if it fixes your issue


Offline dmckenna

  • Full Member
  • ***
  • Posts: 196
  • Karma: +8/-2
Re: Alternate UI to UI7
« Reply #38 on: February 06, 2015, 10:22:13 am »
Hi,

I've uploaded that last .js file and unfortunately it's not changed anything, the pull downs are still not functioning in either FF or Chrome. No errors either on the jscript console when selecting the pulldowns, however, the following are jscript errors when 'ALL' is selected:

TypeError: str is undefined J_ALTUI_utils.js:1219
GET http://192.168.0.20/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 11ms]
GET http://192.168.0.20/cmh/skins/default/img/devices/device_states/vcontainericon.png [HTTP/1.1 404 Not Found 12ms]
GET http://192.168.0.20/cmh/skins/default/icons/SceneController_0.png [HTTP/1.1 404 Not Found 7ms]
GET http://192.168.0.20/cmh/skins/default/icons/intro.png [HTTP/1.1 404 Not Found 6ms

Need anything else ?

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #39 on: February 06, 2015, 11:56:13 am »
good.
it seems one of the device type is lacking a icon definition in the .JSON file. could be one of the built in VERA devices. let's try this .JS file and look at the console for a message. I have put a default value for the icon and a console message to track this.
could you please try with this file ?

Offline dmckenna

  • Full Member
  • ***
  • Posts: 196
  • Karma: +8/-2
Re: Alternate UI to UI7
« Reply #40 on: February 06, 2015, 12:28:42 pm »
Yeah !! - something's dropped in and fixed this. Love the variable screen, especially seeing the wakeup times in non Unix format, what a simple but major step forward from the Vera way. Also makes perfect sense to have them in alphabetical order.

Here is the output from the jscript window regardless:

Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:64
Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead J_ALTUI_utils.js:1
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ jquery-1.11.2.min.js:4
Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead J_ALTUI_iphone.js:1
not well-formed
Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead J_ALTUI_plugins.js:1
not well-formed
"undefined icon, device.type:undefined" J_ALTUI_utils.js:1223
GET http://192.168.0.20/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 11ms]
GET http://192.168.0.20/cmh/skins/default/img/devices/device_states/vcontainericon.png [HTTP/1.1 404 Not Found 16ms]
GET http://192.168.0.20/cmh/skins/default/icons/SceneController_0.png [HTTP/1.1 404 Not Found 18ms]
GET http://192.168.0.20/cmh/skins/default/icons/intro.png [HTTP/1.1 404 Not Found 17ms]
GET http://192.168.0.20/cmh/skins/default/icons/Light_Sensor.png [HTTP/1.1 404 Not Found 16ms]

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #41 on: February 06, 2015, 12:38:16 pm »
Yeah !! - something's dropped in and fixed this. Love the variable screen, especially seeing the wakeup times in non Unix format, what a simple but major step forward from the Vera way. Also makes perfect sense to have them in alphabetical order.

Here is the output from the jscript window regardless:

Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:64
Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead J_ALTUI_utils.js:1
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ jquery-1.11.2.min.js:4
Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead J_ALTUI_iphone.js:1
not well-formed
Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead J_ALTUI_plugins.js:1
not well-formed
"undefined icon, device.type:undefined" J_ALTUI_utils.js:1223
GET http://192.168.0.20/cmh/skins/default/icons/Power_Meter.png [HTTP/1.1 404 Not Found 11ms]
GET http://192.168.0.20/cmh/skins/default/img/devices/device_states/vcontainericon.png [HTTP/1.1 404 Not Found 16ms]
GET http://192.168.0.20/cmh/skins/default/icons/SceneController_0.png [HTTP/1.1 404 Not Found 18ms]
GET http://192.168.0.20/cmh/skins/default/icons/intro.png [HTTP/1.1 404 Not Found 17ms]
GET http://192.168.0.20/cmh/skins/default/icons/Light_Sensor.png [HTTP/1.1 404 Not Found 16ms]

great.
FF seems to have more info... good,
  • the getUserData() seems independant of me (cf this http://bugs.jquery.com/ticket/14735 )
  • I will try the //#
  • Synchronous XMLHttpRequest : aware, I need to chagne this, it is harmless though, just the home page when getting the HouseMode from UI7
  • "undefined icon, device.type:undefined" J_ALTUI_utils.js:1223 : this is more problematic I need some more research here. it works because I harded a icon name here but would like to understand the true root cause. I could need some more of your help a bit later if you do not mind

Offline mrv777

  • Full Member
  • ***
  • Posts: 158
  • Karma: +1/-4
Re: Alternate UI to UI7
« Reply #42 on: February 06, 2015, 12:55:13 pm »
@amg0

I'm not sure if I can help, but I am very familiar with HTML/CSS/JS and if someone with those skills could provide any help for you, I would like to volunteer.

Thanks for your work on this

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Alternate UI to UI7
« Reply #43 on: February 06, 2015, 01:17:32 pm »
@amg0

I'm not sure if I can help, but I am very familiar with HTML/CSS/JS and if someone with those skills could provide any help for you, I would like to volunteer.

Thanks for your work on this

Why not, but I need to clean up and modularize the code a bit better to be able to integrate other devs into the fiesta. I am out this week so give me some time... :-)

Offline mrv777

  • Full Member
  • ***
  • Posts: 158
  • Karma: +1/-4
Re: Alternate UI to UI7
« Reply #44 on: February 06, 2015, 01:24:05 pm »
Why not, but I need to clean up and modularize the code a bit better to be able to integrate other devs into the fiesta. I am out this week so give me some time... :-)

Sounds good!  Take your time, you're doing a great job.  When I can help, just message me and I'll do whatever I can.