openhab-addons/bundles/org.openhab.binding.onewiregpio
Wouter Born 07a1976c81
Add default translations for binding add-ons (#11760)
* Add default translations for binding add-ons

This makes the texts used by these add-ons translatable with Crowdin.

To keep the PR simple, it only adds default translations for add-ons which do not yet have any default translations properties file.
We can do follow up PRs for adding missing key/values to add-ons that already have these files or to remove duplications.

There are several add-ons in this PR that do have non-English translation files, so I'll upload those to Crowdin when the PR is merged.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-15 18:40:21 +01:00
..
src/main Add default translations for binding add-ons (#11760) 2021-12-15 18:40:21 +01:00
NOTICE added migrated 2.x add-ons 2020-09-21 03:37:19 +02:00
pom.xml applied spotless 2021-06-27 23:25:35 +02:00
README.md [All addons] Review all readme.md files for V3 changes. (#9439) 2020-12-20 14:43:48 +01:00

OneWire GPIO Binding

This binding reads temperature values from OneWire bus sensors connected to the GPIO bus on Raspberry Pi.

Supported Things

Temperature sensors. Tested successfully with DS18B20 sensor on Raspberry Pi 3.

Binding Configuration

The binding requires OneWire sensor to be properly connected to Raspberry Pi GPIO bus, "w1_gpio" and "wire" kernel modules should be loaded. Configuration is proper when /sys/bus/w1/devices folder is present, and contains sensor's data.

Thing Configuration

The sensors are visible in the system as folders containing files with sensor data. By default all OneWire GPIO devices are stored in /sys/bus/w1/devices/DEVICE_ID_FOLDER, and the temperature value is available in the file "w1_slave". The Thing needs full path to the w1_slave file. Note the values in sysfs are in Celsius.

Optional parameter precision makes it easier to lower precision of the sensor value, i.e. precision 1 makes sensor value to show only one digit after the floating point, precision 2 - shows 2 digits. It makes precision reduction with round up, i.e. 20.534C with precision 1 will be 20.5C, 20.555 with same precision will be 20.6C. Allowed values are from 0 to 3. Default value of parameter is 3(max precision).

In the thing file, this looks e.g. like

Thing onewiregpio:sensor:livingRoom "Living room" [gpio_bus_file="/sys/bus/w1/devices/28-0000061b587b/w1_slave",refresh_time=30,precision=1]

Channels

The devices supports currently one channel - "temperature" which allows to read temperature from OneWire temperature sensor.

Full Example

sample onewiregpio.things file content:

Thing onewiregpio:sensor:livingroom "Living room" [gpio_bus_file="/sys/bus/w1/devices/28-0000061b587b/w1_slave",refresh_time=30]

sample onewiregpio.items file content (implements QuantityType for unit conversion):

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

sample demo.sitemap file content:

sitemap demo label="Main Menu"
{
    Text item=LivingRoomTemperature
}