Switch Interface (SI) Set-Up and Installation
Set-Up
By default the SI is configured with an IP address of 192.168.0.77 and will be monitoring port 80 for a standard HTTP connection. You will most likely want to change at least the IP of the unit. The guide below will show how to modify the IP address, in this example we will change the IP address to 192.168.100.50 and the port to 88.
- If your Local Area Network is on the subnet where the IP address starts with 192.168.0.x, you can plug the SI CAT5 straight into your LAN (on the assumption you don't already have a device with an IP address of the default 192.168.0.77). Otherwise plug the SI CAT5 connector straight into the Ethernet port on a PC. If you plug straight into the PC you will probably have to set a static IP on your PC to something like 192.168.0.70 - see [this guide] if you are unsure how to do that.
- Open a web browser and connect to http://192.168.0.77, you should see something like:
This is the data returned by the SI, what it means will be covered later, but for now it proves we have a connection.
- To change the IP address to 192.168.100.50 we send the command in the URL:
http://192.168.0.77?ip=192.168.100.50
This will cause an immediate reboot and your browser will fail to load the page because the IP address has now changed. You may need to change the IP address of your PC again at this stage to make sure you are on the same LAN as the SI. Follow the guide mentioned above to set your PC IP address to 192.168.0.49.
Now try connecting to:
http://192.168.100.50
and you should once again see the returned data from the SI.
- To change the port used by the SI to 88, send the command in the URL:
http://192.168.100.50?port=88
This will cause an immediate change of the port monitored by the SI so once again your browser will fail to connect. This time you need to include the port after the IP address:
http://192.168.100.50:88
This should again show us the data returned by the SI.
At this stage the SI is ready to install.
Installing
- Decide on your prefered location for the SI, make sure you can get power and the CAT5 cable to it.
- Drill holes in the case for cable entry - this is best when the entry point won't be seen once the unit is mounted.
- Attach the CAT5 cable then the power cable.
- Power on.
- Using a web browser, connect to the SI to check it is sending data as expected.
Further Configuration
In order to restrict who can control the SI, a PIN can be set up. This is a simple 2-byte integer (a number between 1-32000*) and once set it must be used to make any changes (including the PIN) so don't forget it! However, if you do forget it, you can do a factory reset (see below).
To set a PIN of 12345 we would need to send a command in the URL (replace the default IP with what ever IP you have configured the SI with):
http://192.168.0.77?sec=12345
The SI is now configured with a PIN and all commands will be ignored unless this PIN is sent first.
If you decide you don't like this PIN you can change it, but must enter it before the command to change it, let's say to 112233:
http://192.168.0.77?pin=12345&sec=112233
This will immediately change the PIN.
*Yes, we know a 2-byte integer is slightly higher, so help yourself.
Sending Commands to the SI
Commands are sent as part of the URL and are sent as a name/value pair. As with typical GET variables, multiple variables can be sent at once, separated by &
The command set is described below:
NAME |
VALUES |
ACTION |
r1 |
Turn relay 1 on or off |
0=off 1=on |
r2 |
Turn relay 2 on or off |
0=off 1=on |
r3 |
Turn relay 3 on or off |
0=off 1=on |
r4 |
Turn relay 4 on or off |
0=off 1=on |
sec |
1-32000 |
Set a PIN for the SI (set to 0 to turn off PIN access) |
pin |
What ever PIN has been set |
PIN used to allow control of the SI |
port |
A valid TCP/IP port |
Used to set which port the SI monitors |
ip |
A valid TCP/IP address |
The address the SI will be located at on the network |
It should be noted that a relay set to auto mode will not respond to manual.
URL Command Examples
COMMAND |
ACTION |
http://192.168.0.77?r1=1 |
Turn relay 1 on |
http://192.168.0.77?r1=0 |
Turn relay 1 off |
http://192.168.0.77?r4=0 |
Turn relay 4 off |
http://192.168.0.77?r4=0&r1=1 |
Turn relay 4 off THEN turn relay 1 on |
http://192.168.0.77?ip=192.168.10.1 |
Change the IP addressNOTE1 |
http://192.168.0.77?r3=1&ip=192.168.10.1 |
Turn relay 3 on THENNOTE2 change the IP address |
http://192.168.0.77?port=88 |
Change the server port to 88NOTE3 |
http://192.168.0.77?sec=4321 |
Set PIN to 4321NOTE4 |
http://192.168.0.77?pin=4321&r1=1 |
Send a command with PIN enabled, turning relay 1 onNOTE6 |
NOTES:
NOTE1 Changing the IP address will cause an immediate reboot and a new connection will have to be made to the new IP address.
NOTE2 Multiple commands on the URL line will be processed in order. If the IP had been changed first, the relay state would not be changed as the change of IP causes a reboot.
NOTE3 Changing the server port will cause an immediate reboot and a new connection will have to be made to the new server port at the same IP address.
NOTE4 Set a security PIN (from 1 to 32000) - once set any command will be ignored unless the PIN has been sent before the command.
NOTE5 If a PIN has been set, it must be sent first.
It should be noted that the IP address and port can not be changed on one line as each change will cause an immediate reboot.
Reading Data From the SI
A full set of data is returned by the SI upon any request, a PIN (if set up) is not necessary to read the data. The data will be returned as a set of lines similar to:
- The first and only line is the status of each of the relays, in order of RLA4 to RLA1. 0 means the relay is off and 1 means the relay is on.
Factory Reset
Should you forget the PIN or IP address, you can force a factory reset.
- Power off the SI.
- Insert a link as shown in the diagram.
- Power on the SI.
- Wait 20 seconds then power off the SI.
- Remove the link.
- Power on the SI.
After a factory reset, the default settings are restored, this includes the IP address and port. You will have to connect to http://192.168.0.77 to make any changes.