Synaccess Power Switch / HTTP

2013 · 2 replies · Devices

This discussion is 13 years old. It predates today's Roomie Remote X, and the app names, menus, features, pricing, and device details below have changed substantially since 2013. Treat it as historical reference — see Support and current compatibility for how things work today.

In short

I just purchased a Synaccess NP-05B power strip that can be controlled via HTTP, Telnet or RS-232 in order to be able to — Staff replied: “If you just use a generic URL command (no custom codes required), then you would use standard URL format for authentication: If you want to use custom codes, just insert two commands: .AUTH 1 FORMAT, value = "Username" .”

Question 2013-02 · older version

I just purchased a Synaccess NP-05B power strip that can be controlled via HTTP, Telnet or RS-232 in order to be able to use Roomie to switch on and off two power amps in my home theater that I currently have to manually switch on and off.

I configured the NP-05B and can control any of the 5 outlets from my iPhone and Mac using HTTP in Safari, but the NP-05B does not respond to commands sent from Roomie.

As an example, a command to power on outlet 1 is:

10.0.1.230/cmd.cgi?A3%201%201

What I think might be causing the problem is that the NP-05B does not allow anonymous users to issue commands via HTTP. When I first issued the command in Safari I got an authentication pop-up that asked me enter my user name and password. I didn't see anything in the Roomie Development kit that explains how to handle HTTP authentication (or if it can be done).

As a workaround, I can use a Roomie action to open a URL but it only works if I set Roomie to open the URL in Safari, which of course takes me out of Roomie. If I use the "Silent" option or select the internal Roomie browser, the command fails.

Is there any way other than the workaround I described to get Roomie to send HTTP commands to the NP-05B (i.e., is there some way to automatically send a user name and password in response to an HTTP authentication request)? I think authentication would only need to be done once (or at least that's how it appears to work with Safari).

Below is the RoomieCodes.plist as I currently have it defined for testing. Thanks for any help you can offer!

<blockquote>

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<array>

<dict>

<key>brand</key>

<string>Synaccess</string>

<key>cat</key>

<string>NP-05B</string>

<key>codes</key>

<dict>

<key>POWER OFF 1</key>

<string>/cmd.cgi?$A3%201%200</string>

<key>POWER ON 1</key>

<string>/cmd.cgi?$A3%201%201</string>

</dict>

<key>method</key>

<string>http</string>

<key>type</key>

<integer>21</integer>

</dict>

</array>

</plist>

</blockquote>

Roomie Staff 2013-02 · older version

If you just use a generic URL command (no custom codes required), then you would use standard URL format for authentication:

username:password@IPAddress/cmd

If you want to use custom codes, just insert two commands:

.AUTH 1 FORMAT, value = "Username"

.AUTH 2 FORMAT, value = "Password"

With an HTTP method, that will have the same affect as an authentication URL. You will need to type your username/password into the device when adding it.

Member 2013-02 · older version

Thank you! Both methods worked perfectly, but I ended up going with the custom codes since it was easier to program my system using them.

If anyone is interested in a power switching device that works with Roomie, Amazon currently has 3 of the Synaccess devices listed (a 2 outlet, a 5 outlet and an 8 outlet). All are sold by Synaccess (not Amazon), but my order was shipped very quickly (ordered on a Thursday and received it on a Saturday).

Below is the plist to control the 5 outlets on the RBP-05 that I purchased (plus an extra option for all-on / all-off).

Thank you again for the help -- it is greatly appreciated!

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<array>

<dict>

<key>brand</key>

<string>Synaccess</string>

<key>cat</key>

<string>NP-05B</string>

<key>codes</key>

<dict>

<key>.AUTH 1 FORMAT</key>

<string>Username</string>

<key>.AUTH 2 FORMAT</key>

<string>Password</string>

<key>POWER OFF 1</key>

<string>/cmd.cgi?$A3%201%200</string>

<key>POWER OFF 2</key>

<string>/cmd.cgi?$A3%202%200</string>

<key>POWER OFF 3</key>

<string>/cmd.cgi?$A3%203%200</string>

<key>POWER OFF 4</key>

<string>/cmd.cgi?$A3%204%200</string>

<key>POWER OFF 5</key>

<string>/cmd.cgi?$A3%205%200</string>

<key>POWER OFF ALL</key>

<string>/cmd.cgi?$A7%200</string>

<key>POWER ON 1</key>

<string>/cmd.cgi?$A3%201%201</string>

<key>POWER ON 2</key>

<string>/cmd.cgi?$A3%202%201</string>

<key>POWER ON 3</key>

<string>/cmd.cgi?$A3%203%201</string>

<key>POWER ON 4</key>

<string>/cmd.cgi?$A3%204%201</string>

<key>POWER ON 5</key>

<string>/cmd.cgi?$A3%205%201</string>

<key>POWER ON ALL</key>

<string>/cmd.cgi?$A7%201</string>

</dict>

<key>method</key>

<string>http</string>

<key>type</key>

<integer>21</integer>

</dict>

</array>

</plist>

Related threads

Today's Roomie controls 400,000+ devices.

Roomie Remote X brings TVs, receivers, streamers, lights, and whole-home audio into one app on iPhone, iPad, Mac, and Apple TV.

Download Roomie Remote X