Skip to content

Commit a21acbf

Browse files
committed
Bump og3 again, revised README (gemini)
1 parent a7722ac commit a21acbf

2 files changed

Lines changed: 78 additions & 37 deletions

File tree

README.md

Lines changed: 77 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,112 @@
11
# Plant133
22

3-
This is a full distribution of the Plant133 plant-watering device. This device can monitor and water up to 4 plants at a time. This repository hosts the firmware, PCBA design, and OpenSCAD code for the all components.
3+
This is a full distribution of the Plant133 plant-watering device. This device can monitor and water up to 4 plants at a time. This repository hosts the firmware, PCBA design, and OpenSCAD code for all components.
44

55
A writeup about this project is at "[Plant1337: "Water 4 plants](https://selectiveappeal.org/posts/plant1337/)."
66

77
![Plant133 device](images/plant1337_deployed_trim-1400x600.webp)
88

9+
## Features
910

10-
## Setup
11+
* **Multi-Plant Support**: Monitors and independently waters up to 4 plants.
12+
* **Sensors**:
13+
* Capacitive soil moisture sensing for each plant.
14+
* SHT3x temperature and humidity sensor for environmental monitoring.
15+
* Reservoir water level float switch detection.
16+
* **User Interface**:
17+
* **OLED Screen**: Rotates through status screens showing IP address, moisture levels, and environment data.
18+
* **Web Dashboard**: A modern Svelte-based responsive web interface for real-time monitoring and configuration.
19+
* **Integration**:
20+
* **MQTT**: Full support for Home Assistant auto-discovery and state reporting.
21+
* **Safety**:
22+
* **Watchdog Timer**: Hardware watchdog protects against system hangs.
23+
* **Dose Limiting**: Prevents over-watering by limiting the maximum number of pump cycles per day.
24+
* **Reservoir Check**: Prevents pump damage by detecting low water levels.
1125

12-
Please see the [instructions](instructions.md) for how to setup a Plant133 device if you are lucky enough to have one.
26+
## Usage
1327

28+
Please see the [instructions](instructions.md) for how to assemble and set up a Plant133 device hardware.
1429

15-
## Software
30+
## Development
1631

17-
This project is built using my C++ framework for ESP devices.
18-
- [og3](https://github.com/chl33/og3) My application framework.
19-
- [og3x-oled](https://github.com/chl33/og3x-oled) Support for the OLED screen I use with this project
20-
- [og3x-shtc3](https://github.com/chl33/og3x-shtc3) Support for the SHTC3 temperature/humidty sensor used by this project.
32+
### Prerequisites
33+
* [PlatformIO](https://platformio.org/) (Core or VSCode extension)
34+
* [Node.js](https://nodejs.org/) (for building the web interface)
2135

22-
The web interface for the project uses the Svelte framework, and was partially generated by Claude (Anthropic). Claude said it was OK to include the code in this MIT-licensed project. The web interface integration is performed using [svelteesp32](https://github.com/BCsabaEngine/svelteesp32).
36+
### Building the Web Interface
37+
The web interface is built with Svelte and must be compiled before uploading to the ESP32's filesystem.
2338

24-
![Plant133 web interface](images/plant133-svelte-interface-v091.jpg)
39+
```bash
40+
cd svelte
41+
npm install
42+
npm run build
43+
```
2544

45+
This generates the static HTML/CSS/JS files in `data/static/`.
2646

47+
### Building and Flashing Firmware
2748

28-
## PCBA
49+
1. **Configure Secrets**: Copy `secrets.ini.example` to `secrets.ini` and set your WiFi credentials, OTA password, and MQTT details.
50+
2. **Build Firmware**:
51+
```bash
52+
pio run
53+
```
54+
3. **Upload Filesystem** (contains the web interface):
55+
```bash
56+
pio run -t uploadfs
57+
```
58+
4. **Upload Firmware**:
59+
```bash
60+
pio run -t upload
61+
```
2962

30-
The full [KiCAD](https://www.kicad.org/) project for the printed circuit board is in the [KiCAD](KiCAD/) subdirectory. KiCAD is a cross platform, open source electronics design system.
63+
## API Reference
3164

32-
![Plant1337 PCBA rendered by KiCAD](images/plant1337-board-kicad.png)
33-
34-
## Components which can be printed with a 3D printer
65+
The device exposes a JSON API for integration and control:
3566

36-
Several components for the Plant133 device are printed with a 3D printer. These are designed as 3D geometry descriptions in [OpenSCAD](https://openscad.org/). The code for these are in the [scad](scad/) subdirectory.
67+
* `GET /api/status`: Returns system status (temp, humidity, water level).
68+
* `GET /api/plants`: Returns configuration for all plants.
69+
* `GET /api/moisture`: Returns current moisture readings.
70+
* `PUT /api/plants/{id}`: Update configuration for a specific plant.
71+
* `POST /test/pump`: Run a pump for a specific duration (JSON body: `{ "pumpId": 1, "duration": 1000 }`).
72+
* `POST /api/restart`: Restart the device.
3773

38-
### Project box
74+
## Software Libraries
3975

40-
OpenSCAD code for the project box housing the PCBA is in the [scad/box/](scad/box/) subdirectory. It requires the library at https://github.com/chl33/ProjectBox.
76+
This project is built using a custom C++ framework for ESP devices:
77+
- [og3](https://github.com/chl33/og3): Application framework.
78+
- [og3x-oled](https://github.com/chl33/og3x-oled): OLED screen support.
79+
- [og3x-shtc3](https://github.com/chl33/og3x-shtc3): SHTC3 sensor support.
80+
- [svelteesp32](https://github.com/BCsabaEngine/svelteesp32): Web interface integration.
4181

42-
![EBox design in OpenSCAD](images/scad-plant133-ebox.png)
82+
## Hardware
4383

44-
### Project box reservoir hanger
84+
### PCBA
4585

46-
Code for a plate which allows you to hang the EBox on the side of a water reservoir is in [scad/ebox_hook](scad/ebox_hook). This is screwed to the bottom part of the EBox.
86+
The full [KiCAD](https://www.kicad.org/) project for the printed circuit board is in the [KiCAD](KiCAD/) subdirectory.
4787

48-
![Reservoir hanger](images/ebox-reservoir-hook.png)
88+
![Plant1337 PCBA rendered by KiCAD](images/plant1337-board-kicad.png)
4989

50-
### Reservoir insert
90+
### 3D Printed Components
5191

52-
Inside the water reservoir, an insert holds a float for detecting the water level and 1-4 aquarium pumps for watering the plants. The code for this insert is in [scad/reservoir_insert](scad/reservoir_insert).
92+
Components are designed in [OpenSCAD](https://openscad.org/). Source code is in the [scad](scad/) subdirectory.
5393

54-
![Reservoir insert with 2 pumps](images/scad-insert-2-pumps.png)
94+
#### Project box
95+
Housing for the PCBA ([scad/box/](scad/box/)).
96+
![EBox design in OpenSCAD](images/scad-plant133-ebox.png)
5597

56-
### Moisture sensor cap
98+
#### Reservoir Hanger
99+
Mounts the box to a water reservoir ([scad/ebox_hook](scad/ebox_hook)).
100+
![Reservoir hanger](images/ebox-reservoir-hook.png)
57101

58-
A cap for the moisture sensor can hold the end of the watering tube in place in the plant's pot, for when the watering spike is not used.
102+
#### Reservoir Insert
103+
Holds pumps and water level float ([scad/reservoir_insert](scad/reservoir_insert)).
104+
![Reservoir insert with 2 pumps](images/scad-insert-2-pumps.png)
59105

106+
#### Moisture Sensor Cap
107+
Holds the watering tube at the sensor location ([scad/moisture_sensor_cap](scad/moisture_sensor_cap)).
60108
![Moisture sensor cap top](images/scad-moisture-sensor-cap-4.png)
61-
![Moisture sensor cap bottom](images/scad-moisture-sensor-cap-bot.png)
62-
63-
### Watering spike
64-
65-
The end of the watering tube can be inserted into a 3D-printed spike with holes in it, which can be inserted into the soil in the plant pot to spread water through the pot.
66-
67-
The spike is printed in two halves which can be epoxied together.
68109

110+
#### Watering Spike
111+
Alternative watering method using a soil spike ([scad/spike](scad/spike)).
69112
![Watering spike half](images/scad-spike.png)
70-
71-
![Spike photo](images/spike.jpg)

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ monitor_filters = esp32_exception_decoder
2525
build_type = release
2626
lib_deps =
2727
; watering
28-
og3@^0.3.98
28+
chl33/og3@^0.3.99
2929
og3x-oled@^0.3.1
3030
og3x-shtc3@^0.3.0
3131
adafruit/Adafruit BusIO

0 commit comments

Comments
 (0)