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" .”
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:
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>