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:
- Sensor (TX)
- Adafruit Feather M0 with RFM95 LoRa Radio - 900MHz - RadioFruit
- Simple Spring Antenna - 915MHz
- Platinum RTD Sensor - PT1000 - 3 Wire 1 meter long
- Adafruit PT1000 RTD Temperature Sensor Amplifier - MAX31865
- Adafruit STEMMA Soil Sensor - I2C Capacitive Moisture Sensor - JST PH 2mm
- Note: These seem unreliable, and drain the battery. Testing Chirp! sensors next.
- Base Station (RX)
- LiPo batteries
- Stainless steel tube for temperature probe
- Aliexpress Seiko Metal Store
- Length 500mm x 1Pcs, OD5mm X ID4.2mm, feels a little too easy to bend. Easy fit in tube, might allow more epoxy for a stronger bond.
- Length 500mm x 1Pcs, OD5mm X ID4mm, feels stiffer. Need to trim blob of epoxy of on PT1000D for it to fit in.
- Another 150-250mm in length would be nice.
- Be careful buying elsewhere, tolerances on eBay stuff is junk.
- Latest Ardunio IDE
- Legacy v1.8.X Arduino IDE (for WiFi firmware updates), same page, scroll down
- You might need FUSE if the AppImage won't start
- MQTT Explorer is useful for troubleshooting
All of these except RadioHead can be installed through the library manager in Arduino IDE.
- Arduino SAMD
- Adafruit SAMD Boards
- Adafruit Seesaw
- Adafruit MAX31865
- PubSubClient
- RTCZero
- Wifi101
- RadioHead
- home-assistant-integration
- Note: My PR is required for dynamic sensor creation
- Install Arduino IDE
- Open preferences and add this additional board manager URL:
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
- Tools > Board > Board Manager...
- Search for and install
Arduino SAMD Boards
Adafruit SAMD Boards
- Restart the Arudino IDE
- Open the Serial Monitor from the Tools menu
- Try to connect to a board by selecting it from the dropdown
- TODO is there any output with the default sketch? or the blink sketch? no error is probably good enough
- You might need permission to use the serial port:
sudo usermod -aG dialout user
(remember to logout/in) - Install these libraries from the Library Manager (Tools > Manage Libraries...)
Adafruit_MAX31865
Adafruit Seesaw
PubSubClient
RTCZero
Wifi101
- Install
RadioHead
by downloading the latest version and extract the RadioHead folder to~/Arduino/libraries
- Install
ArduinoJSON
cd ~/Arduino/libraries
git clone https://github.com/bblanchon/ArduinoJson.git
- Install my PR of
home-assistant-intergration
:cd ~/Arduino/libraries
git clone https://github.com/zappityzap/arduino-home-assistant.git
cd ~/Arduino/libraries/arduino-home-assistant
git checkout pr-setconfig
- Restart the Arduino IDE
- Open Arduino IDE (latest)
- Open Wifi101 Firmware Updater sketch
- Add this line to setup():
WiFi.setPins(8,7,4,2);
- Upload Wifi101 firmware updater sketch example
- Close Arduino IDE and open legacy Arduino IDE
- Open Wifi101 Firmware updater from Tools menu
- Select correct port
- Test connection
- Update firmware
- Set up an MQTT broker like Mosquito
- Create a new HA user dedicated to the sensor
Both RX and TX sketches need a config.h
- Copy config.h.example to config.h
- Add your WiFi and MQTT details to the RX config.h
- Optional: Add your soil moisture sensor calibration values to the TX config.h
- Upload the RX sketch to the base station
- Upload the TX sketch to the sensor
- Monitor serial output on each sensor
- Look for Wifi connected
- Look for Sensor transmitting
- Look for Base receiving sensor data
- Check HA to confirm communication