Plant_io smart plant

Not the first person to do one of these, I’m sure, but I wanted to play around with the Pi Pico W. Using parts and code I adapted from plant_io, I made an IoT enabled self-watering smart plant with some additions and improvements:

  • Water level sensor to monitor the tank water level. Managed to port the C code from the Grove I2C sensor to MicroPython, and I’m using a Grove to Qwiic cable to plug the water sensor directly into the Piicodev port on the shim.
  • The onboard LED blinks while watering
  • Battery level monitoring
  • Online dashboard to remotely monitor the plant’s status and display some statistics
  • Gets the local time from the network, and only waters (if needed) during the the day (7AM to 6PM).
  • Upper and lower limits for the soil moisture level
  • Notifications on my phone if the water tank or batteries are getting low
  • Checks in on the plant every two hours as per the setting on the Nano power timer.
  • Nice plant I selected from Bunnings

There will probably be some bugs to iron out, but I’ll keep a close eye on it over the next few weeks.

It hasn’t had its first auto-water yet, which is why some stats are missing.

3 Likes

The pot is such a good pick for this build :slight_smile:

1 Like

Does it water the plant automatically?

Yes!

Good work Steve.

How are you hosting your plant info?

@Mark285907 I’m using Home Assistant. There’s a REST API I can make post requests to that updates values for sensor entities. Home Assistant takes care of the rest (pun intended).

Update: The Pi Pico W seemed to have drained my batteries overnight.

I have everything in a try: / finally: block, with the power cycling command in finally:. So it should turn off even if something goes wrong in the main part of the code.

I suspect connecting to WiFi and making requests every two hours takes some juice. I’m going to power if off the microUSB port.