Author Topic: Veralite communications with VoxComando  (Read 9015 times)

0 Members and 1 Guest are viewing this topic.

crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Veralite communications with VoxComando
« on: December 18, 2013, 02:44:03 PM »
Hi Everyone. I've been working with getting my home automation going with the Veralite controller. I have used the vera plugin and everything seems to work great. I am stuck on one thing though and hope someone can help me. As in the video that shows James opening the door and the Veralite announces that there is motion, how does the Veralite know. Does voxCommando poll it or is there someway to send it from the veralite.  I would appreciate any help.  And James just want to tell you how much I enjoy your product.


Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Veralite communications with VoxComando
« Reply #1 on: December 18, 2013, 02:51:00 PM »
Nice to hear  :)
Yes, Voxcommando poll it - there is a "Poll / Generate Events" check mark in the VeraLite plugin.

I hope this will help

Kalle
***********  get excited and make things  **********

crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Re: Veralite communications with VoxComando
« Reply #2 on: December 18, 2013, 03:20:30 PM »
Thanks Kallie.  I looked and I have that box checked. I guess I'm missing how to use it.  Do you set up a loop and just keep on polling. That seems like it would use up a lot of battery.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #3 on: December 18, 2013, 03:22:00 PM »
Thanks Kallie.  I looked and I have that box checked. I guess I'm missing how to use it.  Do you set up a loop and just keep on polling. That seems like it would use up a lot of battery.

Battery?

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Veralite communications with VoxComando
« Reply #4 on: December 18, 2013, 03:30:09 PM »
Assuming you have a motion sensor, once the "poll/generate events" box is checked, that motion sensor will generate an event that will appear in the history panel whenever you set off the motion sensor.

You can then use that event as a trigger for your command. (see http://voxcommando.com/mediawiki/index.php?title=Home_Automation#Vera)

There's actually an example of this exact thing in the (extremely long-winded) "Fireside Chat" video #3 around the 8 minute mark.
&feature=youtu.be&t=8m0s

As I say, it's a long-winded video meant for new users, but it demonstrates a few different useful things so it may be worth watching as a whole.

... And for all users who come across this post, I might as well add the video tutorial on how to use events generally. :)
« Last Edit: December 18, 2013, 03:32:15 PM by nime5ter »
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)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #5 on: December 18, 2013, 03:34:02 PM »
Don't let the word polling bother you.  It just asks Vera for updates, it has no effect on how Vera polls your zwave devices.  If your motion sensor is running on a battery, it will alert Vera whenever it is triggered, and then Vera will alert VC, and an event will be generated.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #6 on: December 18, 2013, 03:38:26 PM »
As in the video that shows James opening the door and the Veralite announces that there is motion, how does the Veralite know.

Are you really asking how does Vera know, or how does VC know?

crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Re: Veralite communications with VoxComando
« Reply #7 on: December 18, 2013, 03:46:55 PM »
James I was asking how VC knows. But let me try and find what Kallie and You are talking about and if I can't figure it out I will reply. Thanks for the quick response.

crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Re: Veralite communications with VoxComando
« Reply #8 on: December 18, 2013, 03:49:43 PM »
Okay, now I feel like a complete dunce. I see where it is getting set in the history now. It is all so easy when you just think a little. Thanks for both of yours help.


crawfofd

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 3
    • View Profile
Re: Veralite communications with VoxComando
« Reply #9 on: December 21, 2013, 12:35:00 AM »
Nime5ter,  Sorry for the late response. It is pretty hectic with xmas and all. But thank you for your answer to my problem. It was exactly what I needed. Also I would like to thank everyone for all the help that you have given me.This is a great forum.

hpooni

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Veralite communications with VoxComando
« Reply #10 on: January 21, 2014, 10:22:46 PM »
I have schlage lock which supports Service=urn:micasaverde-com:serviceId:DoorLock1 but I don't see any events being generated in VC.  Veralite is definitely generating events as I can see them in the vera log.  FYI, I do see events from other devices (such as door sensors and switches) in VC.  Any ideas?  Below is part of the log from vera, if its of any help.  Note, I'm using VeraAlerts plugin, so some logging may be related to that.

Code: [Select]
06 01/21/14 21:09:33.787 Device_Variable::m_szValue_set device: 44 service: urn:micasaverde-com:serviceId:DoorLock1 variable: Status was: 0 now: 1 #hooks: 2 upnp: 0 v:0xaf3320/NONE duplicate:0 <0x2bbb7680>
07 01/21/14 21:09:33.787 Event::Evaluate 5 Front door unlocked scene Front door unlocked is false repeat 0/-1 <0x2bbb7680>
08 01/21/14 21:09:33.788 JobHandler_LuaUPnP::HandleActionRequest device: 47 service: urn:richardgreen:serviceId:VeraAlert1 action: DeviceNotification <0x2bbb7680>
08 01/21/14 21:09:33.788 JobHandler_LuaUPnP::HandleActionRequest argument DeviceID=44 <0x2bbb7680>
08 01/21/14 21:09:33.789 JobHandler_LuaUPnP::HandleActionRequest argument Description=%20Lock%20-%20Front%20Door%20is%20closed <0x2bbb7680>
08 01/21/14 21:09:33.789 JobHandler_LuaUPnP::HandleActionRequest argument Name=Front%20door%20is%20locked <0x2bbb7680>
08 01/21/14 21:09:33.789 JobHandler_LuaUPnP::HandleActionRequest argument Service=urn:micasaverde-com:serviceId:DoorLock1 <0x2bbb7680>
08 01/21/14 21:09:33.789 JobHandler_LuaUPnP::HandleActionRequest argument Variables=Status <0x2bbb7680>
08 01/21/14 21:09:33.789 JobHandler_LuaUPnP::HandleActionRequest argument Msg=Front%20Door%20Locked <0x2bbb7680>
08 01/21/14 21:09:33.790 JobHandler_LuaUPnP::HandleActionRequest argument SceneID=35 <0x2bbb7680>
08 01/21/14 21:09:33.790 JobHandler_LuaUPnP::HandleActionRequest argument Recipients=hpooni <0x2bbb7680>
07 01/21/14 21:09:33.791 Event::Evaluate 6 Front door is locked scene Front door is locked is true users:120306 allow:1 <0x2bbb7680>
08 01/21/14 21:09:33.792 Scene::RunScene running 35 Front door is locked <0x2bbb7680>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Veralite communications with VoxComando
« Reply #11 on: January 22, 2014, 08:23:37 AM »
Hi hpooni,

First, please post (attach) a complete Vox log (http://voxcommando.com/mediawiki/index.php?title=Log).

2. Are you able to get the status of the lock using the VC action Vera.Get.Status? (http://voxcommando.com/mediawiki/index.php?title=Plugin_Vera#Status)

3. Are you able to open and close the lock using Vera.SetState? (http://voxcommando.com/mediawiki/index.php?title=Plugin_Vera#SetState)

4. James also asks -- Can you please verify which version of the Vera plugin you have? This can be seen on the plugins tab in the main window (http://voxcommando.com/mediawiki/index.php?title=How_to_use_VoxCommando#.28D.29_Tabs:_History_.2F_Groups_.2F_Plugins).

We haven't really tested any door locks yet as these are quite pricy, so thanks for your help in figuring this out.  :)
« Last Edit: January 22, 2014, 08:39:27 AM by nime5ter »
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)

hpooni

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Veralite communications with VoxComando
« Reply #12 on: January 22, 2014, 10:23:05 PM »
1. I've attached the log file.  I triggered events by opening and closing the lock manually.
2. I cannot get the status of the lock using Vera.Get.Status. It should be in the above log file.
3. I cannot close/open the lock using Vera.SetState. It should be in the above log file.
4. The plugin version is 0.1.6.0
Indeed, its an expensive hobby.  But then again, which hobby isn't?  ;)

Thanks for your help.

[Edited your post to remove log from the public record. - nime5ter]
« Last Edit: January 22, 2014, 10:34:12 PM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Veralite communications with VoxComando
« Reply #13 on: January 22, 2014, 10:35:00 PM »
Thanks! We (mostly James ;-)) will take a look and get back to you.
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)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #14 on: January 22, 2014, 11:24:04 PM »
Can you use Vera.Raw with the following params to Lock and Unlock the door?

Vera.Raw    data_request?id=lu_action&output_format=xml&DeviceNum=44&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=1

Vera.Raw    data_request?id=lu_action&output_format=xml&DeviceNum=44&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=0

Looking at the logs of what Vera is sending to VC I can see that the variable "Locked" always has a value of "1" and status always has a value of "0" so that is very confusing.  Vera has a definition for lock variables that does not even include a variabled "Locked" so I guess Schlage is using their own definition.  It is also not clear to me whether setting the lock to be lock or unlocked actually changes anything or if a human has to physically turn the lock.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #15 on: January 22, 2014, 11:28:18 PM »
2. I cannot get the status of the lock using Vera.Get.Status. It should be in the above log file.

What does this mean exactly.  Does the action throw an error or does it always return the same status whether the door is locked or not?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #16 on: January 22, 2014, 11:37:50 PM »
is this command able to return the correct status of the lock?

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="195" name="vera test raw check status" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Vera.Raw</cmdType>
    <cmdString>data_request?id=lu_variableget&amp;DeviceNum=44&amp;serviceId=urn:micasaverde-com:serviceId:DoorLock1&amp;Variable=Status</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <cmdString>{LastResult}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #17 on: January 23, 2014, 08:50:41 AM »
In any case you should be getting scene events so even if you don't get an event for the lock device, any scenes associated with the lock should be firing events in VoxCommando.

hpooni

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Veralite communications with VoxComando
« Reply #18 on: January 23, 2014, 01:00:21 PM »
I'm not at home so I didn't want to attempt to lock/unlock but executing the xml provided by James seems to return the correct status (1) while Vera.Get.Status always returns 0.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Veralite communications with VoxComando
« Reply #19 on: January 23, 2014, 08:47:28 PM »
Good to have that confirmed, thanks.

When you have a chance to try the Vera.Raw lock/unlock actions, let us know how that goes (including whether you're seeing events in the history panel if the lock changes its status).

... I think you said before that you have the "poll/generate events" box checked for sure in the Vera plugin settings, right? You're seeing both device and scene events in the history panel whenever those have been activated somehow? (Except the lock?)
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)

hpooni

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Veralite communications with VoxComando
« Reply #20 on: January 25, 2014, 03:14:40 PM »
I can conform the Vera.Raw commands provide by James do work but are slow (lock takes about 10 seconds to react).
Indeed the ""poll/generate events" option is selected in the plugin and I do see device/scene events in the history window except for the lock.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #21 on: January 25, 2014, 04:01:06 PM »
If the lock appears to be slow to react that will be due to some Vera / Lock issue and not have anything to do with VC or the fact that you are using Raw actions.  Either your Vera is busy, or there is an issue with the lock or the way it is being polled.

Based on your logs there is no way that I can make the events for your lock generate correctly because Vera is not sending the correct status for your lock, but since your scene events are working you can use them instead of the lock's device event.

So at this point the only thing I can do is to add 2 new actions "Vera.SetLockState" and "Vera.Get.LockState" which will work exactly the same way as the Raw actions I provided above but will be easier to use.

If for some reason you made a mistake when generating your VC log and in fact Vera does send the correct values for the "Locked" and  or "Status" variables, please send me a new log file.  (In the log you posted earlier  "Locked" always had a value of "1" and status always had a value of "0")

thanks  ;D

hpooni

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Veralite communications with VoxComando
« Reply #22 on: January 26, 2014, 06:29:36 PM »
I agree the performance of the raw commands is not related to VC.  I was just mentioning in general as I've always found them to be slower.  Plus my network is getting bigger so that could also add to performance issues.  I may need to do some tweaking on Vera (per recommendations on the micasaverde forum) to improve this.

When I walk over to the lock and lock/unlock it, I do see activity in the VC log but I also see System.NullReferenceException: logged in there. Not sure if that means anything but I've attached the log file showing this.

« Last Edit: January 26, 2014, 10:02:18 PM by hpooni »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Veralite communications with VoxComando
« Reply #23 on: January 26, 2014, 07:25:53 PM »
I was just mentioning in general as I've always found them to be slower. 
I am sorry, I don't understand.  What have you found to be slower relative to what?

Thanks for the new log.  I will check it out.  In general, please check your logs and remove anything that might be private like lock codes before uploading.  It looks like there might be something in there but I don't know enough about it to know if those would be the actual codes.  I have downloaded your latest log in case you want to remove the attachment from your post.

hpooni

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Veralite communications with VoxComando
« Reply #24 on: January 26, 2014, 10:05:11 PM »
I meant, the http commands seem to be slower than using the vera api.
Thanks for letting me know but the actual codes are not in the log file.  I've deleted the file from my post anyway.