hautomo

module
v0.0.0-...-f8c32d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2021 License: Apache-2.0

README

Build Status Download

Home automation hub built to serve my specific requirements.

Due to Golang runs pretty much anywhere, but some specifics work best with a Raspberry Pi.

Features

  • Powering devices on/off. Alexa: tv on, amplifier off
  • Color of lights. Alexa: set kitchen lights to yellow
  • Dimming lights. Alexa: dim kitchen lights to 50 percent
  • Controlling playback. Alexa: pause computer (context dependent, f.ex. pauses/resumes Spotify, YouTube or Netflix)
  • Routines (via Alexa), for example every weekday morning turn bedroom lights on, read news and weather.
  • Infrared remapping (receive via LIRC, transmit via Logitech Harmony Hub). Dedicate any remote to use with your home automation. When remote button pressed, send IR signal to a device not originally controlled by that remote.

Supported integrations

  • Voice control for all of this (via Alexa)
  • IKEA Trådfri lights and Trådfri wall sockets
  • Infrared devices (via HarmonyHub)
  • Custom 433 MHz power sockets (via custom hardware attached to Particle)
  • Computer (via EventGhost)
  • Happylights
  • MCEUSB (via LIRC)
  • Logitech Harmony Hub
  • Wall power sockets (via custom hardware)

Adapters / sensors architecture

Configuring

Configured using HCL syntax. Example config file:

(TODO: some of the options here are outdated)


adapter {
	id = "sqs"
	type = "sqs"

	sqs_queue_url = "https://sqs.us-east-1.amazonaws.com/1234567890/HomeAutomation"

	sqs_key_id = "AKIAIDJJXAOTADKM"
	sqs_key_secret = "..."
}

adapter {
	id = "harmonyHubAdapter"
	type = "harmony"

	harmony_addr = "192.168.1.153:5222"
}

adapter {
	id = "lirc"
	type = "lirc"
}

device {
	id = "c0730bb2"
	adapter = "harmonyHubAdapter"
	adapters_device_id = "47917687"
	name = "Amplifier"
	description = "Onkyo TX-NR515"
	power_on_cmd = "PowerOn"
	power_off_cmd = "PowerOff"
}

device {
	id = "7e7453da"
	adapter = "harmonyHubAdapter"
	adapters_device_id = "47918441"
	name = "TV"
	description = "Philips 55'' 4K 55PUS7909"

	# for some reason the TV only wakes up with PowerToggle, not PowerOn
	power_on_cmd = "PowerToggle"
	power_off_cmd = "PowerOff"
}

devicegroup {
	id = "cfb1b27f"
	name = "All devices"

	device_ids = [ "c0730bb2", "7e7453da" ]
}

ir2ir {
	remote_key = "KEY_VOLUMEUP"
	to_device = "c0730bb2"
	ir = "VolumeUp"
}

ir2ir {
	remote_key = "KEY_VOLUMEDOWN"
	to_device = "c0730bb2"
	ir = "VolumeDown"
}

Directories

Path Synopsis
cmd
pkg
adapters/alexaadapter
Receives commands from Alexa voice assistant ("Alexa, turn off <device name>") via AWS SQS (so the Lambda fn doesn't need direct connection to Hautomo).
Receives commands from Alexa voice assistant ("Alexa, turn off <device name>") via AWS SQS (so the Lambda fn doesn't need direct connection to Hautomo).
adapters/alexaadapter/aamessages
Messages with which the adapter and the connector communicate by
Messages with which the adapter and the connector communicate by
adapters/alexaadapter/alexaconnector
Implements various Alexa home automation APIs in AWS Lambda and serves as an anti-corruption layer hiding the misery (overcomplicated comms), sending only the relevant commands to Hautomo via SQS queue (so no direct connection required)
Implements various Alexa home automation APIs in AWS Lambda and serves as an anti-corruption layer hiding the misery (overcomplicated comms), sending only the relevant commands to Hautomo via SQS queue (so no direct connection required)
adapters/homeassistantadapter
Sync state from Hautomo to Home Assistant, along with support for pushing remote URL changes (images / RSS feeds) to Home Assistant
Sync state from Hautomo to Home Assistant, along with support for pushing remote URL changes (images / RSS feeds) to Home Assistant
adapters/presencebypingadapter
Deduces a person's presence by her device (e.g.
Deduces a person's presence by her device (e.g.
adapters/screenserveradapter
Sends notifications to screens of screen-server
Sends notifications to screens of screen-server
alexatypes
The missing types I couldn't find from anywhere in AWS's SDK or the Go ecosystem
The missing types I couldn't find from anywhere in AWS's SDK or the Go ecosystem
builtin
Things that should've been built-in to Go :) Intended to be imported with the "." operator.
Things that should've been built-in to Go :) Intended to be imported with the "." operator.
evdevcodes
Linux evdev event codes (keys and buttons)
Linux evdev event codes (keys and buttons)
ezstack
Easy Zigbee Stack - the goal is to be easiest-to-understand Zigbee codebase available.
Easy Zigbee Stack - the goal is to be easiest-to-understand Zigbee codebase available.
ezstack/zigbee
Zigbee protocol
Zigbee protocol
ezstack/znp
Zigbee Network Processor.
Zigbee Network Processor.
ezstack/znp/unp
UNP is a framing protocol (commandtype, subsystem, command, payload) for communicating with Texas Instruments radio devices
UNP is a framing protocol (commandtype, subsystem, command, payload) for communicating with Texas Instruments radio devices
screenserverclient
Client for screen-server
Client for screen-server
sonoff
controls Sonoff Basic relays using the Tasmota open source firmware
controls Sonoff Basic relays using the Tasmota open source firmware

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL