Giter Site home page Giter Site logo

andrew-codes / home-automation Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 3.0 337.14 MB

Various home automation services in containers automatically deployed via local GitHub actions; all within a local k8s cluster.

License: MIT License

JavaScript 0.65% Shell 15.90% Dockerfile 3.13% Python 0.35% PowerShell 0.23% TypeScript 52.39% HCL 2.18% Jsonnet 25.17%
home-automation home-assistant nodejs github-actions docker kubernetes python terraform mqtt microservices

home-automation's Issues

Game library cache

Application to receive game data mqtt payloads and cache it. Consider using redis.

  • Subscribes to game data topic and caches payload
  • Replaces cache with each payload
  • Publish mqtt topic that cache was updated on every update
  • On application start, publish mqtt request for game data

Prevent starting multiple games at same time

Starting a game prevents starting another game until the game is turned off.

  • Save game playing state when starting a game
  • Stopping game on pc update the game state
  • Changing ps source updates game playing state
  • Turning off ps update game state
  • Turning off pc update game state
  • Playing game mutation respects stored game state

Game GraphQL

Query games

  • can query games
    • artwork
    • cover art
    • Platform
    • source
    • genre
    • game mode
    • multiplayer mode
    • playtime
    • release year
    • name and summary
    • Playnite ID
    • ID
    • favorited
    • hidden
  • can query platforms
  • query genres
  • query gameModes/multiplayer modes
  • Batch loads for better performance

Automate required GitHub secrets

Automate the addition of required repo secrets for the GitHub action runners to function properly.

  • Necessary GitHub secrets are automatically added to the repository when calling set_secrets.sh
  • Feature is documented
  • Existing secrets are overwritten with their new values

Enable local testing of services

Enable running services locally, that depend on other services in the cluster.

  • Run individual apps locally, with them connecting to other services that exist in the production cluster
  • Run multiple apps locally
  • Document feature

GraphQL API

Used to query any data of the home automation; including:

  • Home Assistant API
  • Video game library
    • Playnite, Steam API, etc.

Criteria

  • Update tests
  • Cache HA API per request
  • Home Assistant entities
  • Home Assistant areas (rooms)
  • Home assistant domains
  • Use and test with guest tracker captive portal
  • Secured by via secret token
  • Only allow from internal IPs

Game cache updates are atomic

Enable loading all metadata for each game and saving it one at a time. In the case of an error, it can pick back up where it left off or continue to save the rest; i.e. it is not all or nothing.

Auto-renew registered guest devices each day

This will prevent them from having to go through the captive portal any additional times.

  • given no guests, publishing topic will no-op
  • given one guest, publishing topic will renew single guest lease
  • given registered guests, publishing topic will renew each lease
  • HA publishes the topic daily
  • returns device tracker data

DNS server IP address misconfiguration

DNS server oscillates its IP address from several values. This is causing issues with Internet/network connectivity.

May need to re-install pihole. If so, this should happen via an automated process with Ansible.

Guest presence tracking

Presence tracking for guest devices.

  • Guests do not have to install any software on any of their devices
  • HA knows when a guest is home
  • HA knows when all guests are not_home
  • Only phone devices are considered when determining guest presence.
  • Feature is well documented

Create basic site/UI for game browser

The game browser will be a web UI. Stand up a deployable site that will be used for the game browser. The site should be internal, but accessible via the LAN.

Stopping games

When a game is stopped, then HA turns off the media player for the gaming system; including TV, etc.

  • When stopping PC game, PC is not put to sleep and TV is not turned off
  • When stopping a PS game, PS is not put to rest mode, and TV is not turned off
  • Stopping a PS game, updates db with game state

Game cache and IGDB lookups

Cache games from Playnite and also cross-reference game data (by name) on IGDB's API. Cache game data combined with Playnite data to be sourced by GraphQL queries elsewhere.

  • persist cache after restarts/deployments
  • password protect game cache
  • limit to 1 request per 350ms so as not to hit the API rate limits
  • save up game info
  • save cover art info
  • save keywords
  • save the franchise
  • artworks
  • save collection
  • savegame modes
  • save multiplayer modes
  • only look up games that are not already in the database
  • download cover art save to db
  • download artwork images to db
  • save games not found in IGDB for later/further review

Play a game GraphQL mutation

PC

  • Turn on the gaming pc for pc games
  • Publish MQTT topic to play pc game
  • Published topic to play PC game turns on the game on the PC
  • When the PC game is not installed, will install the game and then turn it on
  • When turning off the game manually, then a topic is published
  • Stopping via topic will kill Playnite application
  • Stopping graphql API mutation publishes stop game topic
  • Published topics for playing games will update the game state in the DB

PS4

  • Turn on PS4 for ps4 games
  • Start PS4 game for ps4 games
  • Publish MQTT topic to play ps game
  • Turning off PS4 publishes stop PS4 gameplay

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.