Features
Read more- Collects soil moisture, air humidity, temperature and pressure
- Button push (A) for watering
- Reuses configued Wifi connection
- Publishes Home Assistant state
- Support Home Assistant auto-discovery
- Reconnect to Wifi with a button (B)
- Send manual MQTT configuration and state with a button (C)
- Signal lack of water with RGB bar (on M5Stack Fire) and warning image
Hardware
- Plug the ENV unit in Port A
- Plug the Watering unit in port B
- Plant the Watering unit in the soil
- Connect the internal pipe of the watering unit to a water recipient
- Put the external pipe of the watering unit in the soil
- Boot the M5Stack in wifi mode
Software
- Download or clone this same repository
- Open M5Stack UI Flow and connect your M5Stack using the API Key
- Open the src/drunken_plant.m5f file in M5Stack UI Flow
In the readSensors function, update the from low and from high values according to your Watering unit calibration.
- Update the MQTT configuration in the code to suit your own MQTT server.
- Still in UI Flow, use the Manager to upload the code and images to the device.
Note : Swap Unit Env II with Unit Env III in UI Flow if needed as the former has reached its end of life.
Usage- When started, the application connects to the existing Wifi, initiates the MQTT client configuration and publishes the Home Assistant discovery message.
- Every 30 seconds, it reads the sensors values, updates the displayed values and publishes the state messages for Home Assistant on MQTT.
- Press button A to start watering. Release the button to stop.
- Press button B to re-initiate the wifi connection sequence (will be triggered only when disconnected).
- Press button C to manually publish the Home Assistant configuration and sensors state to MQTT.
- Icons for button actions
- Watering via MQTT
- Show battery and wifi status
Comments