ALTUI : Tips & Tricks

[quote=“ccollinscj, post:20, topic:188332”][quote=“amg0, post:11, topic:188332”]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[/quote]

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.[/quote]

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

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

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


[u][b]FINDING THE SERVICE/SERVICE ID[/b][/u] --- This was a struggle for me.  I couldn't find the information through the UI.

[ol][li]Pull up the Device in the Vera UI (note the device number for the <dev#> field in the URL) and go to Advanced

[/li]
[li]Note the “device_file”

[/li]
[li]Go to http://:3480/luvd/<device_file>[br/]Example: http://192.168.1.16:3480/luvd/D_BinaryLight1.xml

[/li]
[li]In the serviceList section (see below) I was able to find the as “upnp-org” and the as “SwitchPower:1” (remove the colon for use in the URL)[br/]I expected this to BinaryLight1, but that didn’t work. I had to go to the XML to find out it was SwitchPower1.

[/li]
[li]Build your URL[br/]http://192.168.1.16:3480/data_request?id=lu_action&output_format=xml&DeviceNum=29&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

[/li]
[li]Open the URL in a browser (Chrome worked and Edge didn’t for me) and change the 0 to a 1 and test it to make sure it turns on/off the light.

[/li]
[li]Create a desktop shortcut to the URLs. Bingo! Double click on one to turn on the light and the other to turn off the light.

[/li][/ol]

<serviceList>
  <service>
    <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
    <SCPDURL>S_SwitchPower1.xml</SCPDURL>
  </service>


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

[ol][li]Log into your controller

[/li]
[li]Go to Settings → Net & Wifi

[/li]
[li]Click on “Troubleshoot Network”

[/li]
[li]In the IP Configuration section, find the correct “inet addr” - mine was in the “br-wan” section

[/li]
[li]You may also note the External IP and then see the ISSUES TO BE ADDRESSED below

[/li][/ol]

=== IP Configuration ===
br-wan    Link encap:Ethernet  HWaddr ##:##:##:##:##:##  
          inet addr:[b]192.168.1.16[/b]  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

[ol][li]The shortcuts open up a browser, which I don’t want and then I have to close.
There might be a way with TelNet or something to hit that website address without opening a browser. That would be ideal.
If I figure out how, I’ll repost later, or maybe someone can reply with help for that.

[/li][li]You should be able to create shortcuts on your cell phone’s home screen to hit the same URLs and it should work also, but I haven’t done that yet.

[/li]
[li]My gut says there should be an easier way to do this and I’m probably just missing it.
If anyone knows of other/easier ways to get shortcuts that do things in Vera, please post those!

[/li]
[li]I’m sure you can probably trigger things remotely using the External IP Address, but that probably requires doing some port forwarding on your router to send port 3480 to Vera. I haven’t done that and how you do that depends on your specific router.

[/li]
[li]If you use this process, you will probably want to assign a static IP address for your Vera controller. This is done through your router and the process is router specific.
If you don’t assign a static IP, then you run the risk of a router reboot assigning a different (IP address) to your controller and your shortcuts will stop working

[/li][/ol]

Thanks to all the other posters here, I couldn’t have figured this out without your posts.

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

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

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

Another Tip with ALTUI: Mobile Dashboard

With the new release of dashboard by VERA which is an improvement, it gives me the opportunity to remind what you can do with ALTUI on your phone. it is not necessarily as nice and polished but it does the job and more importantly, it supports all the same device/UI as when you run it on a desktop

if you want a dashboard like experience you can:

  • Set favorites ( click the star on devices ) and have them appear on ALTUI home page

  • Create your own custom panel and use custom panel although this is not so easy and sometime not dynamic enough in terms of adaptive response

  • use My House view

  • use the My House bird view : I include an example on iPhone here below. this offers you to filter by room, by category, by tags ( you assign tags to device in device page ) and to sort by name/id etc. to get a nice fixed square layout, remember to set a width in the options page, 80 pixels works well. screen shot attached

If you wonder what is the difference between ALTUI and a native app that you install from the phone App Store, there is none. ALTUI is a web app, meaning when you save it on your home screen, the phone is caching all the app files. also ALTUI is single page, meaning it is not a browsing experience, the initial page is loaded on your device, then everything is client side with ajax/web service calls. this is exactly the same level of performance and experience as a native app. the only difference is that you do not need to install it from the AppStore of the phone, you simply open the app in your browser, then chose to “share” and “save to home page” command and voila, the web app is installed on your phone

screen shot:

Ooooh

So we just go to the URL for our AltUI on a phone browser?

Cheers

C

Yes same stuff … save it on home screen as a favorite and it becomes a webapp …

1 Like

Every now and then I see a device ‘pulse’ (light blue/grey) in AltUI. Is this a visual indication of the device being polled?

Cheers,