Tags: 
3rd party HW-SW

NETIO AN28 describes how to control NETIO devices and read data from them with a Crestron control processor and the SIMPL environment. Http(s) and JSON are used.

 

Do you have any questions?

Crestron is a leading system for intelligent home automation. Thanks to its versatility and applications in many different areas, it has attracted customers world-wide. Crestron is used for intelligent control of homes as well as administrative and commercial buildings.

 

SIMPL by Crestron is a programming environment for Crestron central processors. Programs can be built quickly using logic symbols connected with signals. NETIO devices can be controlled using the JSON API over the http/https protocol.

 

NETIO power sockets can be easily and directly controlled from a Crestron system. For that purpose, ready-made NETIO Lite and NETIO Profi drivers are used.

 

This NETIO AN28 Application Note shows how to connect NETIO smart power sockets to a Crestron system.

 

 
Crestron 3-Series Control System

 

With NETIO smart sockets, Crestron can:

  • Switch any socket on or off
  • Toggle the state of any socket
  • Power-cycle (Short Off) a specified socket with the push of a button (NETIO Profi driver)
  • Read the energy consumption and immediate load at a socket (NETIO Profi driver) for NETIO devices that support power measurements

 

Available drivers:

 


 

Crestron NETIO driver

Lite

Profi

Profi & Support

    Control of all outputs (sockets) – On / Off / Toggle

Yes

Yes

Yes

    Switching an output on or off for a defined short time and then back (power cycling / restart)

-

Yes

Yes

    https – secure communication

Yes

Yes

Yes

    [V] – voltage measurement

Yes

Yes

Yes

    [Wh, Wh] – energy metering, long-term averages (weeks / months)

-

Yes

Yes

    [A, -, W] – electrical measurements – current, power output, ...

-

Yes

Yes

    Technical support

-

E-mail within 10 days

Email / call within 3 days

    Max. number of devices (IP addresses)

-

5

20

    Max. number of programs (processes)

-

1

5

    Price

Free

25€

100€

 

 

Configuring NETIO sockets for the CRESTRON AV driver – JSON API

NETIO power sockets can be connected using the HTTP/HTTPS protocol and the JSON API. In the web administration, configure the NETIO device as follows:

  • JSON API must be enabled at the NETIO device.
  • Enable READ-WRITE for JSON API so that values can be changed.
  • You may keep the existing username and password. To show the password, click Show password.

 

 

Preparing the SIMPL project

  1. Open an existing SIMPL project or create a new one.
  2. Download the package with the NETIO Lite or the NETIO Profi Crestron symbol (see the links above).
  3. In SIMPL Windows with the project open, select File>Import Archived Program. The archive actually does not contain a program, so the program in your project will not be overwritten.
  4. Copy your project folder location (Select Project Folder). It will change by selecting the archive.
  5. Select the archive file (Select Archive).
  6. Paste your project folder back (Select Project Folder).
  7. Choose where to store the Symbol, i.e. if it should be available in your projects only or for all projects. (In this example, we will use it in the project only.)
  8. Make sure Open Program is unchecked.
  9. Click Start.

 

 

  1. Now you can find the symbol in the Symbol Library (in this case under Project Modules).

 

 

  1. Drag the module to your project (Logic folder).

 

Configuring the symbol

For the purposes of this example, the configuration is demonstrated with the NETIO Lite symbol. The procedure is the same for other NETIO symbols.

  • Configure the connection using (default) parameters.
  • Use the HTTP protocol.
  • Enter the address of the NETIO smart socket device.
  • Leave the port set to 0d (the default port 80 for the respective protocol will be used).
  • Set the refresh time to 1 second.
  • Enter the username and password for READ-WRITE access as configured in the NETIO device.
  • Connect the connect and the keepUpdate signals to 1 so that the symbol connects to the NETIO device immediately after start and keeps the socket in the state corresponding to the setState signal.
  • The setState signal controls the socket, and the state signal shows its actual state (0 = off, 1 = on).

For NETIO devices with multiple sockets, right-click setState or state and select Insert Signal/Parameter Field.

 

 

Testing

The simplest way to test is to use the SIMPL Debugger (in Crestron Toolbox). Load the program to the control processor and connect the debugger. When the program starts, the connected signal should rise to 1. In that case, the power measurement output signals will indicate the measured values, and the setState signal can be used to set the state of the NETIO socket.

 

Troubleshooting

  1. The connected signal does not change to 1
    1. Use the ping command in a text console (in Crestron Toolbox) to test the reachability of the NETIO device from the control processor. Example: “ping 192.168.1.110”. The reply should look like: “Reply from 10.5.2.114: Echo size=32 time=1ms TTL=63”.
    2. Make sure that JSON API is enabled in the NETIO device.
    3. https – secure communication
      Make sure that the correct http or https connection is used. Browse to the web interface of the NETIO device and note whether it opens over http or https. The same protocol needs to be selected in the symbol. In the NETIO device, you can switch from http to https or vice versa in “Settings/Security Settings (Turn on secure connection (HTTPS))”.

 

FAQ

1) Is it possible to use the same driver for all NETIO sockets?

For basic functions, the NETIO Lite symbol can be used with all types of NETIO sockets that support the JSON API.  For more advanced functions, a specific symbol is available for each socket type.

 

2) How fast does the program react?

The response to http JSON API is quite fast, you can expect immediate response.

 

3) Is it necessary to physically have a NETIO smart socket device for testing?

No, your application can be tested with the online demos that NETIO makes available for you.

To access the NETIO online demos, log in as demo / demo at the following websites:

http://pc-rest.netio-products.com:22888/

https://netio-4c.netio-products.com/

http://powerpdu-4ps.netio-products.com:22888/

http://powerbox-3px.netio-products.com:22888

http://powerdin-4pz.netio-products.com:22888

http://netio-4all.netio-products.com/

http://netio-4.netio-products.com/

 

4) Can I use the NETIO Mobile / Mobile2 app together with the connection to Crestron?

Yes, the NETIO Mobile app can be used in parallel with M2M API protocols.

 

5) Can I use NETIO Cloud together with the connection to Crestron?

Yes, NETIO Cloud can be used in parallel with M2M API protocols.

 

6) Where can I get NETIO-Crestron drivers?

 

Supported FW versions of NETIO smart sockets

  • PowerPDU 4C: firmware 3.3.1 or later
  • PowerPDU 4PS: firmware 2.4.4 or later
  • PowerBOX 3Px: firmware 2.4.4 or later
  • PowerCable REST 101x: firmware 2.3.9 or later
  • NETIO 4 and NETIO 4All: firmware 3.3.1 or later

 

Ask for a price or technical parameters

For device testing use name/password demo/demo