A One Wire Act
Pictured is a 19 year old Dallas 1-Wire Demonstration and Development Kit PCB connected to my Model B Raspberry Pi.
That's right!. The 1-Wire Interface is nearly if not 20 years old. The 4/8bit parallel interfaced LCD Character modules are older at about 30 years. The DS1820 Thermometer is the component that is closest to my fingers. The other 1-Wire devices are GPIO devices. One connected to a piezo sensor to detect movement and the other to drive LEDs.
Adding a thermometer IC to a Raspberry Pi can be a very simple affair. One of the main features of Dalla's (Now a part of Maxim) 1-Wire Interface is that their devices can operate from parasitic power hence reducing the interface to one wire (plus a ground reference). Maxim have a range of iButtons that present only two contacts to prove my point.
Dynamic 1-Wire device insertion and removal testing shows that the current driver only supports the detection and insertion of new devices but not the deletion of removed devices from the /sys/bus/w1/device directory.
Interestingly a VDD between 2.8-5.5V is recommended to enable I/O functions for the DS2812 but a lower minimum voltage of 4.3V is required for +/- 0.5 degree Temperature conversions. This explains why VDD is connected to a voltage source rather than being tied to GND and relying upon parasitic power.
My testing shows that if you don't then you get correct device responses but useless thermometer readings.
Enabling 1 wire support is easy.
Firstly load the w1 LKM using;
$sudo modprobe w1-gpio
From this and if all is working a new directory called /sys/bus/w1/devices should exist.
If you perform an ls on this directory you'll find all of the connected w1 devices by their serial numbers.
From the desired /sys/bus/w1/devices/<device> directory of a supported device you can run cat w1_slave to obtain its current register values.
For me this works without the need of loading the w1-therm LKM for the DS1820 and DS18B20 by sudo modprobe w1-therm.
The module must be loaded otherwise the reading would not be translated into a temperature.
If it doesn't work for you I suggest loading it manually.
From here it should be hard to get OpenHAB to process its readings.