https://github.com/sbnet/esp-plant
https://github.com/sbnet/esp-plant
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/sbnet/esp-plant
- Owner: sbnet
- License: mit
- Created: 2026-03-22T15:36:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-22T18:31:46.000Z (3 months ago)
- Last Synced: 2026-03-23T06:48:41.205Z (3 months ago)
- Language: C++
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# esp-plant
Minimal ESP8266 plant monitor with OLED face rendering and a REST API.
## Quick setup
1. Install [PlatformIO](https://platformio.org/).
2. Create a local config file from [`platformio.local.example.ini`](platformio.local.example.ini):
```ini
[env:nodemcuv2]
build_flags =
-I include
-DWIFI_SSID=\"your_wifi_ssid\"
-DWIFI_PASSWORD=\"your_wifi_password\"
```
Save it as `platformio.local.ini` at the project root.
3. Build the firmware:
```bash
pio run
```
4. Upload to board:
```bash
pio run -t upload
```
5. Open serial monitor:
```bash
pio device monitor
```
## REST endpoints
- `GET /status`
- Returns current visual state, simulated readings, and active thresholds.
- `POST /config`
- Updates threshold config.
- JSON body example:
```json
{
"dryMoistureMax": 30,
"goodMoistureMin": 65,
"lowLightMax": 20
}
```
## Notes
- Wi-Fi credentials are loaded from compile-time defines in [`WifiSecrets.h`](include/WifiSecrets.h).
- Local secrets file [`platformio.local.ini`](platformio.local.ini) is ignored by Git via [`.gitignore`](.gitignore).
- Threshold config is persisted in emulated EEPROM with validation and fallback defaults.