Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
/ rusty-home Public archive

Hobby set of «smart home» microservices

License

Notifications You must be signed in to change notification settings

eigenein/rusty-home

Repository files navigation

Last commit Build status

🏚 rusty-home

This is a self-educational pet project.

I'm attempting to make a set highly-available microservices that I could deploy onto 3x of mine Raspberry Pi Zero W. Each microservice is going to focus on a particular task. The microservices would exchange messages with each other through Redis streams.

Design

Each host is running a redis-server and redis-sentinel with enabled persistence and automatic failovers.

Each host is running a set of microservices – ideally, all of them – via systemd. The microservices should use Redis consumer groups to ensure reliable processing of messages.

  • HTTP security and fault-tolerance is done by Cloudflare Tunnel
  • Errors and performance are monitored by Sentry
  • Liveness is monitored by Better Uptime, see also the «Heartbeat» sections in the READMEs
  • Logs are handled by journald and collected to Papertrail
  • Configuration is synced by Syncthing
  • Builds are automated with GitHub Actions and cross, and get deployed to the hosts via Tailscale

Everything's using a free tier. 😉

Available microservices

Installation

For Raspberry Zero W you can grab the binaries from the releases.

Otherwise, build them with cargo:

# Choose which binaries you'd like to install.
cargo install --git https://github.com/eigenein/rusty-home.git --locked rusty-tractive rusty-tractive-telegram-bot rusty-tado

Motivation

I'd be happy to automate some routines, but I wouldn't like to maintain a Home Assistant instance.

I have already maintained a similar project – eigenein/my-iot-rs – which was monolithic. But it was quite time-consuming to maintain all the internal interfaces, yet to rebuild the entire binary after a minor change. Also, the only way to extend it was to modify the monolithic source code. In theory, the new design should allow extending it using any other stack – as soon as it's capable of reading and writing Redis streams.