SPIOT - Simple Python Internet Of Thing.
- Python API over CGI
- Sqlite database
- Dygraph generated graph
- JustGage gauge display
This minimalist framework allows you to record data in a sqlite3 database. The database format is very portable as it records in flat files. Follow the given examples to build your own html page with the powerful graph based on dygraph.
Spiot does not intend to make a ready web configurable platform. However the simplicity is offered to customise your own page with html.
Download the package above and extract in a folder. Go to the spiot folder and run the python server.
Go to the link below:
The best is to have a LAMP based server with python installed. Copy the spiot folder to the server root. Make sure you have a cgi-bin directory defined to spiot/cgi-bin.
Download and install SPIOT on a given server. This could be the raspberrypi itself.
From the downloaded archive there is a directory called rpi containing python scripts and configuration file. Copy all these files on the raspberrypi (if not already there).
Make sure all .py files are executable:
$ chmod 755 *.py
Open the spiot.config file and modify the csv_forward section. port and hostname variable will be the most important ones for a first test. Keep apikey and node as they are to follow this example.
[csv_forward] port = /dev/ttyAMA0 hostname = myserver/spiot apikey = qbG31dQxFlG55mNM8G5ZTFkF0mrUbWg5 node = 20 baud = 38400
Then run the spiot_csv.py utility.
Then point your webbrowser to the link below:
The last 5 minutes of the first channel will be shown on a graph.