• On chevron_right

      Self-signed certificates for MQTT server

      pubsub.slavino.sk / onetransistor · Friday, 9 April, 2021 - 17:53 edit

    During the last series of posts, I set up an Orange Pi single board computer running Armbian and I installed Mosquitto on it. My intention is to have a self-hosted MQTT broker for IoT applications. I already have it running with the configuration from previous post and it can be used for local connections in my home LAN and WiFi. Since this is a closed network, behind a firewall running on the Internet gateway I got from my ISP, there is no need for MQTT over SSL. But I need more: I want to be able to connect to MQTT server from with remote devices (my Android phone).

    To do this, I need to configure a secured listener in Mosquitto and open its port for internet access. Since most ISPs offer dynamic IPs to residential clients, I also need a dynamic DNS service provider to have a domain name which always points to my IP. If you can get a static IP, then you don't need this.

    Self-signed certificates for MQTT server

    Read more

    Značky: #Armbian, #IoT, #Elektro, #MQTT

    • On chevron_right

      Configure Mosquitto™ MQTT broker on Armbian

      pubsub.slavino.sk / onetransistor · Saturday, 3 April, 2021 - 19:44 edit

    In the previous post I installed Armbian on an Orange Pi Zero single board computer (SBC). I intend to use this device for IoT and home automation, therefore I wanted to have a running MQTT server (broker). I prefer a self-hosted broker instead of a remote one hosted at a 3rd party company. I this way I have full control and I am sure sensitive data stays in the home network. Nevertheless, current SBC devices have enough processing capabilities and are energy efficient.

    In this post I will configure the broker software. I want the server to listen for unencrypted connections on a port available for local clients only. It should also listen for encrypted connections on ports that I will open for remote access. There are two kinds of TLS connections: PSK (pre-shared key) and SSL certificate. The certificate will be self-signed and generated with OpenSSL.

    Configure Mosquitto™ MQTT broker on Armbian

    Read more

    Značky: #MQTT, #IoT, #Armbian, #Elektro

    • On chevron_right

      MQTT Broker on Orange Pi Zero (Armbian)

      pubsub.slavino.sk / onetransistor · Saturday, 20 March, 2021 - 17:17 edit

    Some time ago I was attempting to install the Mosquitto MQTT broker software on an old router with OpenWrt firmware. I no longer think that is the best option for a self-hosted MQTT broker with the advent of single board computers (SBC) like Raspberry Pi and Orange Pi. To my surprise, the Orange Pi Zero board (with quad core 1 GHz CPU and 256 MB RAM) requires less power to run than an old router (300 MHz single core CPU and 64 MB RAM).

    With sufficient processing capabilities, the SBC can run more than the MQTT broker. I’m thinking of turning this Orange Pi board into a Home Automation Gateway which manages local devices and makes data available in a web interface. There is plenty of software support for what I want (I’m thinking of Node-RED with a web-based dashboard). Another good candidate is Raspberry Pi, but because it does not have wired network port (Zero version), I chose Orange Pi.

    MQTT Broker on Orange Pi Zero (Armbian)

    Read more

    Značky: #MQTT, #IoT, #Elektro, #Armbian