Desktop Shortcut

Hey all,

im learning a ton reading old posts on here. im working on completely automating my house and vera is way better then the schlagelink i was using before. thaks to everyone who has and is contributing to this forum. anyway… to my question.

i want to simply put a shortcut on my desktop to turn off the lights to my computer room. i can do it through my cell and through the vera ui. i was wondering if i can just write up a shortcut or so forth. if so can someone post what i need to do? i did search for this and found that it might be possible but no one bothered explaining how.

Thanks again in advance

  1. Get wget for Windows.
  2. Create a shortcut to it on the Desktop.
  3. Right click on the shortcut and open the Shortcut tab.
  4. In the Target field append the following:

-q -O NUL "http://<vera_IP>:3480/data_request?id=lu_action &serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=<scene_number>"

Here’s an example:

"D:\Programs\wget.exe" -q -O NUL "http://192.168.10.1:3480/data_request?id=lu_action &serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=6"

Hope this helps.

@Henk,
Sounds like potential HowTo material? :slight_smile:

thanks and ill try to put it in the right place next time. :wink:

ok so this will allow me to run a specific scene. this will work and is better than nothing which is what i had before, but is there a way to specifically aim at a device instead?

Sure, just replace the URL with this one:

http://<vera_IP>:3480/data_request?id=lu_action&output_format=xml&DeviceNum=<device_number> &serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=<1 to turn on, 0 to turn off>

You can find the whole Luup requests list here.

[quote=“oTi@, post:3, topic:168393”]@Henk,
Sounds like potential HowTo material? :)[/quote]

You like them huh?

And for those of us who have evolved past the windows world… :stuck_out_tongue:

[quote=“mcvflorin, post:2, topic:168393”]1. Get wget for Windows.
2. Create a shortcut to it on the Desktop.
3. Right click on the shortcut and open the Shortcut tab.
4. In the Target field append the following:

-q -O NUL "http://<vera_IP>:3480/data_request?id=lu_action &serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=<scene_number>"

Here’s an example:

"D:\Programs\wget.exe" -q -O NUL "http://192.168.10.1:3480/data_request?id=lu_action &serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=6"

Hope this helps.[/quote]

in Linux or OSX you can use curl -0 instead of wget.exe

works like a charm. ty very much. this forum and you are both amazing. and for the record… its all about OSX… rofl :wink:

so i have two shortcutts setup right now. one that turns them on. and one that turns them off. is there anyway i can make it change the stat with one icon and if so is there a way that i can make the icon change between two icons as it does so. so like when the lights are on use a yellow light bulb and when they are off use a dark light bulb.

Don’t know about the icon, but try this for a single shortcut that will toggle the state:

"http://<veraIP>:3480/data_request?id=lu_action&output_format=xml&DeviceNum=<devId>&serviceId=urn:micasaverde-com:serviceId:HaDevice1&action=ToggleState"

works like a charm. and agian you have my gratidue. next i want to be able to lock and unlok a door. so before i just get the answer explain to me how you get these command lines. i cant quite figure it out.

You could just change the to that of the lock; but for the lock you may want to separate it in 2 shortcuts I suppose.

Lock:

"http://<veraIP>:3480/data_request?id=lu_action&output_format=xml&DeviceNum=<devId>&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=1"

Unlock:

"http://<veraIP>:3480/data_request?id=lu_action&output_format=xml&DeviceNum=<devId>&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=0"

One way to work out those parameters is to create a scratch scene and adding the device you’re interested in to the Advanced tab. You’ll then see a drop down list of the (potentially) supported actions, sorted by serviceId. Select the one you’re interested in and it will show you the argument that the action takes, if any.

Try it for the lock and you should be able to match it to the fields in the code above.

(The semantics of the argument is trial/error, this way; which is probably ok for the more straightforward stuff. Alternatively, you could take a peek at the associated xml files.)

Is there any reason why the wget shortcut method for remote scene execution should not work the same as locally?

I can fire the scene via the browser but not from the shortcut.

"C:\My Downloads\wget.exe" -q -O NUL "https://fwd1.mios.com/UN/PW/BOXID/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=40"

The only thing I can think of is it works for http but not for https.

JOD.

@JOD,
Have you tried with [tt]http[/tt] to see if the problem is related to [tt]https[/tt].
Also, do you get any kind of error message when trying from the command line?

@oTi,
http works from the browser and the command prompt so does https. Ok, so thats not the issue.

JOD.

[quote=“JOD, post:16, topic:168393”]@oTi,
http works from the browser and the command prompt so does https. Ok, so thats not the issue.

JOD.[/quote]

User rights restriction on wget/desktop?
Have you tried right clicking the desktop icon and select runas: administrator?

After moving the .exe from the downloaded file area to the “C” drive and changing the path to match, it worked.
Not sure why, the path was correct before…

JOD.

[quote=“JOD, post:18, topic:168393”]After moving the .exe from the downloaded file area to the “C” drive and changing the path to match, it worked.
Not sure why, the path was correct before…

JOD.[/quote]

Could easily be some Windows “security” thing, to keep (working) shortcuts from being created to potentially dangerous web downloaded binaries.

–Richard

This method is also great for creating iPhone home screen icons for quick access to scenes/devices.
I now have a “lock door” and “unlock door” icons on my iPhone home screen. Much faster than launching iVera just to open the door.

I’ve found that the easiest way to create the iPhone home screen icon is to email yourself a link like
“http://:3480/data_request?id=lu_action&output_format=xml&DeviceNum=&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=1”
Then, open the email on your iPhone, click the link, and press the add bookmark icon on iPhone’s Safari, and choose “Add to Home Screen”