Docker VPN-based Raspberry Pi Server tutorial

Many developement boards can be used in home and industrial applications to control and manage data. Get secure remote access from anywhere via your own VPN based on Docker containers. Check out latest video from open-tech infuencer, Andreas Spiess, in which he uses Raspberry Pi and Docker, Node-RED, influxDB and Grafana to build custom Raspberry Pi data server.

Industrial use of Raspberry Pi 4

A year ago, TECHBASE released an updated version of the ModBerry M500 industrial IoT computer, replacing the aging Raspberry Pi 3 with a 3B+, giving it better performance. With the recent launch of the Raspberry Pi 4, TECHBASE has yet again, announced another upgrade to the M500, which now packs the latest single-board computer.

Raspberry Pi 4

Over 10 million Raspberry Pi’s have been sold and the Raspberry Pi is likely to stay as a new standard in the industry. Official Raspbian OS is free operating system based on Linux Debian optimized for the Raspberry Pi comes with over 35,000 packages, pre-compiled software bundled in a nice format for easy installation. ModBerry devices are compatible with Raspberry Pi accessories, supported by Raspberry Pi Foundation. ModBerry M500 now with Raspberry Pi 3 Model B+ / Raspberry Pi 4 Model B support.

Raspberry Pi & ESP32 use-hack of OpenMQTTGateway

Many developement boards can be used in home and industrial applications to control and manage data. Check out latest video from open-tech infuencer, Andreas Spiess, in which he uses Raspberry Pi and ESP32 boards to build and visualize weight loss system using Xiaomi scale and Node-RED, influxDB and Grafana. Open MQTT Gateway might come in handy too.

Industrial use of Raspberry Pi & ESP32-based solutions

One of industrial IoT devices, supporting Espressif’s ESP32 technology is eModGATE from TECHBASE. Economical, ESP32-based solution can serve as an end-point in any installation or works well as a gateway, gathering data from scattered sensor mesh across the installation. For more information and also Raspberry Pi based solutions check Industrial IoT Shop with all the configuration options for eModGATE.

eModGATE with ESP32
Node-RED and Raspberry Pi

Node-RED is an interesting environment for modeling processes, by visually defining information flows. It is a module working in the node.js environment. It is a flow-based programming tool, originally developed by the IBM Emerging Technology Services team and now part of the JS Foundation.

History of Node-RED environment

Node-RED provides users with a ready-made set of easy-to-connect nodes and supports code creation by configuring data transmission and sensor communication to their applications. It is up to you whether you create a new flow of equipment to increase and control the economics of the IoT system. Hardware platform for this system can easily be Raspberry Pi based industrial device, like ModBerry computer.

Node-RED started life in early 2013 as a side-project by Nick O’Leary and Dave Conway-Jones of IBM’s Emerging Technology Services group. What began as a proof-of-concept for visualising and manipulating mappings between MQTT topics, quickly became a much more general tool that could be easily extended in any direction.

It was open-sourced in September 2013 and has been developed in the open ever since, culminating in it being one of the founding projects of the JS Foundation in October 2016.

Source: https://nodered.org/about/

How does Node-RED work?

Node.js is a runtime environment for programs written in JavaScript, currently based on the Chrome V8 engine. While I used to associate JavaScript only with scripts for animated galleries on websites, after a really short period of learning I notice the great advantages of using JS as a language for creating programs launched outside of the browser. Programs run in node.js work in the background, in the console, or even have their own UI with normal windows in Windows, macOS or Linux.

Node-RED example
Node-RED example

The principle of operation is relatively simple. Visually, we combine different blocks that perform specific functions. Through connections, Node-RED sends messages, which are basically a JavaScript object, consisting of various data.

Node-RED consists of a Node.js based runtime that you point a web browser at to access the flow editor. Within the browser you create your application by dragging nodes from your palette into a workspace and start to wire them together. With a single click, the application is deployed back to the runtime where it is run. The palette of nodes can be easily extended by installing new nodes created by the community and the flows you create can be easily shared as JSON files.

Source: https://nodered.org/about/

Who can benefit from Node-RED?

Flow-based programming is ideal for the creators of IoT solutions for visualizing and controlling data flow, maintaining and managing a series of cause-related events. Apart from the fact that Node-RED can be run basically anywhere you can install NodeJS, this program is a card for IoT solution developers for mapping and maintaining solutions.

With the development and implementation of Internet of Things solutions around the world, Node-RED has become an invaluable tool for solution architects and programmers, due to its ease of use in flow programming and solution mapping. IoT solutions, also known as applications, are the convergence of the physical world with the digital world to extract valuable data for insight that increases process or system performance. This convergence results in countless triggers and events that must be performed to control systems or notify those responsible when the system is above its expectations.

The latest configuration of ModBerry 500 device presents the important milestone in TECHBASE’s offer. The introduction of two platform symbiosis, RaspberryPi Compute Module 3 assisted with Espressif’s ESP32 module brings new possibilities of application to life. High performance of CM3, if compromised by exposition to harsh environmental conditions or sudden drop of power, is aided with low-powered ESP32’s real-time system to continue operation of the device. ESP32 module can be battery powered, same as standalone Moduino series, based on similar solution.

ESP32 subsystem for ModBerry 500

Main difference between ESP32-aided ModBerry device and ESP32-based Moduino is that the first one benefits from low-power module aid to prevent errors and downtimes. ESP32 compared to Compute Module 3 works much longer on battery power supply and offers extended sleep modes. Real-time system of ESP32 and simplified communication between ESP32-aided ModBerry device and Moduino controllers drastically shortens the time needed for the system implementation and the cost of maintaining the application. It also enables the use of Espressif’s Wi-Fi-based technology in the ESP-NOW and ESP-MESH networks.

The separate ModBerry-Moduino Ecosystem, working as a separate devices is a solution for scattered object and installations monitoring – with the use of wireless communication interfaces (e.g. LoRa, NarrowBand-IoT, ZigBee, Wi-Fi, Bluetooth, etc.), rather than standard wired networks. For more information ask TECHBASE via one of contact form at: https://iot-industrial-devices.com/ & http://moduino.techbase.eu/

Coming soon

TECHBASE plans further development of the product, particularly the issue of remote access to input/output resources and use of ESP32 as a Security Chip – hardware layer protection against hacking (very important issue in current IoT business).


Introduced with Moduino series, TECHBASE developed further the project of modular aluminum case for their devices. The latest version of housing allows ModBerry to expand in any dimension, supporting additional extension cards (e.g. I/Os, modems, opto-isolation, accelerometer, etc.) and DIN rail mount, that can be retracted into device itself. TECHBASE constantly improves the project to support different platforms (e.g. Raspberry Pi Compute Module 3, NanoPi, ESP32, UpBoard and probably more in the nearest future) and brings them to Industrial IoT world.

Supercapacitor power support for ModBerry

To improve the possibilities of ModBerry devices, TECHBASE added supercapacitor UPS option for ModBerry 500 configurations. Additional power supply available at emergency situations, such as power drop or loss, allows the device to log the recently acquired data and send the notifications to user regarding the occurred event. The supercap support for ModBerry ensures safe system shutdown and protects memory from fragmenting, so there is no need to use diagnostic tools afterwards.

ModBerry enhanced with OLED screen

Just like ESP32-based Moduino series, the ModBerry computers can be now equipped with OLED 0.96″ 128×64 screen via i2c extension protocol. The is small, only about 1″ diameter, but very readable due to the high contrast of an OLED display. Because the display makes its own light, no backlight is required, therefore reduces the power required to run the OLED.



TECHBASE Industrial Computers are designed for easy integration of LoRa / MQTT networks. ModBerry devices base on Raspberry Pi / NanoPi / Intel UpBoard platform communicate with both Cloud and Sensor layer (backed with ESP32 Moduino devices) of your installation via MQTT protocol. Gateway utilizes the features of many protocol libraries, such as original TECHBASE’s iMod protocol controller – installable both on the Gateway device itself or externally with wide range of possibilities (industrial computer, hosted server, etc.). Our devices fully support Node-RED, CODESYS, OpenHAB and many more open protocol libraries.

Wide range of protocol support

All TECHBASE’s solution can be empowered with iMod software incl. protocol support for industrial interfaces, e.g. M-Bus, Modbus, SNMP, MQTT. iMod software works seamlessly with Node-RED using MQTT protocol, allowing use of bacnet and direct control over devices I/Os with Google’s platform-neutral protobuf – extensible mechanism for serializing structured data and zeroMQ controls to connect the code in any modern language, on any platform. The protocol drivers library can be expanded with CODESYS development system to support PROFIBUS, CANopen, EtherCAT, PROFINET and EtherNet/IP.

iMod M-Bus, Wireless M-Bus, Modbus TCP/RTU, SNMP, MQTT, SMS, E-MAIL, SQL/CSV
Node-RED, etc. MQTT, bacnet, eISCP
OpenHAB Commercial product integration
Other open-source protocols IEC 61850, IEC 60870-5-104, DLMS/COSEM, KNX, eHz meters, IEC 62056-21, REST



In October 2017 TECHBASE introduced newest economical addition to their M-Bus/Modbus Gateway family. Success of ModBerry 500 series based on Compute Module 3 and ModBerry M700 based on NanoPi M2 drove to further development of this efficient platform. TECHBASE proudly presents ModBerry M300 powered by NanoPi NEO.

    • CPU: Allwinner H3, Quad-core Cortex-A7 Up to 1.2GHz
    • DDR3 RAM: 512MB
    • Connectivity: 10/100M Ethernet, RS-232, RS-485
    • USB Host: ext. Type-A x1
    • Wireless communication: Wi-Fi, Bluetooth, LoRa, NB-IoT (LTE cat. NB1) /GPRS/EDGE, 3G/GPRS, ZigBee, Sigfox support
    • Working Temperature: -40℃ to 70℃
    • OS/Software: u-boot, UbuntuCore, Debian and Android

Download PDF datasheet: http://www.a2s.pl/products/ModBerry/ModBerry_M300_EN.pdf

Czytaj dalej