Logging data in a house, storing in server database, visualisation on the web.
- Sensors nodes - Moteino
- Hub - Raspberry Pi + Moteino
- Database - MySQL hosted on Dreamhost (update via PHP)
- Web visualisation - D3.js + PHP
- Temperature sensors x5 (2x bedroom, bathroom, kitchen, living room)
- Web sensor (Outside temperature)
- Electricity sensor
- Hot water sensor
Moteino using RF for communication to the hub, DHT-22 for temperature and humidity measurments, AAA(?) batteries for power, 3D printed case.
Using openweathermap.org API for grabbing current conditions in Cambridge.
Temperature read by raspberry pi from DHT-22 temperature sensor, using mala-zaba's Python 3 compatible fork of the Adafruit DHT library: https://github.com/mala-zaba/Adafruit_Python_DHT
Raspberry Pi connected to Moteino. Moteino receives RF temperature readings, communicates to Pi over serial port. Pi updates MySQL database via calls to a PHP script. Pi code written in Python to monitor serial port and report to database. Plugged into power supply.
Temperature database fields:
- datetime
- id (-> relate to friendly name in a config file etc)
- temp
- rh Currently not implemented
http://cutsquash.com/get_week.php?key=KEY_GOES_HERE
Returns past week of readings in json format
Adds a single reading to the temperature database. (Date needs to be formatted correctly)