Alternate UI to UI7

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]

[quote=“dmckenna, post:41, topic:185570”]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][/quote]

great.
FF seems to have more info… good,

[ul][li]the getUserData() seems independant of me (cf this #14735 (getUserData() or setUserData() deprecation warning in Firefox) – jQuery - Bug Tracker )[/li]
[li]I will try the //#[/li]
[li]Synchronous XMLHttpRequest : aware, I need to chagne this, it is harmless though, just the home page when getting the HouseMode from UI7[/li]
[li]“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 [/li][/ul]

@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

[quote=“mrv777, post:43, topic:185570”]@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[/quote]

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… :slight_smile:

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.

I could need some more of your help a bit later if you do not mind

You bet - anytime, just shout

[quote=“dmckenna, post:46, topic:185570”]

I could need some more of your help a bit later if you do not mind

You bet - anytime, just shout[/quote]

ok so if you could please run this version and give me the console.log. it should display some extra information about that particular device with the unknown icon issue.
note that they are more files than before, the reason is I have re-architected a bit the application to start modularize it and eventually enable more developpers to contribute. you just need to upload all files as usual.
there is a change to the .lua file so after the upload , a reload of LUA is needed

thx a lot

Just thought I’d drop in an throw some words of encouragment your way. :slight_smile: I just don’t have the time at the moment to contribute, but keep up the fine work!

+1. following with great interest.

Also Following

Thank you for the interest !

One area where developper community will be key is to add better device drawing. the architecture enables 2 ways to customize/extend the drawings of device.
a) the small device box on the Device page
b) a control panel, dedicated for one device, having almost the full page to play with and display specific device status , controls, drawings etc…
I added this “control panel” feature just in the drop down menu under Variable & Actions items.

For now, all devices uses a default stupid control panel ( that says “no control panel”: ) and 2 devices uses a custom control panel function. the Binary Light and the IPhone Locator- just as uggly and useless.

But the point for me was to explain / demonstrate the extensibility of the architecture and how it would work. if JS developpers or plugin authors have interest to create a control panel for their device ( or some other device ), we can integrate their work easily in independant modules

Now a bit on the “how”:

  • each device type can have a custom javascript file. this is declared in the .LUA file L_ALTUI.lua. Check the tbl in the myALTUI_Handler() function. I plan to make this tbl be dynamically read from a device variable later to make things really dynamic but for now it is hard coded

  • in this table, for a given device type you can specify a script file ([“ScriptFile”]=“J_ALTUI_plugins.js”,) , a small device box drawing function ([“DeviceDrawFunc”]=“ALTUI_PluginDisplays.drawBinaryLight”,) , a full blown control panel drawing function ([“ControlPanelFunc”]=“ALTUI_PluginDisplays.drawBinLightControlPanel”,) and a style function for your own CSS ([“StyleFunc”]=“ALTUI_PluginDisplays.getStyle”,). All these are optional, default implementation is provided in any case. All these scripts & functions are dynamically loaded and executed when needed by the main page.

  • see this in action in J_ALTUI_plugins.js or J_ALTUI_iphone.js

  • subtelty: the [“DeviceDrawFunc”] takes input parameters like (devid, device) and must return a string which the HTML going into the small device box on the main page. the [“ControlPanelFunc”] takes input parameters like (devid, device, domparent) and must write directly its HTML code into the domparent object ( using $.(domparent).append(…) ). it felt more comfortable for the contralPanel function to really write in the DOM as they almost own the full page this time.

nothing secret, all code available on http://code.mios.com/trac/mios_ipx800/browser/trunk/AltUI so feel free to try if you are interested.

a few rule for developpers though:

  • I am trying to use bootstrap, jquery, jqueryUI and that’s all. probably would liek a try to add a lib for graphic widgets ( gauges etc ) also in the near future, suggestion welcome. must be easy and working with jquery as I am far from a JS guru

  • all CSS class: try to allways use the prefix : altui-xxx-xxx etc

  • use bootstrap grid model ( row / cols ) for full responsive design, I d like to keep it running from desktop to ipad to iPhone 4S screen !

  • use JS module pattern ( same as UI7 ) see example in the various modules. prefix private function with a ‘_’ and public function with a naming convention doSomethingToSomethingElse()

I hope this is not too much rules and happy to welcome inputs & contributions.
I ll be out a week so may not be able to do anything during that time but interested people have the code to look at and play with…

happy coding !

Yes! This looks REALLY good. I have just switched to a Vera Edge and been forced to start using UI7. Really frustrating coming from UI5.

However, I can’t acsess the shell. I have uploaded all files from the trunk\AltUI-folder under Apps->Develop apps->Luup files. When I type in http://VERAIP:3480/data_request?id=lr_ALTUI_Handler&command=home# I also get the “No handler” message.

If I read between the lines it seems there should be an app installed after uploading the files and restarting luup? I haven’t got anything of the sort. Should I manually create something?

[quote=“n0ir, post:52, topic:185570”]Yes! This looks REALLY good. I have just switched to a Vera Edge and been forced to start using UI7. Really frustrating coming from UI5.

However, I can’t acsess the shell. I have uploaded all files from the trunk\AltUI-folder under Apps->Develop apps->Luup files. When I type in http://VERAIP:3480/data_request?id=lr_ALTUI_Handler&command=home# I also get the “No handler” message.

If I read between the lines it seems there should be an app installed after uploading the files and restarting luup? I haven’t got anything of the sort. Should I manually create something?[/quote]

Yes, you will need to manually install the app which is required.

Now it work!

Maybe add this step in the installation instructions for UI7 as well, amg0?

[quote=“n0ir, post:54, topic:185570”]Now it work!

Maybe add this step in the installation instructions for UI7 as well, amg0?[/quote]

by ‘App’ I suppose you mean the LUA file and the manual create device step ? in fact , I intend to publish in the store as a plugin so that step will become transparent as it will be installed automatically when users install the plugin from the store.

but I ll add to instructions.
EDIT: after check, is not it the step 3) in the step by step instructions of the .DOC / .PDF file in http://code.mios.com/trac/mios_ipx800/browser/trunk/AltUI ? let me know if you talk of something else. thank you

Yes, step 3 was the way to go, but because those steps was for specified under “UI5 Installation Instructions” I didn’t read it properly, just the

“How to see/use
 Code is available on: http://code.mios.com/svn_public/mios_ipx800/trunk/AltUI/
 Install : install all the files available there (take care to download the real file, not the web page)”

in the beginning of the .pdf (I’m running UI7).

It really is my fault and I would have probably figured it out sooner or later, but maybe you could add this third step to the instructions in the beginning as well? It might help some other noobs… :wink:

[quote=“n0ir, post:56, topic:185570”]Yes, step 3 was the way to go, but because those steps was for specified under “UI5 Installation Instructions” I didn’t read it properly, just the

“How to see/use
 Code is available on: http://code.mios.com/svn_public/mios_ipx800/trunk/AltUI/
 Install : install all the files available there (take care to download the real file, not the web page)”

in the beginning of the .pdf (I’m running UI7).

It really is my fault and I would have probably figured it out sooner or later, but maybe you could add this third step to the instructions in the beginning as well? It might help some other noobs… ;)[/quote]
thx, will adjust

I am now closing laptop and stopping dev for a week, will resume later.
I have not updated to UI7.0.4 ( my unit does not propose it yet ) so when I come back I ll try and eventually adjust. apparently they restored the Scene Per Room feature.

I leave revision 211 in the code.mios.com , you will find a better scene editor which supports editing the scene lua and enable/disable the scene timers & triggers. thats all for now.

please be careful, I tested and it works on UI5 and UI7 for me, but please be careful, do your backups and eventually be ready to restore your /etc/cmh/user_data.json.lzo file. it is recommended to get a copy of it once in a while and keep it safe. I use poorly documented and powerful api like ModifyUserData and we never know…

have fun

I got also the “No handler” error.
I created the device, however is stayed empty.

after deleting the device recreated it, now respecting capitals in the D_ and I_ xml’s
Now it is working.

I get the same issue loading the first x devices.[url=http://forum.micasaverde.com/index.php/topic,30310.msg218325.html#msg218325]http://forum.micasaverde.com/index.php/topic,30310.msg218325.html#msg218325[/url]
Will check if any of the later updates solves the Issue

This looks very promising!

I am on UI5.

[quote=“amg0, post:20, topic:185570”]For the files, you can use this “link” : [url=http://code.mios.com/trac/mios_ipx800/changeset/176/trunk?old_path=%2F&format=zip]Diff from /@182 to trunk@182 – IPX800
but then please only install the files in the AltUI folder of the archive.[/quote]

Is it useful to add this link in the opening message? (if it is updated with the last version)

It would also be nice to keep a version history there.
It save a search trough all the replies to find if there is a new version.
Already 4 pages which proves the popularity of this development!