The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Alternate UI to UI7 => Topic started by: amg0 on August 08, 2015, 05:43:00 am

Title: ALTUI : Tips & Tricks
Post by: amg0 on August 08, 2015, 05:43:00 am
Thread for reporting a tip, tricks, cool feature but not very well known, etc
Title: 1- How to rename a device
Post by: amg0 on August 08, 2015, 06:00:05 am
Click on the device name in the header bar, type the new name
Title: 2- uninstalling/reinstalling without loosing your custom pages
Post by: amg0 on August 09, 2015, 12:10:39 pm
if you have custom pages you can do the following to not loose them:
1- before update, goto Misc / Options
2- click Save User Pages
3- on Vera, uninstall the device, the plugin, delete the files if possible
4- install v0.40 from the store , let the VERA unit reboot/reload
5- refresh cache browser
6- open ALTUI
7- goto More/Optimizations and click on "Restore From User Pages Cache"
8- click Save Pages
Title: Re: ALTUI : Tips & Tricks
Post by: dklinkman on August 09, 2015, 05:40:27 pm
In my version, 596, the buttons for saving and restoring user pages is at Misc -> Options via the menus.  Had to hunt around for it a bit.

--David
Title: Re: ALTUI : Tips & Tricks
Post by: amg0 on August 09, 2015, 05:53:22 pm
In my version, 596, the buttons for saving and restoring user pages is at Misc -> Options via the menus.  Had to hunt around for it a bit.

--David
Thx ! Updated the post.
Title: 3- displaying ALTUI in another language
Post by: amg0 on August 10, 2015, 01:48:07 pm
By default ALTUI recognizes the language of your browser and displays itself in this language if the localization exists.  Today only English, French and very partially Italian exists

a) you can force a different language by passing lang=xx where xx = fr or en or it on the url. example
Code: [Select]
http://192.168.1.16/port_3480/data_request?id=lr_ALTUI_Handler&command=home&lang=fr
b) if people want to contribute to create the strings for another language, you can take J_ALTUI_loc_fr.js and rename it J_ALTUI_loc_xx.js where xx is the 2 letter code of the language following ISO code ( http://www.w3schools.com/tags/ref_language_codes.asp ) and upload the file along the ALTUI files.

c) I can add it into the distribution if you want

d) ALTUI application itself tells you if it find a terms which is supposed to be localized in your localization file and is it.  You can run ALTUI into as many screen/situation as you can, then go to MISC / OPTIONS / Localization and it will display the requested language on the url query,  the language detected in the brower, and the terms which were supposed to be localized but are not.

Code: [Select]
browser query:ko userlanguage: language:fr
 Unknown terms:{"Home":"Home","Away":"Away","Night":"Night","Vacation":"Vacation","Variable":"Variable","Value":"Value","Close":"Close","Action":"Action","Parameters":"Parameters","Favorite":"Favorite","Question":"Question","Search":"Search","Option":"Option","History":"History","Refresh":"Refresh","Remove":"Remove","Load":"Load","Info":"Info","Image":"Image","Run Scene":"Run Scene","Edit":"Edit","Camera":"Camera","On Off":"On Off","Gauge":"Gauge","Rooms":"Rooms","Category":"Category","Label":"Label","Device Icon":"Device Icon","Scene":"Scene","Multi State":"Multi State","Devices":"Devices","Scenes":"Scenes","More":"More","Plugins":"Plugins","Triggers":"Triggers","Power Chart":"Power Chart","Parent/Child Network":"Parent/Child Network","zWave Network":"zWave Network","zWave Routes":"zWave Routes","Network Quality":"Network Quality","Panels":"Panels","Use Custom Pages":"Use Custom Pages","Edit Custom Pages":"Edit Custom Pages","Misc":"Misc","Remote Access Login":"Remote Access Login","Reload Luup Engine":"Reload Luup Engine","Reboot Vera":"Reboot Vera","Lua Startup Code":"Lua Startup Code","Lua Test Code":"Lua Test Code","OS Command":"OS Command","Options":"Options","Localization":"Localization","Debug":"Debug","Credits":"Credits","Evolutions":"Evolutions","Welcome to VERA Alternate UI":"Welcome to VERA Alternate UI","Messages":"Messages","Control Panel":"Control Panel","Scene Edit":"Scene Edit","Custom Pages":"Custom Pages","Edit Pages":"Edit Pages","LuaTest":"LuaTest","LuaStart":"LuaStart","Editor":"Editor","ZWave":"ZWave","Localize":"Localize","Power":"Power","Parent/Child":"Parent/Child","zWaveRoutes":"zWaveRoutes","Quality":"Quality","TblDevices":"TblDevices","OsCommand":"OsCommand","This plugin is a work in progress, it will continuously evolve over time.":"This plugin is a work in progress, it will continuously evolve over time.","You may check out the evolutions on the Micasaverde <a href='http://forum.micasaverde.com/index.php/topic,30310.msg216129.html#msg216129'>Forum</a>":"You may check out the evolutions on the Micasaverde <a href='http://forum.micasaverde.com/index.php/topic,30310.msg216129.html#msg216129'>Forum</a>","Localizations":"Localizations","Localization information":"Localization information"}
Title: 4- OS Commands can be customized
Post by: amg0 on August 11, 2015, 05:00:30 am
By default ALTUI proposes a number of OS commands to be executed on the target controller of your choice.

These commands are unix commands executed remotely and the output is captured and displayed back into ALTUI without any need to use putty , SCP or things like that. there are of course a few limitation on the kind of commands you can run, you have to avoid commands which are not terminating / pipes or not sending things into the unix stdout.

The Tips & Trick is about the fact that users can add what ever command in ALTUI screens.  Just use the little wrench icon to open the command editing box where you can delete default commands, and /or add your own ones.

The little "yellow refresh" button will restore the defaults so use with care.

I attached screen shots
Title: Re: 4- OS Commands can be customized
Post by: dklinkman on August 11, 2015, 06:36:09 pm
By default ALTUI proposes a number of OS commands to be executed on the target controller of your choice.

These commands are unix commands executed remotely and the output is captured and displayed back into ALTUI without any need to use putty , SCP or things like that. there are of course a few limitation on the kind of commands you can run, you have to avoid commands which are not terminating / pipes or not sending things into the unix stdout.

The Tips & Trick is about the fact that users can add what ever command in ALTUI screens.  Just use the little wrench icon to open the command editing box where you can delete default commands, and /or add your own ones.

The little "yellow refresh" button will restore the defaults so use with care.

I attached screen shots
That's pretty neat. I like that.  Suggestion: For the default du maybe change the command to du -h (for obvious reasons :))
Title: 5- openning ALTUI on a specific page
Post by: amg0 on August 13, 2015, 04:29:07 am
You can force ALTUI to open directly on a specific page by adding "&home=xxxx" on the url where xx is one of these keywords:
pageHome , pageRooms , pageDevices , pageScenes , pageSceneEdit , pagePlugins , pageUsePages , pageEditPages , pageCredits , pageLuaTest , pageLuaStart , pageOptions , pageEditor , pageZwave , pageLocalization , pagePower , pageChildren , pageRoutes , pageQuality , pageTblDevices , pageOsCommand

example
Code: [Select]
http://192.168.1.16/port_3480/data_request?id=lr_ALTUI_Handler&command=home&home=pageDevices
Title: 6- quickly accessing a device control panel
Post by: amg0 on August 14, 2015, 03:45:07 am
Click on the device icon and it will bring you directly to the device control panel
Title: 7- favorite devices appear on home page as clickable tiles with basic info
Post by: amg0 on September 01, 2015, 06:03:02 pm
it says it all in the title...
once a device or scene has been selected as a favorite ( colored star ), it will then appear as a tile on the home page of ALTUI. You can allways return to the Home page by clicking on home or on the VERA logo.

light , dimmers and scene tiles are clickable
Title: 8 - ALTUI as full page app on IOS
Post by: amg0 on September 14, 2015, 02:42:17 pm
To have ALTUI opens as a full page APP like a native iOS app on your apple iDevice , proceed like this

1) open ALTUI home page ( with your prefered home page )
2) click on the Share icon on the top left
3) choose save to home screen ( not sure of exact wording, my devices are in french )
4) get the Icon as one of your App Icons

you can now open this Icon and ALTUI will open as a native app. no browser bar and no way to get a browser bar from here. close your app like any other app
Title: 9 - Temporarly disabling a scene
Post by: amg0 on September 19, 2015, 04:31:27 am
Click on the small on/off sign on the top left corner of the scene object to pause or resume a scene.
a paused scene, does not execute , even if its triggers are raised.
Title: 10 - Testing Lua code
Post by: amg0 on September 28, 2015, 03:46:15 pm
10 - Testing Lua code

ALTUI Misc / Lua test code enables to test some tibbits of Lua code and to display the return value of the code, as well as displaying in an output the result of any print() statement within that code

Title: Re: 3- displaying ALTUI in another language
Post by: fgallarday on November 09, 2015, 01:41:40 am
b) if people want to contribute to create the strings for another language, you can take J_ALTUI_loc_fr.js and rename it J_ALTUI_loc_xx.js where xx is the 2 letter code of the language following ISO code ( http://www.w3schools.com/tags/ref_language_codes.asp ) and upload the file along the ALTUI files.

c) I can add it into the distribution if you want

Hi, I recently found about your Alternate UI and really think is a very good job, congratulations!!!

Please, find here my collaboration, a language localization for Spanish. Will be great if you can include it as part of the distribution.
Keep up the great work!

Fernando Gallarday
P.S. As I am not allowed to upload .js files, I renamed it to .txt
Title: Re: ALTUI : Tips &amp; Tricks
Post by: amg0 on November 09, 2015, 01:42:20 am
Thank you, will do.


Envoy? de mon iPad en utilisant Tapatalk
Title: 11- forcing a manual install of a particular version of ALTUI
Post by: amg0 on January 13, 2016, 02:00:27 am
this is a way to install manually a particular version of ALTUI is to use the "magic" url
http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=xxx
where xxx is a magic number given to you by the App.mios.com store

it is explained here: http://forum.micasaverde.com/index.php/topic,35739.msg264517.html#msg264517

the magic number to use can get found by looking here : http://apps.mios.com/test-plugin.php?id=8246&show=versions then clicking show files button of the version you want, then looking at the url in browser and take the number for PK_Version parameter

http://apps.mios.com/download-plugin.php?PK_Version=30020
Title: 12 - which syntax to use for opening ALTUI url
Post by: amg0 on March 16, 2016, 07:09:14 am
On openLuup you must use :3480 but on Vera you can use either /port_3480 or :3480 on Firefox and Chrome, but not on IE. IE only works with /port_3480

Bottom line
Title: 13 - directly opening a particular user custom page and nothing else
Post by: amg0 on June 08, 2016, 01:51:45 am
using a url like this you can instruct ALTUI to open by default, one of your custom page , without any other things ( like menu ) around.

perfect for a waf or kid proof situation

http://<yourip>/port_3480/data_request?id=lr_ALTUI_Handler&command=home&home=pageUsePages&layout=lean&nPage=nnn (http://<yourip>/port_3480/data_request?id=lr_ALTUI_Handler&command=home&home=pageUsePages&layout=lean&nPage=nnn)

where nnn is the custom page index starting with 0
Title: Re: 7- favorite devices appear on home page as clickable tiles with basic info
Post by: ccollinscj on January 13, 2018, 04:08:56 pm
it says it all in the title...
once a device or scene has been selected as a favorite ( colored star ), it will then appear as a tile on the home page of ALTUI. You can allways return to the Home page by clicking on home or on the VERA logo.

light , dimmers and scene tiles are clickable

Ok am new and cannot find any documentation on how to add events and or modify like you have on the home page.  Is there a way to do this without going into code i.e. GUI editing.....I have been unsuccessful at finding anything that can help me.
Title: Re: 7- favorite devices appear on home page as clickable tiles with basic info
Post by: amg0 on January 13, 2018, 04:14:29 pm
it says it all in the title...
once a device or scene has been selected as a favorite ( colored star ), it will then appear as a tile on the home page of ALTUI. You can allways return to the Home page by clicking on home or on the VERA logo.

light , dimmers and scene tiles are clickable

Ok am new and cannot find any documentation on how to add events and or modify like you have on the home page.  Is there a way to do this without going into code i.e. GUI editing.....I have been unsuccessful at finding anything that can help me.

set device or scene as "favorites" by clicking on the litte star icon in the device or scene page.  Once set as favorite it will appear on the home page as a square tile.  The order is controllable by drag and drop
Title: Re: ALTUI : Tips & Tricks
Post by: ccollinscj on January 13, 2018, 05:12:35 pm
Awesome.....slowly figuring out,  bought license yesterday and today I am jumping in.  Having some issues with OnLabel OffLabel with using MutiState object for my Kwik Set locks,  it doesn't what to toggle the state label, Icon and Door works great.  I am sure I will figure it out
Title: Desktop shortcuts to turn on/off a light
Post by: rjbissell1971 on January 31, 2019, 12:06:58 pm
After messing with it for days, I finally figured some stuff out that I thought might help others.

Be sure to install AltUI
(Login online, I don't think you can do it from the app; then go to Apps -> Install Apps and search for AltUI)

Using AltUI you can hit a web address to turn on/off a light, or to lock/unlock a door. 
NOTE: This worked in Chrome, but didn't work in Edge, even with "port_3480" instead of ":3480" it still didn't work for me in Edge.

Example 1 - Turn on/off a light

    Turn ON  URL: http://<VeraIP>:3480/data_request?id=lu_action&output_format=xml&DeviceNum=<dev#>&serviceId=urn:<service>:serviceId:<serviceID>&action=SetTarget&newTargetValue=1
    Turn OFF URL: http://<VeraIP>:3480/data_request?id=lu_action&output_format=xml&DeviceNum=<dev#>&serviceId=urn:<service>:serviceId:<serviceID>&action=SetTarget&newTargetValue=0


    FINDING THE SERVICE/SERVICE ID --- This was a struggle for me.  I couldn't find the information through the UI.
    <serviceList>
      <service>
        <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
        <SCPDURL>S_SwitchPower1.xml</SCPDURL>
      </service>


    FINDING THE VeraIP --- Lots of ways to do this including looking in your Router settings, this is just the way I confirmed I had the right one

    === IP Configuration ===
    br-wan    Link encap:Ethernet  HWaddr ##:##:##:##:##:## 
              inet addr:192.168.1.16  Bcast:###.###.#.###  Mask:###.###.###.#
    eth0      Link encap:Ethernet  HWaddr ##:##:##:##:##:## 
    eth0.1    Link encap:Ethernet  HWaddr ##:##:##:##:##:## 
              inet addr:###.###.##.##  Bcast:###.###.##.###  Mask:###.###.###.#
    eth0.2    Link encap:Ethernet  HWaddr ##:##:##:##:##:## 
              inet addr:###.#.#.#  Mask:###.###.###.#
    ra0       Link encap:Ethernet  HWaddr ##:##:##:##:##:## 
    rai0      Link encap:Ethernet  HWaddr B4:A5:EF:F1:87:54 
    ========================
    External IP: ##.##.#.###


Example 2 - Lock/Unlock a door

    Lock Door   URL: http://192.168.1.16:3480/data_request?id=lu_action&output_format=xml&DeviceNum=5&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=1
    UnLock Door URL: http://192.168.1.16:3480/data_request?id=lu_action&output_format=xml&DeviceNum=5&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=0

    NOTE: the different "service" used here - "micasaverde-com" instead of "upnp-org" and that it is "DoorLock1"
    Use the same process as in Example 1 to build your URL

    <serviceList>
      <service>
        <serviceType>urn:schemas-micasaverde-com:service:DoorLock:1</serviceType>
        <serviceId>urn:micasaverde-com:serviceId:DoorLock1</serviceId>
        <SCPDURL>S_DoorLock1.xml</SCPDURL>
      </service>



ISSUES TO BE ADDRESSED



Thanks to all the other posters here, I couldn't have figured this out without your posts.
Title: Re: ALTUI : Tips & Tricks
Post by: Catman on January 31, 2019, 03:48:49 pm
If you don't want to use a browser, could you use curl from a batch or command line?  I can test it at some point, but curious if you've tried?
C
Title: Re: ALTUI : Tips & Tricks
Post by: Catman on January 31, 2019, 04:57:25 pm
Awesome
curl 'http://n.n.n.n:3480/data_request?id=lu_action&output_format=xml&DeviceNum=37&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1'

Works beautifully. At least on my Mac'
Which means you can write these into any kind of script or executable command line. Fantastic.


C
Title: Re: ALTUI : Tips & Tricks
Post by: Catman on January 31, 2019, 05:02:26 pm
Oh another thing, yes you could forward $randomport to 3480 on your vera and I am completely sure that it would work just fine.

Also reasonably sure that it would be about as secure as a wet paper bag. Almost certainly not a good idea unless you've got some far harder security than that in drobear which, if I read the recent threads and remember them correctly isa version with some security issues already.

C