Git Product home page Git Product logo

fabric-home-assistant's Introduction

fabric-home-assistant

image image image

Easily deploy Home-Assistant and it's components from a fresh Raspbian Jessie/Jessie-Lite or Debian 8 install. The fab deploy script will do the following:

  • Create needed directories
  • Create needed service accounts
  • Install OS and Python dependencies
  • Setup a virtualenv to run Home-Assistant and components inside.
  • Run as a service account
  • Build Mosquitto from source with websocket support
  • Install Python-openzwave in the Home-Assistant virtualenv
  • Add both Home-Assistant and Mosquitto to systemd services

What is Fabric? The official README says:

"Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks."

Python makes automating the build of things effortless. Since I use Python3 mostly, and the offical repo's don't contain a py3 version yet, you'll need to use this version for now: https://github.com/mathiasertl/fabric.git

Usage:

Simply install fabric locally: pip install fabric (for python 3 support, install fabric3 https://github.com/mathiasertl/fabric.git)

Ensure you're able to SSH into the target server.

Clone the contents: git clone https://github.com/jbags81/fabric-home-assistant.git Add the host info from before to the beginning of fabfile.py The repo contains a pre-configured default mosquitto.conf file. The only addition is an added listener for websockets listening on 9001. It also contains preconfigured systemd service profiles. For the fabric script to run successfully, it has to be ran from the root of the cloned repo.

Run the "deploy" function to build a new home-assistant server: fab deploy then reboot. Everything will start at boot, and Home-Assistant is accessible from http://your_server_ip:8123

Fabric allows any of the underlying functions to be ran individually as well. run fab -l to see a list of all callable jobs.

Future support for non-virtualenv based servers will be added, along with the ability to auto upload existing or backup .yaml Home-Assistant configs. I'm also working on a turn-key devlopment script to make testing and development environments one click setups.. More to come!

Tested with Raspbian Jessie, Jessie-Lite, and Debian 8

fabric-home-assistant's People

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.