Home automation for the geek home. Built in Go.
Switch branches/tags
Nothing to show
Clone or download
Latest commit b6bcd5b Nov 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/gohome Add trailing NL if missing Apr 17, 2018
config Add camera watches Apr 14, 2018
lib Use host:port for carbon Feb 13, 2017
pubsub Fix unique session names for mqtt May 19, 2018
services Add url to snapshot Nov 22, 2018
systemd Slack service. Because everything must integrate with slack. Aug 27, 2015
util Fix scheduler for clock shifts May 20, 2018
vendor Update gofsm Apr 16, 2018
.gitignore goreleaser Mar 30, 2018
.goreleaser.yml goreleaser Mar 30, 2018
.travis.yml goreleaser Mar 30, 2018
Gopkg.lock Update gofsm Apr 16, 2018
Gopkg.toml Update to gopkg.in/yaml.v2 Apr 12, 2018
Makefile goreleaser Mar 30, 2018
README.md Update README Mar 11, 2018
config.yml Old 'protocols' config Apr 11, 2018
doc.go Migration to github. Feb 11, 2015

README.md

Gohome

Home automation for the geek home. Built in Go.

Build Status GoDoc

Features

  • Lightweight, small memory footprint (runs on the Raspberry Pi)
  • Modular, distributed and extendible
  • Remotely controllable
  • RFID keyless entry
  • Smart burglar alarm
  • Historic weather monitoring and alerting
  • Zoned central heating control
  • Automatic plant irrigation system
  • Sunset / sunrise triggered home lighting

Devices supported

  • rfxcom RFXtrx433 USB device (http://www.rfxcom.com/)
  • Homeeasy remote control sockets/lights (http://homeeasy.eu/)
  • Arduino with relay module (http://arduino.cc/)
  • ZTE 3g modem (ZTE MF110/MF627/MF636, SMS support)
  • USB 125KHZ EM4100 RFID Proximity Reader (RFID tag reader)
  • Oregon Scientific WMR100/200 weather station
  • Audio out (espeak text to speech)
  • Foscam wireless IP cameras
  • Motion webcam application
  • Currentcost electricity monitor
  • LIRC infra-red transmitters

Services supported

Installation

Installation is easy, just download the binary from the github releases page (builds are available for Linux 32-bit, 64-bit and ARM): https://github.com/barnybug/gohome/releases/latest

For the raspberry pi, download the ARM build.

Rename and make the download executable:

$ cp gohome-my-platform /usr/local/bin; chmod +x /usr/local/bin/gohome

You also will need mosquitto installed:

Debian/Ubuntu/Raspbian:

$ apt-get install mosquitto
$ service mosquitto start

ArchLinux

$ packer -S mosquitto
$ systemctl enable --now mosquitto

Configuration

An example configuration is at: https://github.com/barnybug/gohome/blob/master/config.yml

Edit this to match your setup and upload:

$ curl -XPOST localhost:8723/config?path=config --data-binary config.yml

Running

gohome runs as a set of distributed and independent processes/services. They can run across different hosts connecting to the same network, with the pubsub bus (MQTT) connecting all the components together.

To manually run a gohome service:

$ gohome run <service>

The best way to manage the whole set of services is using your user systemd - because you probably want to ensure they are restarted if they happen to crash. Any recent Archlinux comes with this preconfigured, you just need to install the gohome services by running the script setup.sh provided:

$ cd systemd && ./setup.sh

This will enable and start all the services defined in by SERVICES=... in setup.sh.

The 'services' don't necessarily have to be gohome itself - you can add scripts to the system of your own crafting. The script service can wrap external scripts and passes on any events printing to stdout by the external script into gohome, allowing quick and easy integration.

Building from source

To build yourself from source:

$ go get github.com/barnybug/gohome
$ cd $GOPATH/src/github.com/barnybug/gohome
$ make install

This will produce a binary gohome in ~/go/bin (ie. $GOPATH/bin), after this follow the steps as above.