My personal smarthouse controller setup.
This setup uses Vagrant to create the virtual machine I run the server in (so far I only run locally on my computer but in time I will change the setup to use a "server").
I use Ansible to automate provisioning of my virtual machine.
- Some machine to run Vagrant & virtualbox on - with two usb-slots available
- AeoTec Z-Stick Series 2 - with Silicon Labs CP2102 USB to UART Bridge VCP (Virtual Com Port - USB Stick)
- RFXCom Transceiver USB stick
- Netatmo
- 4 Fibaro Wall plugs (Z-wave)
- Aeon 4in1 sensor (Z-wave)
- 3 Nexa wall plugs
- openHAB
- HABmin
- Install virtualbox, vagrant and ansible:
- Ubuntu:
sudo apt-get install -y virtualbox ansible
- vagrant > 1.5 - install deb manually: https://www.vagrantup.com/downloads.html
- OSX: We recommend using homebrew and homebrew cask, but you can install these manually if you prefer (see download links).
brew cask install virtualbox
-- or Virtualbox Downloadsbrew cask install vagrant
-- or Vagrant Downloadsbrew install ansible
-- or ... hm ... build from source?
- Windows:
- Start here - and make sure you can ansible in the door: [Installing Ansible (Windows)] (http://docs.ansible.com/intro_windows.html#installing-on-the-control-machine)
- Download and install "VirtualBox platform package" for Window hosts: Virtualbox Downloads
- Download and install Vagrant for Windows: Vagrant Downloads
- Reboot your machine.
- Install Cygwin by following this procedure: Setting Up Cygwin
- Choose the following packages:
- git
- openssh
- We also recommend these:
- curl
- git-completion
- tig
- vim
- wget
- Choose the following packages:
- After installing Cygwin WIndows users should use a Cygwin Prompt for commands like git etc.
- Ubuntu:
- Clone this repo from the command line (in a directory of your choice):
git clone https://github.com/akafred/lurhus.git
cd lurhus
into your cloned repo.- From the command line run:
vagrant up
to bootstrap the environment. Note! The repository contains file(s) encrypted usingansible-vault
- in such files there are secrets - like netatmo binding keys etc. Without the passphrase to the encrypted files you cannot start the system - in other words you need to replace the files with your own encrypted files with your secrets - or remove the functionality.
After you are up and running, open a browser and point it to openHAB http://localhost:8080/openhab.app or HABmin http://localhost:8080/HABmin.app.
In theory you should only ever need to use vagrant commands to update the virtual machine:
vagrant up # to bootstrap the box initially
vagrant provision # when you have changed something and want the virtual server updated
As long as you never tamper with the virtual machine manually you should be able to do vagrant destroy && vagrant up
if anything misbehaves or you want to do a bigger upgrade. Of course this will loose any log persistent data you have collected (to be solved later).
You can use the command ./show_logs.sh
to tail the openHAB logs.