Author Topic: IP Power 9258  (Read 5927 times)

0 Members and 1 Guest are viewing this topic.

mdsh

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
IP Power 9258
« on: September 07, 2013, 01:23:53 AM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #1 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

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: IP Power 9258
« Reply #2 on: September 07, 2013, 11:36:59 AM »
thanks!  :D

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: IP Power 9258
« Reply #3 on: September 07, 2013, 02:28:55 PM »
also just incase you can remember your IP of you device... like me from time to time this is handy

can't ?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: IP Power 9258
« Reply #4 on: September 07, 2013, 03:49:31 PM »
Just in case you find it useful, (or educational) here is a single command to turn any unit on, or off

Code: [Select]
<?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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #5 on: September 08, 2013, 01:48:40 AM »
Quote
can'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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #6 on: September 08, 2013, 02:15:23 AM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #7 on: September 08, 2013, 02:29:20 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: IP Power 9258
« Reply #8 on: September 08, 2013, 10:01:37 AM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #9 on: September 09, 2013, 01:27:43 AM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #10 on: September 09, 2013, 05:43:41 AM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: IP Power 9258
« Reply #11 on: September 09, 2013, 06:36:24 AM »
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

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: IP Power 9258
« Reply #12 on: September 09, 2013, 08:25:18 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: IP Power 9258
« Reply #13 on: September 09, 2013, 08:46:29 AM »
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.
« Last Edit: September 09, 2013, 08:54:29 AM by nime5ter »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: IP Power 9258
« Reply #14 on: September 09, 2013, 06:45:52 PM »
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.