Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/creativeprojects/esp32s2-iot

Simple thermostat and motion detection using a ESP32-S2 and MQTT
https://github.com/creativeprojects/esp32s2-iot

bme280 circuitpython esp32-s2 feather-s2 hc-sr501 homie iot mqtt mqtt-tls pir-motion pir-sensor thermostat

Last synced: about 1 month ago
JSON representation

Simple thermostat and motion detection using a ESP32-S2 and MQTT

Awesome Lists containing this project

README

        

# esp32s2-iot

Send temperature, humidity, pressure, ambient light, and motion detection to MQTT (using homie protocol).
Get feedback from the board LED.

## hardware

* Microcontroller: Unexpectedmaker FeatherS2
* Temperature sensor: BME280 via I2C bus
* Motion sensor: HC-SR501 PIR on pin D13 (11)

## config

`config.py`
```python
config = {
"name": "esp32s2",
"wifi_ssid": "MY WIFI",
"wifi_password": "",
"mqtt_broker": "mqtt.example.com",
"mqtt_port": 1883,
"mqtt_use_tls": False,
"mqtt_username": None,
"mqtt_password": None,
"sleep": 600, # measurement cycle in seconds
"watchdog_timer": 800, # no response in seconds
"ca_data": "CA certificate in PEM format",
}
```

## TLS

Version 1.4.0 now supports connection to MQTT brokers using TLS.
You need to provide the CA certificate in PEM format in the `config.py` file.