AN26 MS Azure and NETIO 4x – Power metering and output control from a cloud service | NETIO products: Smart power sockets controlled over LAN and WiFi
Tags: 
User library

AN26 shows how to connect NETIO smart sockets with the IoT Hub (part of MS Azure). Standard M2M MQTT for NETIO 4x products is used. MQTT flex is not supported.

Do you have any questions?

 

Supported devices: NETIO 4All, PowerPDU 4C, NETIO 4

 

NETIO 4x smart socket devices can be connected using the MQTT M2M protocol to the MS Azure IoT Hub. This Application Note demonstrates how to do it using the Device Explorer (Device Explorer Twin) tool. This tool also allows to monitor the communication between the IoT Hub and the NETIO device.

 

MS Azure IoT Hub and NETIO 4x smart sockets

The first step in connecting your NETIO device to MS Azure is the creation of an IoT Hub. This is done in MS Azure (https://azure.microsoft.com/).


 

The NETIO device can be connected to the IoT Hub either directly in Azure, or using the Device Explorer tool. First, download SetupDeviceExplorer.msi from the https://github.com/Azure/azure-iot-sdk-csharp/releases page.

 

Then, install the tool and start it.

 

When started, the tool displays the following window:

 

In the IoT Hub Connection String field, enter the Connection String for your IoT Hub and click Update to confirm the connection. The Connection String needs to be obtained from MS Azure after registering the NETIO device to the IoT Hub (for detailed instructions, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-csharp-csharp-device-management-get-started).

 

If the connection is successful, the following window appears:

 

Now add the NETIO device. In the Management section, click Create to add a new device.

 

In the window that appears, select a Device ID (it can be anything) and leave all other pre-filled parameters intact. Click Create to create the device.

 

Now it is necessary to get the Connection string for the newly created device.

Simply right-click the device and select Copy connection string for selected device(s).

 

This Connection string needs to be entered into the NETIO device. In its web interface, configure the M2M API Protocols - MQTT section as follows:

 

Enable MQTT – checked

MQTT Mode – MS Azure

Device connection string – paste the copied Connection string here

Validate server’s SSL certificate – checked

Update period – set as needed (the default is 30 seconds)

 

Click Save Changes to save the settings.

 

After saving the changes, the MQTT status should change to: Connected (Connected) and a green dot should appear next to the MQTT tab.

 

The Device Explorer can be used to check the communication. In the Data section, after configuring the Event Hub and the device, click Monitor. Received messages start to appear.

 

FAQ:

 

 

1) I don’t have the Windows operating system, what should I do?

If you use an operating system other than Windows, you can manage the Azure IoT Hub using Visual Studio Code with the Azure IoT Hub Toolkit extension: https://github.com/Microsoft/vscode-azure-iot-toolkit/wiki

 

 

2) Does the connection require MQTT flex?

No, the AN26 example uses the standard M2M API – MQTT mode: MS Azure, which is supported by all NETIO 4x devices. 

 


 

Supported FW versions:

3.1.0 and higher (Firmware Archive)

 


 

 

This Application Note is compatible with:

Smart power socket NETIO

 

NETIO 4

NETIO 4 is smart power socket (smart power strip) with four 230V/8A sockets, connected to LAN and WiFi. Each of the four power sockets can be individually switched on/off using various M2M API protocols. NETIO 4 is a unique product designed for IT, industry, smart homes, multimedia installations and other applications. Use the product whenever you need 230V sockets controlled by a mobile app, by a computer program (via M2M API) or by a custom script (Lua), and featuring a timer (Scheduler) or auto reboot functionality (IP WatchDog). 

More about NETIO 4

 

Smart power socket NETIO 4All

 

NETIO 4All

NETIO 4All is a PDU module featuring four 230V/8A power sockets with consumption metering for each socket as well as LAN and WiFi connectivity. Each of the four sockets can be individually switched on/off over the Web or using various M2M API protocols. Electricity consumption (A, W, kWh) can be measured at each power socket. NETIO 4All smart sockets are designed for remote measurement and control of electrical sockets. Use the product whenever you need 230V sockets controlled by a mobile app, by a computer program (via M2M API) or by a custom script (Lua) that runs directly in the NETIO 4All smart socket device.

More about NETIO 4All

 
NETIO PowerPDU 4C is small PDU with power measurement and IEC-320 outputs

 

NETIO PowerPDU 4C

NETIO PowerPDU 4C is a small 110/230V PDU (Power Distribution Unit). Each of the four IEC-320 C13 outlets can be independently controlled (On / Off / Reset / Toggle). Electrical parameters (A, W, kWh, TPF, V, Hz) are measured with high accuracy at each outlet. The device features two LAN ports (and a built-in Ethernet switch) for connecting to a LAN. Each power output supports ZCS (Zero Current Switching) to protect the connected equipment.

More about NETIO PowerPDU 4C

 

Ask for a price or technical parameters

For device testing use name/password demo/demo