Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/creativeprojects/esp32s2-iot
- Owner: creativeprojects
- Created: 2021-04-13T16:25:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-21T16:59:51.000Z (8 months ago)
- Last Synced: 2024-10-12T06:17:30.794Z (2 months ago)
- Topics: bme280, circuitpython, esp32-s2, feather-s2, hc-sr501, homie, iot, mqtt, mqtt-tls, pir-motion, pir-sensor, thermostat
- Language: Python
- Homepage:
- Size: 71.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.