Git Product home page Git Product logo

raspberry-pi-iot-home's Introduction

Ansible playbook: Raspberry Pi IoT

Setup Raspberry Pi for use with my home setup. Installs docker for arm64, configures RPi to work with RS485 hat adapter and Zigbee coordinator. Setups automatic backups to USB drive. (Do NOT ever use this playbook on RPi outside of private home network)

Sets up following docker containers with docker-compose:

  • Grafana

  • Node-Red

  • Influxdb

  • Zigbee2mqtt

  • Mosquitto (mqtt broker)

Usage

You need to use pi user otherwise playbook might not function correctly.

Before starting the playbook make sure inventory.yml file is setup correctly. For zigbee2mqtt and serial ports in node-red to work you need to uncomment/modify correctly device mappings in configs/compose.yml file.

# Pulls required roles from ansible-galaxy, run only once
ansible-galaxy install -r requirements.yml

# Setup everything
ansible-playbook main.yml

# Run only docker installation
ansible-playbook main.yml -t docker

# Run only RPi setup
ansible-playbook main.yml -t pi

# Run only backup setup
ansible-playbook main.yml -t backup

# Run RPi and backup setup
ansible-playbook main.yml -t setup

Enabling / Disabling containers on RPi

sudo docker-compose -f compose.yml up -d
sudo docker-compose -f compose.yml down

Files setup on RPi

/home/pi/  
├─ backup.log # Logs from backup script
├─ backup-script.sh # Backup script (launched every week with cron job)
├─ compose.yml # Used with docker compose
├─ docker-volumes/ # Container volumes  
│ ├─ grafana/
│ ├─ node-red/
│ ├─ influxdb2/
│ ├─ zigbee2mqtt/
├─ backups/ # Directory containing up to 5 recent backups
│ ├─ backup1.zip
│ ├─ backup2.zip
│ ├─ backup3.zip
│ ├─ backup4.zip
│ ├─ backup5.zip

raspberry-pi-iot-home's People

Contributors

wilkovv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.