DS248x 1-Wire Bus Master
The ds248x component supports DS2482-100, DS2482-101, DS2482-800, and DS2484 I2C-to-1-Wire bridge chips.
Configure the bridge itself under ds248x, then create one or more 1-Wire bus entries
using the ds248x platform.
NOTE
Every ds248x entry requires a type:. The number of available channels is derived from the selected chip type,
so channel_count is not used.
TIP
If you are using a DS2484 chip with the new unified component, configure it here with type: ds2484.
The legacy 1-Wire Bus via DS2484 page documents the older one_wire platform.
Supported Hardware
Section titled “Supported Hardware”- DS2482-100: Single-channel 1-Wire master.
- DS2482-101: Single-channel 1-Wire master with sleep pin support.
- DS2482-800: 8-channel 1-Wire master.
- DS2484: Single-channel 1-Wire master with adjustable timing and active pullup resistance settings.
Component/Hub
Section titled “Component/Hub”The ds248x component is an I²C-to-1-Wire bridge. An I²C Bus must be defined in your
configuration to use it. The bridge itself is configured under ds248x; each entry then exposes one or more
1-Wire buses via the ds248x platform.
# Example for a single-channel DS2482-100ds248x: - id: hub_1wire type: ds2482-100
one_wire: - platform: ds248x ds248x_id: hub_1wire id: hub_1wire_bus
sensor: - platform: dallas_temp one_wire_id: hub_1wire_bus address: 0x1C0000031EDD2A28 name: TemperatureConfiguration variables
Section titled “Configuration variables”- type (Required, string): The DS248x chip variant. One of
ds2482-100,ds2482-101,ds2482-800, ords2484. - address (Optional, int): The I²C address of the device. Defaults to
0x18. - active_pullup (Optional, boolean): Enable the active pullup feature. Useful for long lines or heavier bus
loads. Defaults to
false. - sleep_pin (Optional, Pin Schema): A GPIO pin connected to the
SLPZpin. Only available fords2482-101andds2484. - bus_sleep (Optional, boolean): Put the 1-Wire bus to sleep when not in use. Only available for
ds2482-101andds2484. Defaults tofalse. - hub_sleep (Optional, boolean): Put the bridge chip to sleep when not in use. Requires
sleep_pinand is only available fords2482-101andds2484. Defaults tofalse. - id (Optional, ID): Manually specify the ID for this DS248x bridge if you need more than one.
- i2c_id (Optional, ID): The ID of the I²C bus to use. Required if you have configured multiple I²C buses.
DS2484-Specific Options
Section titled “DS2484-Specific Options”These options are only available when type: ds2484 is selected. See the datasheet for the exact timing and
resistance mappings.
- reset_low_time (Optional, int): Adjust the reset low time (
tRSTL). Value from0to15. - master_sample_time (Optional, int): Adjust the master sample time (
tMSP). Value from0to15. - write_0_low_time (Optional, int): Adjust the write-0 low time (
tW0L). Value from0to15. - recovery_time (Optional, int): Adjust the recovery time (
tREC0). Value from0to15. - active_pullup_resistance (Optional, string): The active pullup resistance. One of
500ohmor1000ohm.
1-Wire Bus
Section titled “1-Wire Bus”The one_wire platform named ds248x creates the actual 1-Wire bus instances used by devices such as
dallas_temp. Create one entry per channel you want to use.
# Example for an 8-channel DS2482-800ds248x: - id: ds2482_hub type: ds2482-800
one_wire: - platform: ds248x ds248x_id: ds2482_hub channel: 0 id: ow_ch0 - platform: ds248x ds248x_id: ds2482_hub channel: 7 id: ow_ch7
sensor: - platform: dallas_temp one_wire_id: ow_ch0 address: 0x1C0000031EDD2A28 name: Temperature CH0 - platform: dallas_temp one_wire_id: ow_ch7 address: 0x2800000123456789 name: Temperature CH7# Example for a DS2482-101 with sleep supportds248x: - id: ds2482_101_hub type: ds2482-101 sleep_pin: GPIOXX bus_sleep: true hub_sleep: true
one_wire: - platform: ds248x ds248x_id: ds2482_101_hub id: ds2482_101_bus
sensor: - platform: dallas_temp one_wire_id: ds2482_101_bus address: 0x1C0000031EDD2A28 name: Temperature# Example for a DS2484 with advanced timing optionsds248x: - id: ds2484_hub type: ds2484 active_pullup: true active_pullup_resistance: 500ohm reset_low_time: 8 master_sample_time: 8 write_0_low_time: 8 recovery_time: 8
one_wire: - platform: ds248x ds248x_id: ds2484_hub id: ds2484_busConfiguration variables
Section titled “Configuration variables”- ds248x_id (Optional, ID): The ID of the parent
ds248xcomponent. Required if there is more than oneds248xcomponent. - channel (Optional, int): The channel index to use. Defaults to
0. Fords2482-800, valid values are0to7. Fords2482-100,ds2482-101, andds2484, leave this omitted or set it to0. - id (Optional, ID): Manually specify the ID of the 1-Wire bus. Required if you have configured multiple 1-Wire buses.
Finding Sensor Addresses
Section titled “Finding Sensor Addresses”To find the addresses of your 1-Wire devices, upload a configuration with the ds248x and one_wire components set
up and check the logs during boot. Scanning also works before you define any sensor entries.
[I][one_wire:161]: Found device 0x1C0000031EDD2A28Copy the discovered 64-bit address into the matching device configuration, for example in
dallas_temp.
I2C Address Reference
Section titled “I2C Address Reference”The I2C address depends on the chip variant and the state of its address pins.
| Chip | Address Pins | Default Address | Address Range |
|---|---|---|---|
| DS2482-100 | AD0, AD1 | 0x18 | 0x18 to 0x1B |
| DS2482-101 | AD0 | 0x18 | 0x18 to 0x19 |
| DS2482-800 | AD0, AD1, AD2 | 0x18 | 0x18 to 0x1F |
| DS2484 | AD0, AD1 | 0x18 | 0x18 to 0x1B |