Author Topic: Home/Away modes?  (Read 9095 times)

0 Members and 1 Guest are viewing this topic.

Stonewallace

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Home/Away modes?
« Reply #15 on: April 22, 2016, 04:08:32 AM »
I was looking for a way to change the modes in Vera Plus UI7 using VoxCommando. This way I could simply say, "Goodnight Vera" to put it into Night mode, or "I'm Leaving Vera" to put it into away mode. I was able to do this using the Robo Browser (Robob) Plugin. I added an action using the RoboB.Navigate plugin. Then I fill in one of the following links in the box for Robo Browser to pull up in a hidden window. Then you can also use the VC plugin TTS.Speak to have VoxCommando say what you type in, so it can give you verbal confirmation that it is changing the scene. Vera Plus running UI7 is my first Vera unit, so I don't know if this will work on UI5 and older units. Just thought I would put this out there, because I was not able to find a lot of info on it, and the Current Plug-in for Vera on VC does not support changing Modes yet. I have it running on my system this way and it works like a charm!

Home Mode:
http://192.168.1.121/port_3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=SetHouseMode&Mode=1

Away Mode:
http://192.168.1.121/port_3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=SetHouseMode&Mode=2

Night Mode:
http://192.168.1.121/port_3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=SetHouseMode&Mode=3

Vacation Mode:
http://192.168.1.121/port_3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=SetHouseMode&Mode=4

Just change the IP address at the beginning if the link to match the IP address of your vera on your network. I beleive that the "/port_3480" is standard (at least on Vera Plus UI7) and does not have to be changed. Notice that the numbers 1 through 4 at the end that set the mode is the only part of the link that changes.


Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Home/Away modes?
« Reply #16 on: April 22, 2016, 06:48:48 AM »
Hi Stonewallace and welcome to the VC forum.


For such a function you can use the "Vera.Raw" action in VoxCommando.


"... Lets you send any HTTP Luup request to the Vera unit. Use this action if you need to extend functionality beyond what is already provided in VoxCommando's Vera plugin.
Note that you only need to include the string that appears after the last slash (/) of the URL.
e.g.  data_request?id=variableget&... "


So you need only to put this URL in the parameter field: data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=SetHouseMode&Mode=1

I hope this help you.
« Last Edit: April 22, 2016, 07:33:53 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #17 on: April 22, 2016, 09:01:19 AM »
Hi Stonewallace,

Thanks for sharing your method and URLs with us.  :)

I think it's also worth mentioning for future reference, that even if you did not have the Vera.Raw action, we can handle http web requests using the Scrape action.

RoboBrowser is overkill for something like this.

I've never seen that syntax for specifying the port before.  I thought the only way was like this.
http://192.169.1.100:3480

You learn something new every day, but I don't think that method works with anything except the Vera.
« Last Edit: April 22, 2016, 09:05:16 AM by jitterjames »

Stonewallace

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Home/Away modes?
« Reply #18 on: April 22, 2016, 01:52:27 PM »
Your right about the method used to specify the port JitterJames I found that strange too. I am a huge noob when in comes to VoxCommando and Vera, so I just did some basic Googling and I just set up the "Our Groceries" in VC, so I just copy and pasted the links provided to me from another site for changing modes into Robob. My previous way of doing this did look like a messy hack way of doing it, but it worked.

I have now changed the way it is set up using Kalle's advice using Vera.Raw and it works great. Thanks for the info. Its a much cleaner way of doing it and prob saves a little on system resources by doing it Kalle's way.

Thanks for the help!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #19 on: April 22, 2016, 01:58:39 PM »
I will also add a new action to set the Vera house mode in the next release.

If you did need to use RoboBrowser for something like that there is also an action to dispose of it when you are done.