Author Topic: Vera Command Delay Problem  (Read 3764 times)

0 Members and 1 Guest are viewing this topic.

izzacg

  • Guest
Vera Command Delay Problem
« on: November 06, 2014, 07:01:11 PM »
I am successfully able to use voice commands to control devices on my Vera3 running UI6.  The problem that I am seeing is that there is a rather lengthy delay from the moment the command is sent to the Vera to the moment the device switches on and a response is received.

For example, I configured a voice command to turn a switch on.  Here are the results from the log:

11/6/2014 3:33:50 PM   757   guessed text:Power lights On ?? (All Lights On)
11/6/2014 3:33:51 PM   67   Rulename: root    # Semantics: 2
11/6/2014 3:33:51 PM   67   Group: All Lights On    Speech: Power lights On
11/6/2014 3:33:51 PM   67   semanticID: 1153
11/6/2014 3:33:51 PM   67   command ID: 1153
11/6/2014 3:33:51 PM   67   semanticID: 1153
11/6/2014 3:33:51 PM   67   kvp: command | 1153
11/6/2014 3:33:51 PM   67   kvp: payload1 | <1153:On>1
11/6/2014 3:33:51 PM   67   id from payload: 1153
11/6/2014 3:33:51 PM   67   semanticID: 1153
11/6/2014 3:33:51 PM   67   kvp: command | 1153
11/6/2014 3:33:51 PM   67   kvp: payload1 | <1153:On>1
11/6/2014 3:33:51 PM   67   id from payload: 1153
11/6/2014 3:33:51 PM   67   alternate:Power lights On
11/6/2014 3:33:51 PM   107   doCommand:Lights
11/6/2014 3:33:51 PM   107   action repeat set to: 1
11/6/2014 3:33:51 PM   107   Action:  Vera.SetState - 19&&1
11/6/2014 3:33:51 PM   107   [action] Vera.SetState:19&&1

11/6/2014 3:33:51 PM   107   [plugin] http://192.168.6.210:3480/data_request?id=action&output_format=xml&DeviceNum=19&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: update device info id: 6 Category:4.1
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: getStatusByCategory: 4.1
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: Sub category not found: 4.1 trying with: 4.0
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: checking for token: tripped
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: Device exists: 6
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: status: 0
11/6/2014 3:39:26 PM   153   [plugin] Vera-Vera1: changed?: False


As you can see, the action was sent to the Vera at 3:33:51 but a response wasn't received until almost six minutes later at 3:39:26.  During this time, the VoxCommando program freezes and I cannot do anything in it.

My first reaction is that the delay is on the Vera side but as a test, I used the http link that the plugin sends to the Vera (see log above) and tested it on a browser on the same machine.  The Vera reacted almost instantaneously.

Any thoughts on what I may be doing wrong?  Thank you

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Vera Command Delay Problem
« Reply #1 on: November 06, 2014, 09:29:33 PM »
Bummer.  >:(

The only thing I can think of is that UI6 is the problem.  Even if I enter the wrong IP address for my Vera the delay is only about 15 seconds so that 6 minute delay is very unexpected.

Normally, even if the Vera does not immediately switch the light on or off (it might take a few seconds) VC continues on its merry way immediately without waiting for more than a fraction of a second.

Is there anything weird about your network setup?  Is your VC machine on the same subnet as the Vera?  (are the first 3 numbers in the IP address the same?).  Do you have anything else worthy of note, like a VPN etc?

VC basically sends a simple HTTP request similar to what your browser sends and it doesn't really look at the response although it does wait for a confirmation that the message was received before continuing.

In terms of status reports that come back and generate events (if that option in enabled) that is handled in a completely separate process and should not really have anything to do with sending commands to the Vera unit.

Of course, if you request information in an action like Vera.Get.Status then it will wait for a response from Vera until it times out but it should not take more than a minute before it gives up.

All I know about UI6 is that noone wants it, and I'm not going to install it.  From what I've seen it will never get out of alpha either because they are working on UI7 but I'm not really holding my breath on that one either. UI5 might be ugly but it works and I don't really use the built-in UI anyway.  I use only VC and AutHomation for Android to interact with my Vera.

I'm sorry we can't offer more in terms of practical solutions for you at this point.  We have spent about an hour trying to recreate what is happening to you and we cannot figure it out.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Vera Command Delay Problem
« Reply #2 on: November 07, 2014, 05:40:42 AM »
@izzacg: If you want downgrade to UI5 - take a look here: http://voxcommando.com/forum/index.php?topic=1830.msg15879#msg15879
***********  get excited and make things  **********

izzacg

  • Guest
Re: Vera Command Delay Problem
« Reply #3 on: November 10, 2014, 12:12:30 PM »
@jitterjames:

Thank you for taking the time to help troubleshoot my situation.

It's quite possible that UI6 may be the problem but I'm having trouble with that for reasons I'll explain below.  Regarding my network setup, there is absolutely nothing uncommon with how I have it setup.  It's a simple local network where the VC system is on the same subnet as the Vera (I only have one class C subnet defined, no routing, no VPNs, etc.) 

Based on the log entry, I was able to decipher the fact that VC is simply sending an HTTP request to the Vera to execute the action.  This is the part that has me stumped though.  If it is a simple HTTP request, then I cannot figure out where the delay is coming from.  In other words, if I execute that same HTTP request in a browser where the VC program is installed, the Vera responds immediately.  As you stated, VC sends the HTTP request but does not wait for a confirmation.  With this in mind, is there anything else the program does at this time where it may be getting hung up?  It is very odd.

I don't disagree that the problem could be attributed to UI6.  I just can't wrap my head around this knowing it's a simple HTTP call to the Vera web service.  A web service that, in my test, responded immediately to a request I directly sent.  I will continue troubleshooting this the best I can.  Thank you again.

izzacg

  • Guest
Re: Vera Command Delay Problem
« Reply #4 on: November 10, 2014, 12:22:19 PM »
@izzacg: If you want downgrade to UI5 - take a look here: http://voxcommando.com/forum/index.php?topic=1830.msg15879#msg15879

Thank you for the link Kalle.  I am considering this but mostly as a Plan Z option.

With that being said, I'd like to ask anybody else reading this post if you are using VC with a Vera3 running UI6?  I can't be the only one trying to do this...

Thank you

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Vera Command Delay Problem
« Reply #5 on: November 10, 2014, 12:28:23 PM »
I don't know.  It might not be a UI6 problem at all, you are the only one that has reported anything like this.  Many users have had no issues with UI5, but I actually have no idea how many VC users are also using Vera with UI6.  Probably not many because UI6 is unpopular, but possible there are a few, and if so they did not mention anything like this.

I'm not really able to suggest anything at this point, expect that perhaps you should send me your COMPLETE log (privately if you like) and also a backup of your configuration.

email it to me.

You can also try sending the command using the scrape action as a trouble shooting measure.

The command that Nime5ter made for the Vera preset configuration does a query immediately after sending the command to switch a light, so I don't know if you are using that command or not, but if you are you can try to remove the part that asks for a status update.

izzacg

  • Guest
Re: Vera Command Delay Problem
« Reply #6 on: November 10, 2014, 01:10:47 PM »
I will send you the information you requested and perform the actions you suggested.  I am also going to try performing a network trace to see if it reveals any additional information.