Water Tank Sensors

The Pi running OpenHab is directly below the hot water tank, so rather than adding another wireless node in the airing cupboard, I can run some wired sensors.

Simplest for this purpose is a bunch of DS18B20 sensors, these use a 1-wire protocol which is capable of going the 3-4metre distance. Also only need a three wire cable to connect all the sensors. Used an old mini-circuits box to connect the three sensor cables together with 5kohm resistor pull up in the airing cupboard.

Follow instructions @ https://community.openhab.org/t/gpio-1-wire-temp-sensors-on-raspberry-pi-with-openhabian/20941

On the Pi added the following to /boot/config.txt

# PS - Enable 1-wire sensors
dtoverlay=w1-gpio,gpiopin=4

Use the onewiregpio binding in openhab to retrieve the temperature info, add the three sensors with manually created 1wire.thing:

Thing onewiregpio:sensor:Water_Temperature_1 "Water Temperature 1" [gpio_bus_file="/sys/bus/w1/devices/28-01143f865eaa/w1_slave",refresh_time=10]
Thing onewiregpio:sensor:Water_Temperature_2 "Water Temperature 2" [gpio_bus_file="/sys/bus/w1/devices/28-01143f8d57aa/w1_slave",refresh_time=10]
Thing onewiregpio:sensor:Water_Temperature_3 "Water Temperature 3" [gpio_bus_file="/sys/bus/w1/devices/28-01143d7bdcaa/w1_slave",refresh_time=10]

1wire.items

Number:Temperature Water_Temperature_1      "Temperature: [%.2f %unit%]" <temperature>  { channel="onewiregpio:sensor:Water_Temperature_1:temperature" }
Number:Temperature Water_Temperature_2      "Temperature: [%.2f %unit%]" <temperature>  { channel="onewiregpio:sensor:Water_Temperature_2:temperature" }
Number:Temperature Water_Temperature_3      "Temperature: [%.2f %unit%]" <temperature>  { channel="onewiregpio:sensor:Water_Temperature_3:temperature" }