Author Topic: Issue with Aeon Labs Multi sensor and TTS  (Read 2423 times)

0 Members and 1 Guest are viewing this topic.

ryz4eva

  • Jr. Member
  • **
  • Posts: 40
  • Karma: -2
  • Chasing The Tech Dragon
    • View Profile
Issue with Aeon Labs Multi sensor and TTS
« on: May 19, 2014, 10:54:34 AM »
i have created the following command:


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.2.2-->
<command id="2102" name="Sensor Stats" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{1}&amp;&amp;Temperature</ifParams>
    <then>
      <action>
        <cmdType>Vera.Get.Temperature</cmdType>
        <params>
          <param>07</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.SpeakSync</cmdType>
        <params>
          <param>{LastResult} degrees</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;Humidity</ifParams>
    <then>
      <action>
        <cmdType>Vera.Get.Humidity</cmdType>
        <params>
          <param>9</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.SpeakSync</cmdType>
        <params>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;Light Level</ifParams>
    <then>
      <action>
        <cmdType>Vera.Get.LightLevel</cmdType>
        <params>
          <param>8</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>Whats The</phrase>
  <payloadList>Temperature, Humidity, Light Level</payloadList>
  <phrase optional="true">In My Room</phrase>
</command>

however im having 2 issues with this.

i originally intended to use a payload xml for telling vox which stat to poll instead of a logic (as it will be easier when it comes time to expand my vera system) however the only aspect of the multisensor which shows up in the sensors.xml is the motion detector, neglating the humidity, light and temperature sensors.

ive checked with the sensors and they all run the correct device type (for example, the temperature sensor runs the urn:schemas-micasaverde-com:device:TemperatureSensor:1 service)

secondly, whenever i attempt to run this, the {lastresult} returns back whatever was before i tried (mostly "now playing..." from the xbmc side of things).

wondering if anyone can help out?
Rocking:
Lenovo Ideapad Z580
Samsung Galaxy Note 10.1
LG Nexus 4
Voxcommando
Eventghost
XBMC Frodo
Vera Lite

View my site to see what im up to with vox...

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Issue with Aeon Labs Multi sensor and TTS
« Reply #1 on: May 19, 2014, 12:16:54 PM »
No way of knowing why it isn't working without seeing what kind of feedback you're getting from VC (e.g. http://voxcommando.com/mediawiki/index.php?title=Log).

Have you reviewed the feedback that you're receiving in the history panel? That, or enabling logging, is the only way to effectively trouble shoot when a command is not doing what you expect it to do.

When you look at your Vera web page, is it correctly reporting those sensor values for your Aeon device?

Your command looks fine if the device IDs you've used are correct. It works for me with my devices.

{LastResult} is always the value returned by your last *successfully executed* command action (designed to return some kind of value--not all actions return values). So if your sensor is either not working or not being read correctly for whatever reason, then you will get the result from whatever previous action designed to return a result was -- it could be a music request or whatever. If your sensor is not being found or not returning some kind of value, this will show up in your history window when you issue your command.

You can always create your own  payload xml file by editing the devices.xml file and saving it under another another name so as not to overwrite the main devices payload xml. You'll probably want to edit that kind of payload file anyhow once you build up a bigger collection of devices, since it's not likely that they will have useful and distinct names designed for natural command phrases unless you're careful to label them that way from the start.

How did you intend to query different types of sensor information in one command without using logic, given that they require different types of actions?

It might make more sense to have different commands depending on the type of information you're wanting to get back:

1. "What is the temperature in the (bedroom/outside/downstairs)?" (payload file = temp sensors)
2. "How bright is it in [the] (bedroom/outside/downstairs)?" (payload file = light sensors)
3. "Is there someone in the/at the (living room/front door/downstairs)?" (payload file = motion sensors -- which is currently what is automatically generated as sensors.xml)

etc.
« Last Edit: May 19, 2014, 12:21:00 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: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Issue with Aeon Labs Multi sensor and TTS
« Reply #2 on: May 19, 2014, 05:27:45 PM »
Your command works fine for me.  If you have configured the plugin correctly and you are providing the correct IDs then it should work fine.  Read nime5ters post for hints on how to figure out what is going on.

You can create your own custom payload xml files if you don't like the ones that are generated by the plugin by default.  I recommend you make copies of devices.xml (which contains all devices) and then edit it down to the specific ones for your category.

It think it will be much better to create one command for Temperature, one command for light, and one for humidity, especially if you want to use payload xml files for multiple rooms, instead of trying to put everything into one command.  There is no advantage to doing that as far as I can tell and it just makes it more difficult to implement.

edit: I realize I am pretty much just repeating everything that nime5ter said, but I'll leave my post here in case it makes it easier to understand by reading it two different ways...  :biglaugh
« Last Edit: May 19, 2014, 05:30:14 PM by jitterjames »