SESH Dashboard beta. Working dev code. Sesh-dashboard is a dasboard that's designed to display data from you Solar Energy system. It's built on top of python django. Data coming into the system can come form Victron QUattro inverters- Via CCGX/ Enphase micro inverters via Envoy. It also has the capacity to get data from both systems locally through modbus-TCP(CCGX) or scraping of the envoy(web scraping)
Make sure you have Vagrant, Virtualbox and Ansible installed.
Follow the steps below to setup a development environment. This will setup a virtual machine with the required dependencies: If you wish to not use a virtual-machine you can skip to virtualenvonly section.
- Clone this repo:
$ git clone https://github.com/GreatLakesEnergy/sesh-dash-beta.git
- CD into the directory:
$ cd sesh-dash-beta
- First time you run this, it will provision a machine. May take 10-15 minutes to do so:
$ vagrant up
- SSH into the newly created VM:
$ vagrant ssh
- CD into the working directory:
$ cd ~/dev/sesh/
- Install python dependencies:
$ sudo pip install -r requirements.txt
- Install bower
$ sudo npm install -g bower
- Get the UI components:
$ python ./manage.py bower_install
- Collect Static files in one place:
$ python ./manage.py collectstatic
- Make sure system level dependencies are installed first see playbook.yml
- Create a local virtual-env (install virtualenv if you dont have it already):
$ virtualenv <sesh-dash-beta>
- Activate your virtual env
$cd <virtual-env-location>/bin
$source activate
- Install requirements defined in requirements.txt:
$ requirements.txt > pip install -r requirements.txt
- Install bower
$ sudo npm install -g bower
- Get the UI components:
$ python ./manage.py bower_install
You'll need to configure parameters for the APIs and Database. Copy to local_settings_example.ini to settings_local.ini in your repo and put in your api keys and database settings.(contact repo owner for keys). Also setup database parameters
- Sync up local DB if using a local database:
$ python manage.py migrate
- Collect Static files in one place:
$ python ./manage.py collectstatic
- Move ui custom ui components into place:
$ cp -r ./seshdash/sesh-ui ./seshdash/static/
- Create super user:
$ python manage.py createsuperuser
- Run dev server:
$ python manage.py runserver 0.0.0.0:5000
- Now start the browser and hit http://localhost:5000 or http://127.0.0.1:5000 and your application works!!!
- The system requires data to be coming in from the API's this happens asynchronously and periodically
- Start celery with command in a different screen:
$ celery --app=sesh.celery:app worker --loglevel=INFO --beat -E
- victron: http://www.victronenergy.com/live/vrm_portal:vrm_juice_json_api_notes
- weather: https://developer.forecast.io/
- Contact repo owner [email protected]