Skip to content

Arduino-based compost sensor, integrated with Home Assistant.

License

Notifications You must be signed in to change notification settings

zappityzap/compost-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compost sensor v3

Multiple, independent sensors broadcasting over LoRa to a base station. Sensors are automatically discovered and added with unqiue short IDs. Base station uploads data to Home Assistant with MQTT over WiFi. Soil temperature, air temperature, LoRa and WiFi RSSI, and battery levels. Appears in Home Assistant as a single device:

image

Hardware

Software

  • Latest Ardunio IDE
  • Legacy v1.8.X Arduino IDE (for WiFi firmware updates)

Libraries

All of these except RadioHead can be installed through the library manager in Arduino IDE.

Set up environment

  • Add board to Arduino IDE
  • Install libraries

Update Firmware

  1. Open Arduino IDE (latest)
  2. Open Wifi101 Firmware Updater sketch
  3. Add this line to setup(): WiFi.setPins(8,7,4,2);
  4. Upload Wifi101 firmware updater sketch example
  5. Close Arduino IDE and open legacy Arduino IDE
  6. Open Wifi101 Firmware updater from Tools menu
  7. Select correct port
  8. Test connection
  9. Update firmware

Home Assistant

  1. Set up an MQTT broker like Mosquito
  2. Create a new HA user dedicated to the sensor

Configure

Both RX and TX sketches need a config.h

  1. Copy config.h.example to config.h
  2. Add your WiFi and MQTT details to the RX config.h
  3. Add your soil moisture sensor calibration values to the TX config.h
  4. Upload the RX sketch to the base station
  5. Upload the TX sketch to the sensor

Testing

  1. Monitor serial output on each sensor
  2. Look for Wifi connected
  3. Look for Sensor transmitting
  4. Look for Base receiving sensor data
  5. Check HA to confirm communication

About

Arduino-based compost sensor, integrated with Home Assistant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages