Skip to content

Web Application on RockPi and Cloud

Code Repository

The code for the web application stack that runs the ESP Sampler customer facing interface is located in GitHub here. The web application is hosted on each RockPi so there is a local interface to the device as well as two cloud deployments, one for staging changes for testing and another for production. Both cloud instances are running on AWS EC2 servers.

  1. Production Server: https://prod.readinet.org
  2. Staging Server: https://dev.readinet.org

At the time of this writing, there are three logins for the web application: root, admin, and user. See the ESP team for the passwords.

Sync Mechanism

MQTT - SQLite rows are basis, sync.py. SnycMessage is being thrown over the wire. When something changes on either end, webhooks. JSON of row is

Common Mixin is what converts database row converted to JSON and sent over the wire. Hybrid properties. models.py line 103 is where this happens. ORM is SLQAlchemy. At the bottom of models.py is where sync happens (line 819). Line 832-845 is magic to make sync work.

Change Default Account Passwords in WebApp

In order to change the default passwords for the default accounts in the WebApp, you would edit the web/readinet/scripts/seed.py file (lines 7-22).