Configuring a Raspberry Pi

Configuring a Raspberry Pi

Supported Hardware

Supported Features

graph TB subgraph Home Network hubitat[Hubitat Elevation] bridge[Hue Bridge] subgraph Raspberry Pi nodered[Node-RED] zstick[Aeotec Z-Stick] mosquitto[Mosquitto] nodered == OpenZWave === zstick nodered == MQTT === mosquitto end more[more devices] mosquitto == MQTT === hubitat nodered == "Hue API" === bridge zstick -. Z-Wave .- zwave bridge -. Zigbee .- hue hubitat -.- more hue[Hue Devices] zwave[Z-Wave Devices] end subgraph Phone location[Owntracks] dashboard[Dashboard] end location == MQTT / TLS === mosquitto dashboard == HTTPS === nodered classDef feature fill:#ffaaff,stroke:#000000,stroke-width:1px class nodered,mosquitto,zstick,hubitat feature

  • Secure remote access over the Internet
    • Public DNS name
    • Encrypted communications
    • Password protected
  • Web server
  • MQTT broker
  • Home automation server (i.e. Node-RED which is one of Raspberry Pi’s recommended software applications, i.e. installed by default in the “full” version of Raspbian)
  • Z-Wave controller
  • DLNA media server
  • SMB file server
    • exfat filesystem support

Configuration Scripts

Script Usage Description ./ -d DOMAIN -t TOKEN Set up dynamic DNS using domain name and access token from Duck DNS ./ Install Apache server ./ Install certbot certificate into Apache web server ./ Install mosquitto MQTT broker ./ Install the OpenZWave driver library ./ -v VENDOR -p PRODUCT -n NAME Configure udev to give a predictable name to a USB Z-Wave controller using information obtained via lsusb ./ Install and configure minidlna media server ./ -u USER -p PASSWORD Install and configure samba file server ./ Install exfat file system support via exfat-fuse ./ -d DIRECTORY -u UUID Mount an exfat drive automatically using the UUID displayed by blkid ./ Install and configure Docker container engine ./ Install and configure emacs, markdown-mode and pandoc

Note that the same techniques illustrated by these scripts can be extended to support other dedicated home automation services such as OpenHAB, Home Assistant etc. This is the main purpose of installing Docker

Additional Information

Minimum requirements for a home automation (or any other kind of) server with out-of-home access are:

  1. Enable remote access over the Internet using dynamic DNS
  2. Secure access using TLS (“https”)
    • See Apache to install the Apache web server software
    • See certbot to obtain a free, automatically renewing certificate and install it

Additional features for common home automation scenarios:

  1. See Mosquitto to install a MQTT broker
  2. See Node-RED for securing your Node-RED instance for remote access of the Internet
  3. See OpenZWave to use your Pi as a Z-Wave controller hub

Obviously, a Z-Wave controller is only necessary if you want to control Z-Wave devices. Similarly, the OpenZWave library is only required when using your Pi as a native hub by way of, for example, node-red-contrib-openzwave-am or via native support for OpenZWave in a product like OpenHAB. If you don’t care about Z-Wave or have a dedicated Z-Wave hub like Hubitat Elevation or Samsung SmartThings then there is no point to having a Z-Wave controller device attached to your Pi but you may still find Node-RED useful as a better automation engine than those built into stand-alone hubs. See for information on such scenarios.