GithubHelp home page GithubHelp logo

ereon / home-control Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15.17 MB

The source code for my home-control center.

License: MIT License

Rust 71.29% JavaScript 3.48% CSS 3.01% HTML 0.60% TypeScript 0.94% Svelte 18.51% Shell 1.22% Makefile 0.96%

home-control's Introduction

Home-Control

A home automation control-center for embedded devices.

This software is designed to run on a raspberry pi connected with a touchscreen, and provides a local web-server that can integrate with an already existing Home Assistant instance on the local network.

Building

The Rust build process will try to embed the generated static web files which must first be build at least once.

To build, you'll need to have the following installed:

  • cargo (part of the Rust toolchain)
  • rustup (part of the Rust toolchain)
  • npm (part of the Node.js toolchain)

Once you have the required tools installed, you can run the following command:

make

Development

Running the binary on the local machine in deployment requires a few additional things:

  • tmux
  • cargo watch (cargo install cargo-watch)

Then, set the following environment variables so that cargo run can work without explicit arguments:

  • HOME_ASSISTANT_ENDPOINT: The hostname:port of the Home Assistant instance, without any protocol scheme (do not include the http:// or https://).
  • HOME_ASSISTANT_TOKEN: The Home Assistant API long-lived token. You can generate one from your Home Assistant user profile page. You may want to create a user with limited permissions to generate the token.

Then run:

make dev

Cross-compilation and deployment on a Raspberry Pi

To be able to cross compile (see scripts/deploy.sh), you must install some dependencies first:

sudo apt-get install gcc-arm-none-linux-gnueabihf build-essential g++-arm-linux-gnueabihf
rustup target add armv7-unknown-linux-gnueabihf

Then run:

./script/deploy.sh <hostname>

Or set the DEPLOY_TARGET_HOST to the SSH hostname or IP address of the target Raspberry Pi machine and call:

make deploy

home-control's People

Contributors

ereon avatar

Watchers

 avatar

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.