Author Topic: Scrape.Post: unexpected error  (Read 2694 times)

0 Members and 1 Guest are viewing this topic.

PegLegTV

  • $upporter
  • Hero Member
  • *****
  • Posts: 500
  • Karma: 43
    • View Profile
Scrape.Post: unexpected error
« on: June 27, 2015, 02:12:42 AM »
when I try to use my MyMultiWemo commands and they are set to the wrong port, instead of triggering "Wemo.RotatePort" the scrape.post action is showing as successful but then i have "Scrape.Post: unexpected error" under it like so





ocasionaly it works and triggers "Wemo.RotatePort" but most of the time it is failing on me
in order for these commands to trigger "Wemo.RotatePort" then the last actions needs to fail but its showing as it was successful and I'm not sure if this is a bug or if I'm missing something


This is the command group that I am using
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<commandGroup open="True" name="Chrstmas WeMo's" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1247" name="!!! Run once to set up MultiWeMo map table !!!!change ip addresses!!!!" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="You can create the table by hand or using this command.  Be sure to set the IP addresses names correctly. after executing this command then it can be deleted ">
    <action>
      <cmdType>Map.CreateTable</cmdType>
      <params>
        <param>MultiWeMos</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>MultiWeMos</param>
        <param>Decoration</param>
        <param>192.168.1.249:49153</param>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>MultiWeMos</param>
        <param>Big Tree</param>
        <param>192.168.1.248:49153</param>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>MultiWeMos</param>
        <param>Little Tree</param>
        <param>192.168.1.247:49153</param>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="786" name="Turn wemo on" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape.Post</cmdType>
      <params>
        <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
        <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;1&lt;/BinaryState&gt;&lt;/u:GetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
        <param />
        <param />
        <param>text/xml; charset="utf-8"</param>
        <param>SOAPAction: "urn:Belkin:service:basicevent:1#GetBinaryState"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>{lastResult}&amp;&amp;{Empty}</ifParams>
      <then>
        <action>
          <cmdType>Scrape.Post</cmdType>
          <params>
            <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
            <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;1&lt;/BinaryState&gt;&lt;/u:SetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
            <param />
            <param />
            <param>text/xml; charset="utf-8"</param>
            <param>SOAPAction: "urn:Belkin:service:basicevent:1#SetBinaryState"</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Wemo.RotatePort</param>
            <param>{1}</param>
            <param>WeMo On</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Turn</phrase>
    <payloadList>Decoration, Big Tree, Little Tree</payloadList>
    <phrase>wemo on</phrase>
    <event>WeMo On</event>
  </command>
  <command id="800" name="Turn wemo off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape.Post</cmdType>
      <params>
        <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
        <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;1&lt;/BinaryState&gt;&lt;/u:GetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
        <param />
        <param />
        <param>text/xml; charset="utf-8"</param>
        <param>SOAPAction: "urn:Belkin:service:basicevent:1#GetBinaryState"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Scrape.Post</cmdType>
          <params>
            <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
            <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;0&lt;/BinaryState&gt;&lt;/u:SetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
            <param />
            <param />
            <param>text/xml; charset="utf-8"</param>
            <param>SOAPAction: "urn:Belkin:service:basicevent:1#SetBinaryState"</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Wemo.RotatePort</param>
            <param>{1}</param>
            <param>WeMo Off</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Turn</phrase>
    <payloadList>Decoration, Big Tree, Little Tree</payloadList>
    <phrase>wemo off</phrase>
    <event>WeMo Off</event>
  </command>
  <command id="830" name="Toggle wemo" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape.Post</cmdType>
      <params>
        <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
        <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;1&lt;/BinaryState&gt;&lt;/u:GetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
        <param />
        <param />
        <param>text/xml; charset="utf-8"</param>
        <param>SOAPAction: "urn:Belkin:service:basicevent:1#GetBinaryState"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>BinaryState&gt;([01])&lt;/BinaryState</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>Wemo.RotatePort</param>
            <param>{1}</param>
            <param>Toggle WeMo</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)==(B)</ifType>
      <ifParams>{Match.1}&amp;&amp;1</ifParams>
      <then>
        <action>
          <cmdType>Scrape.Post</cmdType>
          <params>
            <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
            <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;0&lt;/BinaryState&gt;&lt;/u:SetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
            <param />
            <param />
            <param>text/xml; charset="utf-8"</param>
            <param>SOAPAction: "urn:Belkin:service:basicevent:1#SetBinaryState"</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Scrape.Post</cmdType>
          <params>
            <param>http://{M:MultiWeMos.{1}}/upnp/control/basicevent1</param>
            <param>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;&lt;u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt;&lt;BinaryState&gt;1&lt;/BinaryState&gt;&lt;/u:SetBinaryState&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;</param>
            <param />
            <param />
            <param>text/xml; charset="utf-8"</param>
            <param>SOAPAction: "urn:Belkin:service:basicevent:1#SetBinaryState"</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>toggle</phrase>
    <payloadList>Decoration, Big Tree, Little Tree</payloadList>
    <phrase>wemo</phrase>
    <event>Toggle WeMo</event>
  </command>
  <command id="804" name="rotate port" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Testing Next Port</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Get</cmdType>
      <params>
        <param>MultiWeMos</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>:49155</param>
        <param>:looparound</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>:49154</param>
        <param>:49155</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>:49153</param>
        <param>:49154</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>:looparound</param>
        <param>:49153</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>MultiWeMos</param>
        <param>{1}</param>
        <param>{LastResult}</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VcAdvanced.Log</cmdType>
      <params>
        <param>Setting Wemo {1} addr. to {LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>{2}</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Wemo.RotatePort</event>
  </command>
</commandGroup>


I have tested this on windows 7 and windows 8.1 and seeing the same problem on both

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Scrape.Post: unexpected error
« Reply #1 on: June 27, 2015, 10:03:18 AM »
Thanks.  I'll post a fix soon.

It seems every time I fix something in scrape I break something else.  :bonk

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando

PegLegTV

  • $upporter
  • Hero Member
  • *****
  • Posts: 500
  • Karma: 43
    • View Profile
Re: Scrape.Post: unexpected error
« Reply #3 on: June 28, 2015, 02:36:50 PM »
sweet thanks  ;D

PegLegTV

  • $upporter
  • Hero Member
  • *****
  • Posts: 500
  • Karma: 43
    • View Profile
Re: Scrape.Post: unexpected error
« Reply #4 on: June 28, 2015, 03:05:13 PM »
tested it out a couple times and seems to work great Thanks  ;D

I don't want to be the one to report another bug :-X how ever when I start VC it now pops up this warning for each of my watchers and then it removes them from the watcher plugin

Quote
<Watcher><watcherName>AMC</watcherName><executeActions>False</executeActions><watchFolder>C:\Users\nancy\Desktop\Test\AMC</watchFolder><fileFilter>*.*</fileFilter><deleteWhenFinished>False</deleteWhenFinished><watchSubfolders>True</watchSubfolders></Watcher>

System.NullReferenceException: Object reference not set to an instance of an object.

   at vcPlugin.pluginOptions.loadOptionsFromXml()



 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Scrape.Post: unexpected error
« Reply #5 on: June 28, 2015, 03:17:07 PM »
OK.  I can see that it is failing to load watchers that were saved in an older version of the plugin, but surely if you save your watcher options in the new version they will still be loaded without error the next time you start VC?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Scrape.Post: unexpected error
« Reply #6 on: June 28, 2015, 03:23:39 PM »
I think this will fix it.

PegLegTV

  • $upporter
  • Hero Member
  • *****
  • Posts: 500
  • Karma: 43
    • View Profile
Re: Scrape.Post: unexpected error
« Reply #7 on: June 28, 2015, 03:39:59 PM »
yep that fixed the problem, thanks cause right now I'm using 18 different watchers  ;D