Author Topic: Telldus Tellstick Light control from VoxCommando (no  (Read 14620 times)

0 Members and 1 Guest are viewing this topic.

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #30 on: March 24, 2018, 03:44:00 PM »
Good summary Nimestar (although I would expect no less).

I don't use tells any more so I haven't really looked at this script in a while

One thing to check is that you can send commands that work from Telldus Command Center

maxwel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 1
    • View Profile
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #31 on: March 24, 2018, 05:10:56 PM »
What do you mean by "last xml file"? Can you please link to the forum post that contains the xml you are trying to use?

hi Nimester, I was trying to use this code but no succes
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.1.9-->
<commandGroup open="True" name=" tellstick" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1515" name="Discrete" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{1} {2}</param>
        <param>1000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.Hidden</cmdType>
      <params>
        <param>C:\Program Files\Telldus\tdtool.exe</param>
        <param>--{2}  "{1}"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>switchstate</param>
        <param>{1} </param>
        <param>{2}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>turn</phrase>
    <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\tellusdevices.xml</payloadFromXML>
    <payloadList>on,off</payloadList>
    <event>tell.lights</event>
  </command>
  <command id="1531" name="Toggle" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Map.Get</cmdType>
      <params>
        <param>switchstate</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result="{LastResult}".lower()</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Map.CreateTable</cmdType>
          <params>
            <param>switchstate</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Map.Set</cmdType>
          <params>
            <param>switchstate</param>
            <param>{1}</param>
            <param>off</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Map.Get</cmdType>
          <params>
            <param>switchstate</param>
            <param>{1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Reset</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;off</ifParams>
      <then>
        <action>
          <cmdType>Map.Set</cmdType>
          <params>
            <param>switchstate</param>
            <param>{1}</param>
            <param>on</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>on</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Launch.Hidden</cmdType>
          <params>
            <param>C:\Program Files\Telldus\tdtool.exe</param>
            <param>--on "{1}"</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Map.Set</cmdType>
          <params>
            <param>switchstate</param>
            <param>{1}</param>
            <param>off</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>off</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Launch.Hidden</cmdType>
          <params>
            <param>C:\Program Files\Telldus\tdtool.exe</param>
            <param>--off "{1}"</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\tellusdevices.xml</payloadFromXML>
    <phrase>please</phrase>
  </command>
  <command id="1541" name="Toggle" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>OK switching</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>(A)==(B)</ifType>
      <ifParams>{Var.lights}&amp;&amp;on</ifParams>
      <then>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>lights</param>
            <param>on</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>lights</param>
            <param>off</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>Launch.Hidden</cmdType>
      <params>
        <param>C:\Program Files\Telldus\tdtool.exe</param>
        <param>--{Var.lights} "Lounge Light"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.Hidden</cmdType>
      <params>
        <param>C:\Program Files\Telldus\tdtool.exe</param>
        <param>--{Var.lights} "Lounge Lamps"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>switchstate</param>
        <param>Lounge Light</param>
        <param>{Var.lights}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>switchstate</param>
        <param>Lounge Lamps</param>
        <param>{Var.lights}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{Var.lights}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Lights</phrase>
  </command>
  <command id="1567" name="List" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.Hidden</cmdType>
      <params>
        <param>tellusgetlist.bat</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>File.WriteLine</cmdType>
          <params>
            <param>tellusgetlist.bat</param>
            <param>del telduslist.txt</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.AppendLine</cmdType>
          <params>
            <param>tellusgetlist.bat</param>
            <param>"C:\Program Files\Telldus\tdtool.exe" --list &gt;&gt;telduslist.txt</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Launch.Hidden</cmdType>
          <params>
            <param>tellusgetlist.bat</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\tellusdevices.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>PayloadXML.NewFile</cmdType>
          <params>
            <param>payloads\tellusdevices.xml</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType />
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>Map.DropTable</cmdType>
      <params>
        <param>switchstate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.CreateTable</cmdType>
      <params>
        <param>switchstate</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Read</cmdType>
      <params>
        <param>telduslist.txt</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Parsing list of devices</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>(.*)\t(.*)\t(ON|OFF)\r</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>switchstate</param>
        <param>{Match.{i}.2}</param>
        <param>{Match.{i}.3}</param>
        <param>True</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\tellusdevices.xml</param>
        <param>{Match.{i}.2}</param>
        <param>{Match.{i}.2}</param>
        <param>False</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Parsed {#M} devices</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Refresh Tellus Devices</phrase>
  </command>
  <command id="1419" name="DiscreteAlternative" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>tell.lights</param>
        <param>{2}</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>turn</phrase>
    <payloadList>on,off</payloadList>
    <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\tellusdevices.xml</payloadFromXML>
  </command></commandGroup>
« Last Edit: March 24, 2018, 05:23:44 PM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #32 on: March 24, 2018, 05:30:36 PM »
I'm sorry but that is not enough information for me to help you.

You will need to explain exactly what you tried to do, and what kinds of error messages you are receiving. There is no other way we can help you.

For example:

1. I imported the command xml.
2. I saved and closed the command tree.
3. I executed the "List" command by saying "Refresh Tellus devices"
4. VoxCommando understood me and seemed to execute the command, but I see orange error messages in the History window and when I look at the telldus.xml payload XML file it is empty.
5. I enabled logging in VoxCommando and executed the "List" command again.
6. I have attached my log file to this post.

http://voxcommando.com/mediawiki/index.php?title=Log

NOTE: If it is difficult for you to write in English, please feel free to write in your own language. It is more important that you explain exactly what you are doing and what is happening. We can use Google Translate to read your explanation.
« Last Edit: March 24, 2018, 05:33:03 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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #33 on: March 24, 2018, 06:51:15 PM »
One thing to check is that you can send commands that work from Telldus Command Center

Also: Garry's suggestion is the first step.

If you can successfully send Telldus commands from the Telldus Command Center software, please confirm that this is working in your next post.
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)

maxwel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 1
    • View Profile
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #34 on: March 25, 2018, 10:31:44 AM »
Good morning Nimester,

I will try to give more detail and sorry for my bad english! I speak Dutch.
what I have done so far. in my telldus center software, everything works well. light goes on and off. I only set up one light with device name lounge.


I downloaded Garry's first xml file and the last xml file for Telldus, and i only change the location of the tdtool.exe bucause i use 64bit windows. I saved it in the command tree and closed it.  I executed the "List" command by saying "Refresh Tellus devices" VC understood me and seemed to execute the command but i get one orange error messages in the History window and error say unknown base action. when i look at the tellusdevices.xml in payload XML file. the is not empty. i have the device nam lounge in side. I have attached my log file to this post.

i really appreciate your help.
 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #35 on: March 25, 2018, 10:53:07 AM »
Based on the log you posted, it looks like it correctly scanned your devices and found one named "lounge".

Did you try to switch the lights by saying "turn lounge on", or "turn lounge off" ?

maxwel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 1
    • View Profile
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #36 on: March 25, 2018, 11:18:39 AM »
Oh i just try the magic word and it is working! Thank you guys!

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #37 on: March 25, 2018, 11:44:31 AM »
That's great news.

Just remember that you should be able to use the voice command "Show Help" or "What can I say?" to display a page with all your voice commands. The page will open up in your web browser.

It can be helpful when you import new commands into your configuration.

http://voxcommando.com/mediawiki/index.php?title=FAQ#General

If you are not using a standard configuration that comes with this command, you can click "Help > Build Voice Menu" instead.

But it is usually recommended that people install a standard configuration and then add commands as needed, because otherwise it is difficult to learn how to use the program.
« Last Edit: March 25, 2018, 12:25:58 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)

maxwel

  • Jr. Member
  • **
  • Posts: 39
  • Karma: 1
    • View Profile
Re: Telldus Tellstick Light control from VoxCommando (no
« Reply #38 on: March 25, 2018, 01:16:37 PM »
Hi nimester,

I was completely forgot to check the Build Voice Menu.. it is very helpful.  thank you again.