Metadata-Version: 2.1
Name: tilty-dashboard
Version: 1.2.0
Summary: A live dashboard for the tilty based on Flask-SocketIO
Home-page: UNKNOWN
Author: Marcus Young
Author-email: 3vilpenguin@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: Flask (==2.1.0)
Requires-Dist: Jinja2 (==2.11.3)
Requires-Dist: Flask-SocketIO (==5.2.0)
Requires-Dist: Flask-SQLAlchemy (==2.4.4)
Requires-Dist: Werkzeug (==2.1.2)
Requires-Dist: Flask-Bootstrap (==3.3.7)
Requires-Dist: Flask-Cors (==3.0.9)
Requires-Dist: gunicorn (==20.0.4)
Requires-Dist: configobj (==5.0.6)
Requires-Dist: eventlet (==0.33.1)
Requires-Dist: flask-session (==0.3.2)
Requires-Dist: urllib3 (==1.26.5)

Tilty Dashboard
===============

[![Coverage Status](https://coveralls.io/repos/github/myoung34/tilty-dashboard/badge.svg)](https://coveralls.io/github/myoung34/tilty-dashboard)
[![PyPI version](https://img.shields.io/pypi/v/tilty-dashboard.svg)](https://pypi.python.org/pypi/tilty-dashboard/)

This is a minimalistic websocket based dashboard for the Tilt hydrometer.

It's fed by sqlite via [tilty](https://github.com/myoung34/tilty)

![](images/dash.gif)

## Installation And Running ##

### Docker ###

```
# assume $(pwd)/data contains tilt.sqlite that is being written to with tilty
$ docker run -it data:/etc/tilty -p 5000:5000 myoung34/tilty-dashboard:latest
# now hit http://localhost:5000
```

### Pip ###

```
$ pip install tilty-dashboard

$ cat <<EOF >/etc/tilty/prod.config
[webapp]
  host=0.0.0.0
  port=5000
  database_uri="sqlite:////etc/tilty/tilt.sqlite"
EOF

$ cat <<EOF >/etc/tilty/prod.configspec
[webapp]
  host=string(default=127.0.0.1)
  port=string(default=5000)
  database_uri=string(default="sqlite:////etc/tilty/tilt.sqlite")
EOF

$ curl -sL https://raw.githubusercontent.com/myoung34/tilty-dashboard/master/config/prod_gunicorn.py >/etc/tilty/gunicorn.py

$ cd /usr/local/lib/python3.7/dist-packages

$ gunicorn --worker-class eventlet -w 1 -c /etc/tilty/gunicorn.py tilty_dashboard:app
```

## Local Development ##

Seed the database:

```
$ make seed
```

Run it in docker:

```
$ docker-compose up
```

Then just hit http://localhost:5000


