Node-RED for Unipi Patron

This manual will guide you through the entire process of installing Node-RED into your Patron unit. Before the installation please make sure your unit was delivered undamaged and without any visible defects.

Patron

To install Node-RED you need to re-flash the current OS in the unit by a new one. This specific OS containing preinstalled Node-RED software is available in the OS images, chapter Patron Node-RED OS. Download it and extract it into a new folder in your PC.

To upload OS into the Patron unit through its service interface, you need to access the service mode first. To enable it, follow instructions in this article.

  1. Enter the device's IP address into a web browser. Upon confirmation, you will be connected to the Unipi Patron service interface
  2. In the service interface, drag and drop the archive.swu file extracted from the OS image archive into the Software update dialogue window
  3. The OS flashing will start, indicated by rapid blinking of all LEDs in both upper and lower row on section 1
  4. Wait until the device finishes the process. Its progress can be monitored in a dialogue window under the Messages label
  5. Finishing the process is indicated by diodes going off and a reboot of the device
  1. Prepare a USB flash disk in FAT32 format with a capacity of at least 2 GB
  2. Copy the content of the ZIP archive onto the flash disk
  3. Unplug the power supply from the device and insert the flash disk into any device's USB port
  4. Press and hold the SERVICE button
  5. Plug in the device's power supply, the unit will automatically start the reflashing process indicated by rapid blinking of all LEDs in both upper and lower row on section 1
  6. You can now release the SERVICE button
  7. Finishing the process is indicated by diodes going off and a reboot of the device

If the USB flash disk is not compatible, the unit will not start the OS flashing and reboots. In that case, you need to use a different flash disk or the above-mentioned flashing through the service interface.

The OS image you just uploaded into your unit also contains the preinstalled EVOK open-source software - an Unipi-developed application programming interface (API) for direct communication with Unipi hardware.

Also available is a practical demonstration of using the API in the form of a simple web application (Unipi Control Panel) serving as a user interface for all inputs and outputs on the unit. To access this interface, open your web browser and enter the IP address of your unit with the port number :80. Port number is optional, as it is the default webserver port.

For example:

192.168.1.10

or

192.168.1.10:80

The application's interface looks like this:

Another software included in the disk image, which is now also uploaded in your unit, is Node-RED. It is an open-source programming tool for connecting hardware devices, various APIs or online services. In this case, the Node-RED software already contains the EVOK API. This API is represented by a pair of nodes in the left panel, section Unipi - unipi input and unipi output made to control both analog and digital inputs and outputs.

To access the Node-RED programming interface, open a web browser and enter the unit's IP address into the address tab. Don't forget to add the :1800 port number.

For example:

192.168.1.10:1880

The following interface will appear:

You have probably noticed the interface already contains a project. It is a demonstration project for reading inputs and writing to outputs, which is connected with a web user interface → so-called Dashboard. This project (flow) is available for download at the end of the article.

To access the interface, add /ui suffix behind the address with the port number.

For example:

192.168.1.10:1880/ui

The following interface will appear:

You now have everything you need to create your projects.

If you did not set up login using the following guide, you expose yourself to a risk of unauthorized access to the Unipi unit. That may lead to potentially dangerous changes resulting in downtimes or limitations. At the worst, unauthorized tampering can damage connected technologies or endanger personnel at installation sites.

That said, it is very important to have your system secured every time you create a new project.


As you will communicate with the unit using the SSH protocol, you need to know the unit's IP address and to have an SSH client installed on your unit. Among the most frequently used programs is the PuTTy application - if you don't have it already, follow this guide.

For transfer files between your PC and the Unipi unit you can use the WinSCP utility. Login is the same as for SSH.

After that, just follow this guide on the official Node-RED webpage.

Node-RED projects are called flows. On the link below you can download a file with a flow for Unipi Patron / Neuron / Axon units.

default-flow_axon-neuron.zip