2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-11 16:38:47 +01:00
Christian Schnidrig 9231e75be7 clean up
2018-11-25 20:41:12 +01:00
2018-11-25 20:41:12 +01:00
2018-11-25 20:41:12 +01:00
2018-11-25 20:41:12 +01:00
2017-02-26 22:22:25 +01:00
2017-02-26 22:22:25 +01:00
2016-12-20 23:22:56 +01:00
2016-11-29 00:08:10 +01:00
2017-02-26 22:22:25 +01:00
2018-11-25 20:41:12 +01:00
2016-11-26 14:30:18 +01:00
2017-02-26 22:22:25 +01:00
2017-02-26 22:22:25 +01:00
2016-12-20 23:22:56 +01:00
2016-11-29 00:08:10 +01:00

openhab-ansible

Ansible playbooks to setup openhab on a raspberry pi. It'll install mosquitto and mqttwarn as well. Mqttwarn is configured to send data to graphite.

Prepare Raspberry Pi

Install raspian

Download it from https://www.raspberrypi.org/downloads/raspbian/

Unzip and copy it onto an sdcard

e.g on a mac with sdcard reader that would be:

sudo dd bs=1m if=2016-09-23-raspbian-jessie-lite.img of=/dev/rdiskXYZ

Insert sdcard into rasberry pi and boot.

Enable sshd

sudo systemctl enable ssh

Configure fixed ip address

Edit the file /etc/dhcpcd.conf and add the following lines (according to your network) and reboot.

interface eth0
static ip_address=192.168.1.5/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

User setup

  • Change password of user pi.
  • Install ssh public key for user pi

Run ansible playbook

Edit group_vars/all/vault. Check/change other values in group_vars

ansible-playbook -i inventory raspi.yml

performance tweaks

https://github.com/openhab/openhab/wiki/Hardware-FAQ

install docker

https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/ curl -sSL https://get.docker.com | sh

Languages
Python 89.8%
Shell 10.2%