News:

VoxCommando works with Amazon Echo, Domoticz, EventGhost, Google Assistant, IFTTT, iTunes, J.River Media Center, Kodi, MediaMonkey, Nest, Philips Hue, Vera, Wemo, and the list keeps growing!

Main Menu

IP Power 9258

Started by mdsh, September 07, 2013, 01:23:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mdsh

Just incase someone has an IP Power 9258 from (now) Aviosys. Here are the on\off commands for the outlets. Nothing fancy but will save someone some time  :P

mdsh

also just incase you can remember your IP of you device... like me from time to time this is handy

jitterjames


jitterjames

Quote from: mdsh on September 07, 2013, 01:36:06 AM
also just incase you can remember your IP of you device... like me from time to time this is handy

can't ?

jitterjames

Just in case you find it useful, (or educational) here is a single command to turn any unit on, or off

<?xml version="1.0" encoding="utf-16"?>
<command id="416" name="Turn unit {1} {2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{2}&amp;&amp;on</ifParams>
    <then>
      <action>
        <cmdType>Scrape</cmdType>
        <cmdString>http://192.168.1.221/Set.cmd?CMD=SetPower+P6{1}=1&amp;&amp;admin&amp;&amp;12345678</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Scrape</cmdType>
        <cmdString>http://192.168.1.221/Set.cmd?CMD=SetPower+P6{1}=0&amp;&amp;admin&amp;&amp;12345678</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <phrase>turn unit</phrase>
  <payloadRange>1,6</payloadRange>
  <payloadList>on, off</payloadList>
</command>


I can't test it, so I hope I didn't make a mistake!

mdsh

Quotecan't ?
yup sorry meant to read. If you CAN'T remember your IP  ::zzz
Thanks


On the code front thank you very much. Worked like a charm! Just the only thing that gets you is that out of normal habit it might not work. with the unit starting it's numbering P60 = oulet 1 and P61 = outlet 2 etc you out of habit will say "turn unit 1 on" and this will in turn do P61 and power on port 2. Guess I could give each outlet a name P60 = lamps P61 = TV or something to counter this perhaps.

Think I might actually try this now :)

Thanks for the code James. Got me thinking about some other things now  ;D I Love vox!! how did we ever do things without it

mdsh

Ok... am I just thinking about things wrong here. I created an action [attachment=1] similar to the one James uploaded. Just with a PHRASE ONLY xml payload [attachment=2]. In this payload (attached) I set P60 as lamps and P61 as TV. Within my action I am using it as payload one and the on, off payload is stil my value 2

The actual IP Power device makes its beeps as it normally does when receiving code but doesnt switch on or off. Just stays in its current state.

Is the the best way to approach this or is there perhaps another route I should take with this perhaps?

mdsh

at least I know more now :)

Did a test with OSD in my action and it does return - <htrml>HTTPCMD_BADPARRAM<html>  :biglaugh
and so the hunt begins to see where I went wrong

jitterjames

Take a look in the history window at the scrape action to see what url is actually being sent after substituting the payloads.  This will give you a hint of what you did wrong...

You should be using a phrase/value payload xml.  You are using phrase only so your scrape action is using the name of the device instead of P60, P61 etc.

mdsh

Thanks James, I will give this a go tonight once I get home. Was thinking it might be something small  ;)

PS love the new profile pic!!

mdsh

You were right James. Looking at the history it does print LAMPS instead of P60 as eg.

Quickly building a new action... Lets hope  :P

mdsh

So still no luck... But in the interest of me troubleshooting I just want to confirm that I am approaching this right.

In the attached image am I right in thinking IP power test.xml would be PAYLOAD {1} and the on,off payload is {2} (#2 works just fine). So the xml is configured as Value: P60 and the Phrase is lamps but the history still shows lamps instead of P60 for the URL in the action http://192.168.1.221/Set.cmd?CMD=SetPower+{1}=1

Thanks in advance for any help and for all the help thus far.

Kalle

Hi mdsh, can you post the code from your command? So I can also take a look on it.
***********  get excited and make things  **********

jitterjames

#13
Maybe just need to save and close the editor to apply changes?

You could use "purge cache" and then "build missing grammars".

http://voxcommando.com/mediawiki/index.php?title=Main_Menu#Purge_Cache

I need to look into this.  It might be a bug where VC doesn't recognise that the group needs updating after changing only the payload XML type.

jitterjames

Quote from: jitterjames on September 09, 2013, 08:46:29 AM
I need to look into this.  It might be a bug where VC doesn't recognise that the group needs updating after changing only the payload XML type.

It's OK.  I checked, and it seems to update automatically, as it should.