Author Topic: trigger name keeps changing  (Read 3804 times)

0 Members and 2 Guests are viewing this topic.

achel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 4
    • View Profile
trigger name keeps changing
« on: November 22, 2014, 07:10:22 AM »
I only got vera as I see it works in Vox, After trying to get my 4in1 multi-sensors work, which took a number of technical support phone calls. Turned out I needed to ask them to remove the flag that stops you from downgrading on their system that Auto updates the vera to ui7 and then I could downgrade to ui5 Seems they have a policy of Google not making their updates play nice, this took hours to Figure out.

What I'm trying to do is when Vera sends the status of the temperature of the room put that in a logic a<b 22 then send the ir code to the air con "only got usb urt because of vox You are a big influence on my purchases you need to get some sort of commission." Problem is it only triggers when the status is the same as the one I dragged and dropped across an attached to the Logic part
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.3-->
<command id="277" name="test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="70" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)&lt;(B)</ifType>
    <ifParams>{3}&amp;&amp;4</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>vera.Light.5.8</event>
</command>
I use a light sensor is easier to manipulate to test, I used osd instead of ir send for testing in the code above. "I was using bags of ice to try and cool the temperature sensor to get quicker results before.  :bonk" So when I get vera.Light.5.8 it works vera.Light.5.4 Does not.

I think I've got it right in the code above for Vox to use the payload from the light sensor report to work with in my logic
« Last Edit: November 22, 2014, 07:14:31 AM by achel »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: trigger name keeps changing
« Reply #1 on: November 22, 2014, 08:04:06 AM »
Hi achel, sorry, but I can't understand your question right - can you explain it more clear like:

I get an event from Vera in VC which contain a value as payload {X}. Then I will use a logic command in VC which send a ir command to my air con IF the value (A) is less than (B) ELSE "what ever", but it won't work.
It works fine when the value is ...


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

achel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 4
    • View Profile
Re: trigger name keeps changing
« Reply #2 on: November 22, 2014, 08:24:40 AM »
When vera sends me an event for lights. It comes as vera.light.5.11 I dragged and dropped that to my logic command.
But when vera sends an event where the light is different from the sensor e.g vera.light.x.x it wont trigger the logic command.
What I am wanting to do is when vera sends the light vera.light.x.x I want it to trigger my logic command no matter what the x.x is
I hope this makes sense, sorry for my rambling before.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: trigger name keeps changing
« Reply #3 on: November 22, 2014, 08:27:47 AM »
You can change your event name to use a wild card * instead.

In the event you're getting now -- vera.light.5.11 -- the 5 is the device ID and the 11 is the light reading. In order to get all light events for device 5 you can change the event name to vera.light.5.*
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)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: trigger name keeps changing
« Reply #4 on: November 22, 2014, 08:29:20 AM »
Haha, now I understand - that is easy to solve.

You can use a wild card in the event name: click on the event name in the editor tree and change it to vera.light.*
This will trigger the command when the event name contain vera.light.

I hope it works for you.

nime is faster  :bignod
***********  get excited and make things  **********

achel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 4
    • View Profile
Re: trigger name keeps changing
« Reply #5 on: November 22, 2014, 08:39:56 AM »
Thankyou so much guys for your time.
It works a treat now.
What else I would like to do is if it's  between 12am and 6am turn off that group that handles that event, but thats probably for another post.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: trigger name keeps changing
« Reply #6 on: November 22, 2014, 10:13:05 AM »
but thats probably for another post.

Yes.  I moved it to a new topic but it would be preferable if started a new post yourself when changing the topic.

http://voxcommando.com/forum/index.php?topic=1870.msg16208#msg16208
« Last Edit: December 28, 2014, 05:57:43 PM by nime5ter »

achel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 4
    • View Profile
Re: trigger name keeps changing
« Reply #7 on: November 22, 2014, 10:55:30 AM »
I do apologise for my sloppy behaviour with posting. It won't happen again.