Skip to content

home-climate-control/automation-hat-driver

Repository files navigation

Pimoroni Automation HAT Java Driver

Build Status Build Status SonarCloud Reliability Rating Maintainability Rating

What?

This is the Java driver for the Pimoroni Automation HAT.

What for?

The primary driver behind this project (and its predecessor, mqtt-automation-hat-go is the Home Climate Control project.

How?

Prerequisites

  • Run raspi-config and enable I2C in Interfacing Options;
  • Run sudo apt install wiringpi

Build

git clone https://github.com/home-climate-control/automation-hat-driver.git && \
cd automation-hat-driver && \
./gradlew build

Test

Tests are configured in such a way that they will not run on any platform other than Raspberry Pi. Moreover, they have to be explicitly enabled (you don't want tests to fiddle with expensive hardware that the HAT controls). There is a bug in Gradle that requires special treatment - Gradle daemon has to be disabled for running tests:

TEST_AUTOMATION_HAT=safe ./gradlew --no-daemon cleanTest test

Enjoy

If in doubt, drop a note to Home Climate Control user forum, help will come fast.