A temperature and humidity monitoring system with configurable alerts.
This project is part of the IoT Engineering course.
- 2-person teams, building an IoT system.
- 32 hours of work per person, 1 prototype.
- 10' presentation of the project at Demo Day.
- Slides, source code and setup steps on GitHub.
- Both team members are able to explain the project.
See use cases and reference model below.
The following deliverables are mandatory.
Source code, Arduino C, JS or Python, committed to (this) project repo.
Embedded code / microcontroller firmware.
Edit nRF52840_LoRaWAN_DHT11_Device.ino to set TTN NwkSKey, AppSKey and DevAddr:
static const u1_t PROGMEM NWKSKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const u1_t PROGMEM APPSKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const u4_t DEVADDR = 0x00000000;
Embedded code / microcontroller firmware.
Set Wi-Fi credentials
const char *ssid = "MY_SSID";
const char *password = "MY_PASSWORD";
Set ThingSpeak keys
const char *mqttPassword = "TS_MQTT_API_KEY";
const char *channelId = "TS_CHANNEL_ID";
const char *readApiKey = "TS_READ_API_KEY";
Note: the Grove adapter reset issue does not seem to affect this setup. But programming of the ESP8266 only works, if the Grove adapter is removed.
... IoT platform setup steps.
... IoT platform setup steps.
Glue Code used on the gateway or "in the cloud".
Edit index.js to add your TTN AppID:
const appId = "TTN_APP_ID";
and per device TTN device IDs and ThingSpeak Write API keys:
const writeApiKeys = {
"TTN_DEVICE_ID_1": "WRITE_API_KEY_1", // CHANNEL_ID_1
...
}
To deploy the code on Zeit Now, type:
$ cd Nodejs/TtnToThingSpeakAdapter $ now
4-slide presentation, PDF format, committed to (this) project repo.
Use-case of your project.
This project is a temperature and humidity monitoring system with configurable alerts.
Why? "Cellar is too humid", "Oven is ready", ...
Reference model of your project.
Single slide interface documentation.
HTTP API to write to ThingSpeak
$ curl -vX POST https://api.thingspeak.com/update --data 'key=WRITE_API_KEY&field1=23&field2=42'
MQTT API to read from ThingSpeak
$ mqtt sub -t 'channels/CHANNEL_ID/subscribe/json/READ_API_KEY' -h 'mqtt.thingspeak.com' -u 'esp8266-CHANNEL_ID' -P 'MQTT_API_KEY' -p 1883 -q 0
{
"channel_id":0,
"created_at":"2019-04-22T15:44:18Z",
"entry_id":2706,
"field1":"23",
"field2":"42",
"latitude":null,
"longitude":null,
"elevation":null,
"status":null
}
Issues you faced, how you solved them.
Working end-to-end prototype, "device to cloud", part of your 10' presentation.
1) Sensor input on a IoT device triggers an event.
Sensor device
Actuator device
2) The event or measurement shows up online, in an app or Web client.
3) The event triggers actuator output on the same or on a separate IoT device.
Commit and push to (this) project repo before Demo Day, 03.06.2019, 00:00.