Git Product home page Git Product logo

resin-home-automator's Introduction

resin-home-automator

Example Python Flask web app deployable via resin.io for periodic Celery tasks Deployed as a Flask web app that works on any of the ARMv7 devices supported by resin.io.

Deployment

To get this project up and running, once you are set up with resin.io, you need to add your resin.io application's remote (the exact url will vary for different users, so consult the Resin docs to get started with a new app):

git remote add resin [email protected]:gh_kermit666/homeautomator.git

and push the code to the newly added remote:

git push resin master

It should take a few minutes for the code to push. While you wait, enable device URLs so the server can be accessed outside of its local network. This option can be found in the Actions tab in your device dashboard.

Actions Tab

Once the device is updated, you should see this in your logs: log output

Then in your browser you should be able to open the device URL and see web app.

Development

Install & configure Docker-machine. Build the image:

docker build -f Dockerfile.dev.base -t resin/armv7hf-debian . # only once
docker build -t homeautomator .

You can now run it:

docker run -i -p 8080:80 homeautomator

And open it on the Docker-machine url (docker-machine ip default) and port 8080, e.g. http://192.168.99.100:8080/.

No Docker?

If you just want to run the Flask web app, install requirements in a venv:

python3 -m venv venv # only once
source venv/bin/activate
pip install -r src/requirements.txt # only after updates

and run it:

honcho -f Procfile.dev start

Cleanup

You clean all the stopped Docker containers with:

docker rm $(docker ps -a -q -f status=exited)

and the Docker images with:

docker rmi -f $(docker images -a | grep "<none>" | awk "{print \$3}")

resin-home-automator's People

Contributors

metakermit 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.