The goal is to build a small standalone sensor device for a house automation system. With an Arduino UNO as a sensor manager and an ESPP8266 as a wifi device to communicate with the server.
I use a prototype shield to build the device, and the following sensors:
- A DHT22 temperature and humidity sensor for indoor on pin 2
- A DS18B20 temperature sensor for outdoor temperature on pin 7
- A PIR Motion sensor for indoor on pin 2
temperature sensor Also, a ESP8266 is plugged into the Serial port using pins 0 and 1. The ESP8266 has 2 leds to indicate if it's connected to the Wifi network and the Arduino.
The DS18B20 temperature sensor is outside, I use a toothbrush case as sun shield.
So, to get the sensors values, simply call the url
http://<esp8266_ip_addres>:858/taulas/?command=OVERVIEW
The response will have the following format:
{NAME:TLS0;SENSORS,TEMPINT0:22.5,HUMINT0:27.6,TEMPEXT:1.4,MVT0:0,LUM0:16.0}
The source code is available in the github repository.
Comments