Close

Small scale test

A project log for Soil moisture monitoring in a flower garden

When do your flowers have enough water, and how do you know?

Joseph EoffJoseph Eoff 03/02/2021 at 20:520 Comments

Before getting too carried away, I setup a small prototype system on my desk.

Nothing complicated:

  1. A NodeMCU ESP32S running the flora firmware.
  2. A simple MQTT client in Python that just prints out all received messages.
  3. A Mosquitto MQTT server installed on my computer rather than on a separate server machine.
  4. An OEM relabeled (cheaper) Xiaomi MiFlora sensor.

The test setup looked like this:

There's the output from the MQTT server process on screen to the left, and the output of a simple MQTT client in Python on the right.

There's an ESP32S hanging there on the left side, and the sensor standing there to the right of the monitor logo.

Those are the basic parts of the system.

Once I got a new enough version of the Arduino IDE to run on my OpenSuse Linux powered computer, the rest was pretty easy.  It was in fact so easy that the hardware side doesn't worry me - I can concentrate most of my efforts on the PC software for collecting and analysing the data.

The MQTT server will run on a Raspberry Pi (with an SSD harddrive rather than just an SD card.)  There will also be a small web-server with Django on the Pi. MQTT transports the data, and a another process uses MQTT and the Django libraries to dump it into a database. There'll be a Django based web site for managing the sensors and collectors as well as viewing the data.

I haven't yet decided whether I want to try to squeeze the heat map and animation generator into the Django site, or whether I'd rather make it a regular desktop program that taps into the Django database.

Discussions