Python Flash API for displaying temperatures as color gradients
Clone the project locally on your webserver [/var/www]
Create the Apache configuration to point to this project (Python Flask API)
Required Packages for Python Flash on Apache
<VirtualHost *:80>
ServerAdmin webmaster@mytempuratureapi.com
ServerName mytempuratureapi.com
ServerAlias mytempuratureapi.com
DocumentRoot /var/www/temperatureapi
ErrorLog /var/www/temperatureapi/error.log
CustomLog /var/www/temperatureapi/access.log combined
WSGIDaemonProcess temperatureapp user=khinds group=khinds threads=5
WSGIProcessGroup temperatureapp
WSGIScriptAlias / /var/www/temperatureapi/app.wsgi
<Directory /var/www/temperatureapi>
Require all granted
</Directory>
</VirtualHost>
Copy settings-shadow.py to your own version of settings.py with your own values place in
# device API url for gathering temperatures deviceLoggerAPI = 'http://mywebsite.net'
# webroot for the clock wall tablet to show the current house conditions clockTabletImageRoot = '/var/www/clocktablet/img/'
*/5 * * * * python /var/www/TemperatureAPI/home.py
You can now ask for color gradients for given environment temperatures
http://mytempuratureapi.com/?temperature=72 http://mytempuratureapi.com/multiple?temperatures=72,23,89