Skip to content

Latest commit

 

History

History
82 lines (67 loc) · 3.03 KB

README.md

File metadata and controls

82 lines (67 loc) · 3.03 KB

herak-raspberry

Overview

Raspberry Pico applications for monitoring and controlling devices in my house. The code is written using Raspberry C SDK and runs directly on Raspberry Pico W without an Operating System.

Features:

  • Internet connection, using the build-in WiFi module and the lwIP stack.
  • Bluetooth connection to devices, using the build-in Bluetooth module.
  • USB in host mode.
  • NTP client for time synchronization.
  • Logging to a remote rsyslog server.
  • MQTT client.
  • HTTP server.
  • HTTP webhook client.
  • Watchdog.
  • External HD44780 LCD display.

Sensors:

  • Build-in temperature sensor.
  • Sonar AJ-SR04M.
  • One-wire temperature sensors (Dallas DS18S20).
  • Soil moisture sensor with analog and digital inputs.

Devices:

Applications:

Applications are built on top of common library, which provides basic functionality: Internet over WiFi, Bluetooth, remote logging, time synchronization, MQTT client, HTTP client and server, watchdog, USB in host mode, encrypted key-value store. All user specific parameters are defined in params.txt file which must be available at build time in the application directory. The params-example.txt file can be used as a template.

Shaft

Monitors water level in an underground tank using AJ-SR04M sonar sensor and sends the data to a remote MQTT server.

Solar

Monitors Voltronic VM III inverter over USB and DALY BMS over Bluetooth and sends the data to a remote MQTT server.

Irrigation

Reads soil moisture sensor and controls set of SSRs using web commands and sends the data to a remote MQTT server.

Try it out

Prerequisites

  • Raspberry Pico W.
  • Wiring, depending on the use case.

Get the code

The project uses sub-modules, so clone the repo with all sub-modules:

git clone --recurse-submodules https://github.com/tzstoyanov/herak-raspberry

Apply all mandatory patches, which are not yet released upstream. Run in the top directory:

./scripts/apply_patches.sh 

Build

  • Copy params-example.txt file as params.txt in the application directory and modify it with your configuration.
  • In the build/<application> directory, run cmake ../../app/<applicattion>
  • In the build/<application> directory, run make

Installation

  • Attach to your Pico W over USB and start it in the bootloader mode (hold down the BOOTSEL button).
  • Copy the generated image build/<application>/<app-name>.uf2 to your Pico W.

Documentation

License

herak-raspberry is available under the GPLv2.0 or later license.