Controlling NETIO power switching from uOS
This guide explains how to control your NETIO PDU from uOS, uControl App and uControl Remote.
What this guide will cover:
- Understanding switching outputs, batches, ports and their status.
- How to create a NETIO API so that you can control power in the property.
- How to add that API into uOS.
Important: you must have the IP for NETIO first
You can get the IP address of your NETIO by:
- Using a network scanner application like Fing on your mobile phone to scan your network.
- Log into your wireless router and look up NETIO in the DHCP table.
For the purposes of this guide we are going to pretend that your NETIO PDU is on IP address 192.168.1.15 and your uOS device (MHUB, MZMA or Zone Processor) is on 192.168.1.196. We will use this to illustrate all examples moving forward.
NETIO ports are simple, port 1 is equal to 1 (p=1) and port 2 is equal to 2 (p=2) and so on. When typing your commands, make sure to follow this logic.
What a typical NETIO API looks like
http://192.168.1.15/netio.cgi?pass=1234abcd&output1=1
In the example above we are going to send a command to the Netio PDU (at 192.168.1.15) to execute a power switch turning output 1 to ON.
Understanding what those variables in the API above mean:
This is the authentication and is user definable and can be changed to the name of the device owner on the NETIO web UI.
output=
This is the command variable(s):
- 0 – Turn OFF
- 1 – Turn ON
- 2 – Short OFF delay (restart)
- 3 – Short ON delay
- 4 – Toggle (invert the state)
- 5 – No change
- 6 – Ignored
“&”
This sign allows you to add parameters to your command, every command must be linked by it.
Testing your APIs
We recommend that you test every API before you enter them into uOS. All IP based APIs have different requirements when it comes to testing but the NETIO API is great because it is super simple.
To test your API, open a web browser and enter the full API in the URL window and hit enter.
If you get a response in the web browser similar to the one below, and you heard the NETIO PDU tick to signify a switch, then you’re good to take this command and put it into uOS:
If it doesn’t work then try the following:
- Make sure the IP address is correct.
- Make sure that you do not have any typos.
- Ensure that your IDs are correct and that you’re observing the correct PDU switch.
- Make sure that the structure of the API matches our example no spaces, no special characters, data is in the correct case (often lowercase).
How to add your APIs into uControl
Need more help with the API? Get in touch.
All HDA staff are able to help with any API questions you might have including any advanced features. Get in touch for help or assistance.