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

0 Members and 1 Guest are viewing this topic.

CarsonY101

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Home/Away modes?
« on: January 01, 2015, 07:07:20 PM »
I have searched for this on the forum but maybe I missed something... Can (or is there away) for VC to know if Vera is in home or away mode? Just wondering, thank you guys for time.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #1 on: January 01, 2015, 09:04:59 PM »
This is not available in UI5 and we do not wish to update to UI7 based on all the problems we have heard about.

Based on a bit of searching though you should be able to use this to look up the mode:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.2-->
<command id="307" name="get vera mode" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Vera.Raw</cmdType>
    <params>
      <param>data_request?id=variableget&amp;Variable=Mode</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

Mode can be:
1 = Home
2 = Away
3 = Night
4 = Vacation

Note that this is a way to check the current mode.  It is not going to raise an event when the mode changes.  That is more difficult for us to figure out without having access to UI7.  If you like you can try enabling verbose logging in the VoxCommando Vera plugin, switching modes a few times, and then sending us a VoxCommando log file and maybe we will see something.

CarsonY101

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Home/Away modes?
« Reply #2 on: January 01, 2015, 10:35:13 PM »
First off, thanks James for the reply.

Second, I've done what you asked and attached the log file like you've requested.

Thanks again for your help. Love VoxCommando!
« Last Edit: January 01, 2015, 10:45:52 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #3 on: January 01, 2015, 10:44:49 PM »
Unfortunately, I do not see any signs that the mode of the Vera is changing.

Did you enable verbose logging and also make sure to change your Vera's mode while VC was running?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #4 on: January 01, 2015, 10:47:27 PM »
btw, I removed your log file attachment from your post after downloading it in case there was anything sensitive in there.

Next time you send a log file you can email it to me instead if you like.

CarsonY101

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Home/Away modes?
« Reply #5 on: January 01, 2015, 10:51:36 PM »
Oh, ok. Thanks

I did enable Verbose, VC was running, and I changed modes quite a few times. Guessing at this moment it's a lost cause.

Thanks for your help.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #6 on: January 02, 2015, 09:07:21 AM »
Hmmm. Ok.

It should be possible to use another method.  When your Vera changes modes it will surely generate other events. If you assign one scene to each mode, even if the scenes do not really do anything, then it will generate an event for the corresponding scene whenever you change modes and this way VoxCommando will know what mode you are in.

By the way, you are using a really old version of VoxCommando and you should upgrade.

CarsonY101

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Home/Away modes?
« Reply #7 on: January 03, 2015, 07:19:36 PM »
James, I have now updated to VC 2.129, set the Vera Plugin to Verbose, and sent you an updated voxlog to your gmail account. Hope this helps and sorry to send it to your gmail and not a forum message. Couldn't seem to get the attachment to attach.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #8 on: January 03, 2015, 09:04:00 PM »
I see nothing new of use to us in that log.  My earlier suggestion should still be valid though.

It should be possible to use another method.  When your Vera changes modes it will surely generate other events. If you assign one scene to each mode, even if the scenes do not really do anything, then it will generate an event for the corresponding scene whenever you change modes and this way VoxCommando will know what mode you are in.

I thought you were a GgCal user.  You'll need to update to 2.133 or later if you want to use the GgCal plugin.

CarsonY101

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Home/Away modes?
« Reply #9 on: January 03, 2015, 09:26:29 PM »
Thanks James, I'll give that a try. I am a GgCal user but wasn't sure if it was fixed in the latest update or not. Guess I'll be updating again. Ha!

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Home/Away modes?
« Reply #10 on: January 03, 2015, 10:07:34 PM »
If you're not keeping track of VC updates via Google Plus, the Twitter feed, responses to your previous posts on the forum, or the main VoxCommando website, you can always check the Change Log page of the wiki to decide what version you want to download when updating.

http://voxcommando.com/mediawiki/index.php?title=ChangeLog#Version_2.1.3.3

There is also a link to the Change Log in the Support menu of the VoxCommando website.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

CarsonY101

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Home/Away modes?
« Reply #11 on: January 04, 2015, 01:27:21 PM »
Thanks Nime5ter for the info. Following the Twitter feed now.

AgileHumor

  • Contributor
  • ***
  • Posts: 62
  • Karma: 3
    • View Profile
Re: Home/Away modes?
« Reply #12 on: March 04, 2015, 08:48:24 PM »
Is there any plan to support this as a Vera Hose Modes (Home/Night/Away/Vacation)?

I just bought a VeraEdge with UI7 to test with and without this information...VC is not understanding the current state and my logic falls flat.

Thanks for listening!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Home/Away modes?
« Reply #13 on: March 05, 2015, 11:14:08 AM »
Is there any plan to support this as a Vera Hose Modes (Home/Night/Away/Vacation)?
Can you elaborate a bit on what you are looking for in terms of "supporting" house modes please?

We can easily check the mode, and there is probably a way to set the mode.  I'm not sure what else there is to support other than generating events when the house mode changes, but from what I can tell Vera does not include any information about the house mode in the polling loop which we use to generate events so it would probably mean pinging Vera on a fairly short interval to check the current mode and then generating an event if it has changed.

It's hard for me to say at this point since I do not have UI7 and I'm kind of afraid of switching over from UI5 since I actually use my VeraLite for more than just testing.

I just bought a VeraEdge with UI7 to test with and without this information...VC is not understanding the current state and my logic falls flat.
Can you elaborate on this as well please.  What do you mean VC is not understanding the current state.

Please bear in mind that I have not used UI7 so I don't fully grok what the house modes are all about.  You may need to offer some additional context for me to understand what you are expecting to happen.

AgileHumor

  • Contributor
  • ***
  • Posts: 62
  • Karma: 3
    • View Profile
Re: Home/Away modes?
« Reply #14 on: March 08, 2015, 12:29:15 AM »
I just need to read them (which I know see is possible).    This would allow some AND statements to only fire actions when home mode = X.

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: 7715
  • 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: 7715
  • 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.