We have moved at community.getvera.com

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

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #270 on: April 27, 2015, 04:51:18 pm »
V 0.46.122
  • Skinnable UI, you can apply a theme. All you need is specify a URL that points to a CSS file in the ALTUI plugin variable "ThemeCSS". Any bootstrap theme should be ok ( free ones here https://bootswatch.com/ ) and you can add your specific settings then. almost all ALTUI elements have a CSS altui-xxx class so you can tweak it to your needs. screen shot attached
  • Localization : work in progress but the browser language setting will trigger the load of a new file caleld J_ALTUI_loc_xx where xx is the language reported by the browser. no need to do anything for "en" english. but you can load the file J_ALTUI_loc_fr.js for french ( and any other languages).

example of the fr file
Code: [Select]
Localization.init( {
  "Home": "Maison",
  "Welcome to VERA Alternate UI": "Bienvenu dans AltUI pour VERA",
  "Rooms": "Pieces",
  "Devices": "P?riph?riques",
  "Control Panel": "Controle",
  "Scenes": "Sc?nes",
  "Scene Edit": "Edition de Scene",
  "Plugins": "Plugins",
  "Custom Pages": "Pages Utilisateur",
  "Edit Pages": "Pages Editeur",
  "Credits": "Cr?dits",
  "LuaTest": "LuaTest",
  "LuaStart": "LuaStart",
  "Optimize": "Optimise",
  "Editor": "Editor",
  "Custom Pages Editor": "Editeur de Pages",
  "LUA Startup": "LUA Startup",
  "LUA Code Test":"LUA Code Test",
  "Optimizations": "Optimisations",
  "Unmuted,Muted":"Normal,Mute",
  "Normal,Debug":"Normal,Debug",
  "Up":"Haut",
  "Stop":"Stop",
  "Down":"Bas",
  "Open":"Ouvre",
  "Unlock,Lock":"Unlock,Lock",
  "Bypass,Arm":"Libre,Arm?",
  "Use Custom Pages":"Utilise Pages",
  "Edit Custom Pages":"Edit Pages",
  "More":"Plus",
  "Remote Access Login":"Acc?s ? Distance",
  "Reload Luup Engine":"Redemarrer Luup",
  "Lua Startup Code":"Code D?marrage Lua",
  "Lua Test Code":"Code Test Lua",
  "Localization":"Localisation",
  "Misc":"Divers",
  "Create":"Cr?er",
  "Runs in mode": "Ex?cute seulement en mode",
  "Run" : "Ex?cute",
  "OFF,ON":"OFF,ON",
  "Working":"Travail",
  "Holiday":"Vacances",
  "Wind":"Vent"
});

result attached.

installable as a beta version directly from the magic url : http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=27224 ( as usual ignore errors )
« Last Edit: April 28, 2015, 01:15:47 am by amg0 »

Offline svaleb

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +11/-7
Re: Alternate UI to UI7
« Reply #271 on: April 27, 2015, 06:06:23 pm »
@amg0
Just for the record.
I get 46.122
Regards
            CE

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: Alternate UI to UI7
« Reply #272 on: April 27, 2015, 06:17:02 pm »
LOL, with the skinnable dark theme you really are making me hard to wait on installing this. :)

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #273 on: April 28, 2015, 07:18:08 pm »
V 0.46.125

Install with
<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=27271

Not necessarly useful for english speakers but for people who are interested in localization , you can be interested in building the file J_ALTUI_loc_nn.js where nn is the 2 letter for your language. Send it back to me please so I can add it to the distribution. in theory it should be UTF8 and support any intl character as long as it is not a right to left language !!!

You can use  J_ALTUI_loc_fr.js as an example and an interesting trick to know , in the menu More / Localization , ALTUI will tell you your browser language 2 letter code and the list of terms it was expecting in the localization file and could not find ( meaning you have to add them in ). the J_ALTUI_loc_fr.js file should be complete for instance.   Not all strings are localized in the app but close too and I increase the coverage as I go...




Offline a-lurker

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +66/-8
Re: Alternate UI to UI7
« Reply #274 on: April 28, 2015, 10:47:00 pm »
Here's one in Italian. It WILL definitely need correction! File also attached. Rename it with a ".js" extension, as javascript files can't be uploaded here. I changed the English labels from "LUATest" to "LuaTest" and "LUAStart" to "LuaStart". Although they should perhaps be "MoonTest" and "MoonStart". ;D

While looking at translations: In AltUI - startup page. This sentence: "This is a project under work, more to come." Should probably say "Plugin under construction; more to come."


Code: [Select]
//# sourceURL=J_ALTUI_loc_it.js
// http://192.168.1.16:3480/data_request?id=lr_ALTUI_Handler&command=home
// This program is free software: you can redistribute it and/or modify
// it under the condition that it is for private or home useage and
// this whole comment is reproduced in the source code file.
// Commercial utilisation is not authorized without the appropriate
// written agreement from amg0 / alexis . mermet @ gmail . com
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Localization.init( {
  "Home": "Casa",
  "Welcome to VERA Alternate UI": "Benvenuti a VERA UI Alternativo",
  "Rooms": "Stanze",
  "Devices": "Dispositivi",
  "Control Panel": "Pannello di Controllo",
  "Scenes": "Scena",
  "Scene Edit": "Scena Modificare",
  "Plugins": "Plugins",
  "Custom Pages": "Pagine Personalizzate",
  "Edit Pages": "Modifica Pagine",
  "Credits": "Crediti",
  "LuaTest": "LuaVerificare",
  "LuaStart": "LuaInizio",
  "Optimize": "Ottimizza",
  "Editor": "Editore",
  "Custom Pages Editor": "Pagine Personalizzate Editore",
  "Lua Startup": "Lua Avviare",
  "Lua Code Test":"Lua Codice Verificare",
  "Optimizations": "Ottimizzazioni",
  "Unmuted,Muted":"Normale,Muto",
  "Normal,Debug":"Normale,Debug",
  "Up":"Alza",
  "Stop":"Fermare",
  "Down":"Gi?",
  "Open":"Apri",
  "Unlock,Lock":"Sbloccare,Serratura",
  "Bypass,Arm":"Free,Armata",
  "Use Custom Pages":"Pagine Usare Personalizzate",
  "Edit Custom Pages":"Modifica di Pagine Personalizzate",
  "More":"Pi?",
  "Remote Access Login":"Accesso Remoto Log",
  "Reload Luup Engine":"Ricaricare Luup Motore",
  "Lua Startup Code":"Lua Codice Avviamento",
  "Lua Test Code":"Avvio Codice Lua",
  "Localization":"Localizzazione",
  "Misc":"Vario",
  "Create":"Crea",
  "Runs in mode": "Funziona in modalit?",
  "Run" : "Eseguire",
  "OFF,ON":"Spento,Acceso",
  "Working":"Lavorare",
  "Holiday":"Vacanze",
  "Wind":"Vento"
});

« Last Edit: April 29, 2015, 02:43:39 am by a-lurker »

Offline sjolshagen

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-0
Re: Alternate UI to UI7
« Reply #275 on: April 29, 2015, 12:00:12 pm »
Have started testing out AltUI on UI5 based Vera 3 and get the following error when attempting to open the control panel for the "Inputs" tab of PLEG:

Code: [Select]
stack:ReferenceError: get_device_obj is not defined
    at plc_Cleanup (J_ProgramLogicC.js:2412:22)
    at pleg_VersionCheck (J_ProgramLogicEG.js:15:5)
    at pleg_Inputs (J_ProgramLogicEG.js:61:5)
    at eval (eval at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:37), :1:1)
    at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:17)
    at _deviceDrawControlPanelOneTabContent (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2635:6)
    at _displayActiveDeviceTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2700:4)
    at HTMLAnchorElement. (http://192.168.1.180:3480/J_ALTUI_uimgr.js:3934:4)
    at HTMLDivElement.m.event.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:8549)
    at HTMLDivElement.r.handle (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:5259)

And getting the following error when attempting to open the "Condition" tab:
Code: [Select]
stack:ReferenceError: sortByName is not defined
    at plc_InitNames (J_ProgramLogicC.js:1120:26)
    at pleg_Conditions (J_ProgramLogicEG.js:77:5)
    at eval (eval at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:37), :1:1)
    at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:17)
    at _deviceDrawControlPanelOneTabContent (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2635:6)
    at _displayActiveDeviceTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2700:4)
    at HTMLAnchorElement. (http://192.168.1.180:3480/J_ALTUI_uimgr.js:3934:4)
    at HTMLDivElement.m.event.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:8549)
    at HTMLDivElement.r.handle (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:5259)
    at Object.m.event.trigger (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:7650)

Also, I'm not seeing any device for the Wake Up Light plug-in from Antor (Plug-in id: 2268)
Vera3/UI5 @ v1.5.622

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #276 on: April 30, 2015, 07:17:35 am »
Hello sjolshagen
known issue for pleg.  it makes uses of several javascript files ( not just the one declared in the device file ) and I cannot know which files to load in ALTUI.
I also tried to look at the official list of files in the pluging but here again the author is doing something a bit fancy as he installed several files for various UI version and has a shell script running on VERA which modifies the names of them based on the UI version.
so it is a bit of a pb which I need to find a different solution ( maybe hard code somethign specific for PLEG ) but for now finishing off the localization aspect, then will look at this



The other issue "I'm not seeing any device for the Wake Up Light plug-in from Antor (Plug-in id: 2268)" is a concern, we probably need to deep dive this.   are you saying you have a device showing up on VERA UI5 or UI7  but not in ALTUI ?   if so , what is the device id we talk about here and could you please send me the output of http://ip_address:3480/data_request?id=user_data&output_format=json
thx


Offline sjolshagen

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-0
Re: Alternate UI to UI7
« Reply #277 on: April 30, 2015, 02:25:31 pm »
Hi @amg0,

The other issue "I'm not seeing any device for the Wake Up Light plug-in from Antor (Plug-in id: 2268)" is a concern, we probably need to deep dive this.   are you saying you have a device showing up on VERA UI5 or UI7  but not in ALTUI ?   if so , what is the device id we talk about here and could you please send me the output of http://ip_address:3480/data_request?id=user_data&output_format=json

Is there somewhere I can email you the jSON file rather than post it on a public forum? Since it contains _all_ of the info from Vera, including passwords for my iCloud accounts I'd rather not post it here (even after I've redacted the file).

Ideally, I'd prefer just sending you the portions of the JSON (alternatively, the XML version of the file) that pertain to the device itself...?
Vera3/UI5 @ v1.5.622

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #278 on: May 01, 2015, 04:40:55 am »
I ll PM you

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #279 on: May 01, 2015, 01:11:35 pm »
V 0.46.130

  • better compat for Wakeup plugin
  • increased coverage for localization terms ( FR file provided, not other files yet )
  • better Message zone & button. Button changing color based on messages listed in the zone
  • better styling result with dark CSS
  • bug fixes

Install by the URL with the usual method : http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=27290

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #280 on: May 01, 2015, 01:13:23 pm »
Have started testing out AltUI on UI5 based Vera 3 and get the following error when attempting to open the control panel for the "Inputs" tab of PLEG:

Code: [Select]
stack:ReferenceError: get_device_obj is not defined
    at plc_Cleanup (J_ProgramLogicC.js:2412:22)
    at pleg_VersionCheck (J_ProgramLogicEG.js:15:5)
    at pleg_Inputs (J_ProgramLogicEG.js:61:5)
    at eval (eval at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:37), :1:1)
    at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:17)
    at _deviceDrawControlPanelOneTabContent (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2635:6)
    at _displayActiveDeviceTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2700:4)
    at HTMLAnchorElement. (http://192.168.1.180:3480/J_ALTUI_uimgr.js:3934:4)
    at HTMLDivElement.m.event.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:8549)
    at HTMLDivElement.r.handle (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:5259)

And getting the following error when attempting to open the "Condition" tab:
Code: [Select]
stack:ReferenceError: sortByName is not defined
    at plc_InitNames (J_ProgramLogicC.js:1120:26)
    at pleg_Conditions (J_ProgramLogicEG.js:77:5)
    at eval (eval at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:37), :1:1)
    at _deviceDrawControlPanelJSTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2327:17)
    at _deviceDrawControlPanelOneTabContent (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2635:6)
    at _displayActiveDeviceTab (http://192.168.1.180:3480/J_ALTUI_uimgr.js:2700:4)
    at HTMLAnchorElement. (http://192.168.1.180:3480/J_ALTUI_uimgr.js:3934:4)
    at HTMLDivElement.m.event.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:8549)
    at HTMLDivElement.r.handle (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:5259)
    at Object.m.event.trigger (https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js:3:7650)

Also, I'm not seeing any device for the Wake Up Light plug-in from Antor (Plug-in id: 2268)

V 0.46.130 gives kind of better result but not functional, it will be quite hard to ever get it functional.  Wakeup Plugin control Panel seems functional now ( at least on a UI5 vera , not tested on a UI7 vera )

Offline sjolshagen

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-0
Re: Alternate UI to UI7
« Reply #281 on: May 02, 2015, 07:28:13 am »
V 0.46.130 gives kind of better result but not functional, it will be quite hard to ever get it functional.  Wakeup Plugin control Panel seems functional now ( at least on a UI5 vera , not tested on a UI7 vera )

I've not been able to test this version on my Vera3/UI5 since the loc_en file isn't loading:

Code: [Select]
language:en-US
J_ALTUI_uimgr.js:5100 loading script :J_ALTUI_loc_en.js
http://192.168.1.180:3480/J_ALTUI_loc_en.js Failed to load resource: net::ERR_EMPTY_RESPONSE
http://192.168.1.180:3480/favicon.ico Failed to load resource: net::ERR_EMPTY_RESPONSE

I used the upgrade instructions:

Quote
Install by the URL with the usual method : http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=27290
Vera3/UI5 @ v1.5.622

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #282 on: May 02, 2015, 08:57:42 am »
V 0.46.130 gives kind of better result but not functional, it will be quite hard to ever get it functional.  Wakeup Plugin control Panel seems functional now ( at least on a UI5 vera , not tested on a UI7 vera )

I've not been able to test this version on my Vera3/UI5 since the loc_en file isn't loading:

Code: [Select]
language:en-US
J_ALTUI_uimgr.js:5100 loading script :J_ALTUI_loc_en.js
http://192.168.1.180:3480/J_ALTUI_loc_en.js Failed to load resource: net::ERR_EMPTY_RESPONSE
http://192.168.1.180:3480/favicon.ico Failed to load resource: net::ERR_EMPTY_RESPONSE

I used the upgrade instructions:

Quote
Install by the URL with the usual method : http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=27290
there is no en file. it is all in english by default, but indeed this version had a bug
here is a quick fix. file attached, you can rename it in .js and upload it
Code: [Select]
- if (language != 'en') {
+ if (language.substring(0, 2) != 'en') {

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #283 on: May 03, 2015, 09:52:45 am »
there is no en file. it is all in english by default, but indeed this version had a bug
here is a quick fix. file attached, you can rename it in .js and upload it
Code: [Select]
- if (language != 'en') {
+ if (language.substring(0, 2) != 'en') {

V 0.47.143

published privately on store: http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=27302

  • better device page toolbar
  • Better compat with PLEG & probably several other plugins
  • device filter string (in device string ) persistent
  • Vera Reboot feature
« Last Edit: May 03, 2015, 04:49:58 pm by amg0 »

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Alternate UI to UI7
« Reply #284 on: May 03, 2015, 11:24:44 am »
Here's one in Italian. It WILL definitely need correction! File also attached. Rename it with a ".js" extension, as javascript files can't be uploaded here. I changed the English labels from "LUATest" to "LuaTest" and "LUAStart" to "LuaStart". Although they should perhaps be "MoonTest" and "MoonStart". ;D

While looking at translations: In AltUI - startup page. This sentence: "This is a project under work, more to come." Should probably say "Plugin under construction; more to come."


Code: [Select]
//# sourceURL=J_ALTUI_loc_it.js
// http://192.168.1.16:3480/data_request?id=lr_ALTUI_Handler&command=home
// This program is free software: you can redistribute it and/or modify
// it under the condition that it is for private or home useage and
// this whole comment is reproduced in the source code file.
// Commercial utilisation is not authorized without the appropriate
// written agreement from amg0 / alexis . mermet @ gmail . com
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Localization.init( {
  "Home": "Casa",
  "Welcome to VERA Alternate UI": "Benvenuti a VERA UI Alternativo",
  "Rooms": "Stanze",
  "Devices": "Dispositivi",
  "Control Panel": "Pannello di Controllo",
  "Scenes": "Scena",
  "Scene Edit": "Scena Modificare",
  "Plugins": "Plugins",
  "Custom Pages": "Pagine Personalizzate",
  "Edit Pages": "Modifica Pagine",
  "Credits": "Crediti",
  "LuaTest": "LuaVerificare",
  "LuaStart": "LuaInizio",
  "Optimize": "Ottimizza",
  "Editor": "Editore",
  "Custom Pages Editor": "Pagine Personalizzate Editore",
  "Lua Startup": "Lua Avviare",
  "Lua Code Test":"Lua Codice Verificare",
  "Optimizations": "Ottimizzazioni",
  "Unmuted,Muted":"Normale,Muto",
  "Normal,Debug":"Normale,Debug",
  "Up":"Alza",
  "Stop":"Fermare",
  "Down":"Gi?",
  "Open":"Apri",
  "Unlock,Lock":"Sbloccare,Serratura",
  "Bypass,Arm":"Free,Armata",
  "Use Custom Pages":"Pagine Usare Personalizzate",
  "Edit Custom Pages":"Modifica di Pagine Personalizzate",
  "More":"Pi?",
  "Remote Access Login":"Accesso Remoto Log",
  "Reload Luup Engine":"Ricaricare Luup Motore",
  "Lua Startup Code":"Lua Codice Avviamento",
  "Lua Test Code":"Avvio Codice Lua",
  "Localization":"Localizzazione",
  "Misc":"Vario",
  "Create":"Crea",
  "Runs in mode": "Funziona in modalit?",
  "Run" : "Eseguire",
  "OFF,ON":"Spento,Acceso",
  "Working":"Lavorare",
  "Holiday":"Vacanze",
  "Wind":"Vento"
});

Thank you a-lurker, I have integrated it now and there are some more strings to localize, I have put xxx for the extra strings to localize in the IT file.  Also attached the FR file for reference.  English works without file.