esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
415 stars 26 forks source link

DS2482 or DS2484 1-Wire master support #621

Open pilotak opened 4 years ago

pilotak commented 4 years ago

Describe the problem you have/What new integration you would like

It would be nice to have a support for DS2484 or DS2482 so that 1-wire bus is more reliable over a long distance.

Please describe your use case for this integration and alternatives you've tried:

DS18B20 over a long distance

Additional context

https://github.com/cybergibbons/DS2482_OneWire

Misiu commented 4 years ago

+1 on this. I had crazy problems when trying to connect 5 sensors on wires longer than 10m. I was able to connect three sensors without any problems but after connecting fourth sensors one or two sensors didn't return any results. Finally, I've connected a single sensor to wemos d1 mini and put that around the house. This is a workaround. Having this would allow me to remove unneeded wemos boards.

pilotak commented 4 years ago

@Misiu exactly

Erd86 commented 3 years ago

would be great to get DS2482 support in future. There are still sporadic issues in my setup with 7 DS18B20 sensors. If there is something to test, please let me know. I have DS2482-100 available.

Erd86 commented 3 years ago

today I tried to get my ds2482-100 working as a custom sensor component. I used this library: https://github.com/cybergibbons/DS2482_OneWire

Here my h-file. my_custom_sensor.h.txt

and this yaml settings:

sensor:
- platform: custom
  lambda: |-
    auto my_sensor = new MyCustomSensor();
    App.register_component(my_sensor);
    return {my_sensor};

  sensors:
    name: "My Custom Sensor"

i2c:
   - id: bus_a
#     sda: 13
#     scl: 16
     scan: True

Scanning for sensors works great with this code and so I can see all my sensor ids. :-) The problem is now to read the sensor values.. I always get value 255.. :-(

Can anyone please support? I have no programming experience for such a task..

itsieber commented 2 years ago

Do you have found any solution?

saschaludwig commented 1 year ago

With more and more entities reporting OneWire problems all over the place, how good are the chances of getting support for 1-Wire master chips? https://github.com/esphome/issues/issues/3909

green2blue commented 1 year ago

I agree, i have also problems with random scratchpad reading errors, because my wires are longer than 5m. A solid Bus Master would be great. Is there a plan for the future to integrate this?

ericmo1 commented 1 year ago

+1 for integrating support for i2c 1-wire bus masters like DS2482, DS2484. Looking forward to that :-) Have a nice day!

makuser commented 1 year ago

Is someone by any chance already working on this?

mknjc commented 1 year ago

I've started writing a component (https://github.com/mknjc/esphome/tree/ds248x). Its mostly copied from the dallas component. Its already working with DS18B20 sensors on an esp32 with a ds2484.

TODOs:

I would love to receive some help

pilotak commented 1 year ago

@mknjc should you need inspiration, here my implementation for mbed https://github.com/pilotak/DS248X

troky commented 1 year ago

I've started writing a component

I can help... can you provide simple config (yaml) example?

pilotak commented 1 year ago

i can test on DS2482-100

itsieber commented 1 year ago

I can also test on multiple DS2482-100

How can install this branch on my homeassistant? Can you give me pls a demo yaml. THX

mknjc commented 1 year ago

Hi, this would be cool. I've updated the repository with optional support for using the sleep pin (needed on my board) and support for bus sleep, active pull up, and strong pull up settings.

An example yaml would be:

external_components:
  - source: github://mknjc/esphome@ds248x
    components:
      - ds248x

i2c:
  sda: 13 # set your i2c pins
  scl: 16 # set your i2c pins
  id: bus_a
  frequency: 400kHz # 400 is the maximum the ds2484 supports

ds248x:
  i2c_id: bus_a
  address: 0x18 # should be the default
  sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress
  active_pullup: true # adds a active pullup which should improve signal integrity
  strong_pullup: true # enables a strong pullup used to provide the needed current for temperature reading without vcc connected
  bus_sleep: true # power down the bus when no transaction is in progres

sensor:
  - platform: ds248x
    address: 0x0 # set your sensor address
    name: "Temp"
    resolution: 12

like the onewire component the esp prints the found sensors on startup.

itsieber commented 1 year ago

THX

1 have installed on two esp's. ESP 1 with 2 Sensors work fine.

ESP 2 with 1 Sensor permanent 85°C

i2c: sda: 22 scl: 21 scan: true id: bus_a

frequency: 400kHz # 400 is the maximum the ds2484 supports`

ds248x: i2c_id: bus_a address: 0x18 # should be the default sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress active_pullup: true # adds a active pullup which should improve signal integrity strong_pullup: true # enables a strong pullup used to provide the needed current for temperature reading without vcc connected bus_sleep: true # power down the bus when no transaction is in progres

sensor:

Result:

[11:55:19][C][i2c.arduino:053]: I2C Bus: [11:55:19][C][i2c.arduino:054]: SDA Pin: GPIO22 [11:55:19][C][i2c.arduino:055]: SCL Pin: GPIO21 [11:55:19][C][i2c.arduino:056]: Frequency: 50000 Hz [11:55:19][C][i2c.arduino:059]: Recovery: bus successfully recovered [11:55:19][I][i2c.arduino:069]: Results from i2c bus scan: [11:55:19][I][i2c.arduino:075]: Found i2c device at address 0x18

[11:55:19][C][ds248x:105]: Sleep Pin: GPIO32 [11:55:19][C][ds248x:107]: Address: 0x18 [11:55:19][D][ds248x:114]: Found sensors:

[11:55:19][C][ds248x:119]: Update Interval: 60.0s

[11:55:19][C][ds248x:122]: Device Class: 'temperature' [11:55:19][C][ds248x:122]: State Class: 'measurement' [11:55:19][C][ds248x:122]: Unit of Measurement: '°C' [11:55:19][C][ds248x:122]: Accuracy Decimals: 1 [11:55:19][C][ds248x:130]: Address: 0x20000005fe78db28 [11:55:19][C][ds248x:131]: Resolution: 12 [11:55:19][C][captive_portal:088]: Captive Portal:

[11:55:19][C][mdns:109]: Hostname: 1w-pool [11:55:19][C][ota:093]: Over-The-Air Updates: [11:55:19][C][ota:094]: Address: 1w-pool.local:3232 [11:55:19][C][ota:097]: Using Password. [11:55:19][C][api:138]: API Server: [11:55:19][C][api:139]: Address: 1w-pool.local:6053 [11:55:19][C][api:143]: Using noise encryption: NO [11:56:03][D][ds248x:184]: 'PoolT': Got Temperature=85.0°C [11:56:03][D][sensor:094]: 'PoolT': Sending state 85.00000 °C with 1 decimals of accuracy

pilotak commented 1 year ago

@itsieber this is due to weak pull up.

@mknjc test results

itsieber commented 1 year ago

What do you mean "weal pull up"? Where can i search it to fix it?

pilotak commented 1 year ago

@itsieber DS18B20 needs more power in order to do temp conversion, standard pullup 4K7 is not enough - this is the reason MAXIM intergrated strong pull up feature. Or you can skip APU & SPU and put 1K resistor between IO and VCC

pilotak commented 1 year ago

I should mention that above tests were done in parasitic mode

in "classic mode"

randybb commented 1 year ago

Will test that... Anyway, can it be modified to be more universal, as the original dallas component supports only temp sensors? With this we could support addressable switches, counters DS2423, key fobs (iButton),...

makuser commented 1 year ago

Will test that... Anyway, can it be modified to be more universal, as the original dallas component supports only temp sensors? With this we could support addressable switches, counters DS2423, key fobs (iButton),...

That's what I also wanted to comment on. I'd really like to have it unified into a single component (the existing dallas component), and depending on the configuration (pin or i2c_addr) the appropriate translation layer would be used. Will share more about this when I have more time.

A unified component makes much more sense though, because it would not require a reimplementation of all the bus members.

itsieber commented 1 year ago

1k Resistor not fix the problem. 1x sensor with 3 wires

mknjc commented 1 year ago

x APU & SPU - wrong readings, i checked on scope and PCTLZ pin never turns on (LOW level)

I've checked the DS2482-101 datasheet (I've tested it only with the DS2484) and it doesn't have a bus sleep mode, maybe it's angry when you set the sleep bit. Have you tried to disable bus sleep? bus_sleep: false

  • no APU +no pullup should not work i believe but it works - maybe APU is not actually turn off?

As far as I understand the DS2484 and the DS2482-101 contains a internal pullup (see datasheet page 2 "1-Wire Weak Pullup Resistor")

ESP 2 with 1 Sensor permanent 85°C

interesting, did you tried to supply the ds18b20 with 5v? You could also try to reduce the adc resolution which might help:

resolution: 9

itsieber commented 1 year ago

its allready on 5v resolution doesnt help wire lenght 2m

mknjc commented 1 year ago

Did you try to disable the bus sleep?

itsieber commented 1 year ago

Yea, same issue

pilotak commented 1 year ago

As far as I understand the DS2484 and the DS2482-101 contains a internal pullup (see datasheet page 2 "1-Wire Weak Pullup Resistor")

silly me you are right, i should have checked the datasheet first

Have you tried to disable bus sleep? bus_sleep: false

yes, still the same, i did some debugging and even if you set SPU config and read the register back it's not set

pilotak commented 1 year ago

i managed to fix the SPU please see https://github.com/mknjc/esphome/pull/2

randybb commented 1 year ago

I have tested it with 4 sensors in TO92 package and with 7 sensors connected via 2m long cables to my heating controller. Everything works fine as before.

mknjc commented 1 year ago

I've used the component for multiple weeks on an ESP32 and an ESP8266 without problems.

@itsieber did you try a version since 12th August? Does your sensor work with the dallas component?

I currently don't find the time to integrate the dallas and the ds248x components better, even though I would try to get ds248x upstream anyway if no other problems arise.

itsieber commented 1 year ago

i have update today. still 85°C

randybb commented 10 months ago

Could you please push this ds248x component to esphome?

timomer commented 9 months ago

Hello,

I'm keen to move away from a pi with PI Zero DS2482 HAT to Arduino with esphome for monitoring my 1-wire sensors. I have basic coding skills and will see if I can assist with testing this code.

I have 3 quick questions before purchasing my components....

  1. Has support for DS2482-800 been considered? This provides 8 1-wire masters and would be helpful to segment a 1-wire network if needed
  2. Is there plans to support DS2438 slave, I plan to use this for monitoring humidity
  3. Can anyone share their schematics for connecting the DS2482 to their Arduino?

Many thanks

mknjc commented 9 months ago

Hello,

thank you. I appreciate every help. Especially writing the esphome documentation would be needed to get the upstreaming process going.

My setup contains only 20 sensors so no segmentation is needed, but I guess it would be easy to add support for the DS2482-800. I don't have any DS2438 to test it, but if somebody is willing to test it, it shouldn't be hard.

timomer commented 9 months ago

Hi,

My issue is that I have a mix-up of Topologies (linear and star), while its around 12 sensors and appears reliable-ish, splitting this into two or three networks would be ideal. The DS2482-800 costs a fair bit more than the DS2482-100, as I would need max 3 channels it may be more affordable to support multiple DS2482-100 - do you believe your integration would allow this if 3 separate "external_components" with independent i2c address are declared?

I will be ordering my parts soon and should get them in January and will do my best to help, ESPHome and 1-Wire are the way forward for me.

Can anyone recommend a DS2482-100 supplier on aliexpress?

I don't have any DS2438 to test it, but if somebody is willing to test it, it shouldn't be hard.

Im happy too

green2blue commented 9 months ago

I want to thank you. I have tried to apply the example that I found above in this Thread and it worked. It would be great if someone can push this to the main project. I have ordered the DS2482-800 on Ali and will receive it at the end of January. If you provide the code I will be happy to test.

[20:53:01][C][wifi:416]: Signal strength: -52 dB ▂▄▆█ [20:53:01][C][wifi:420]: Channel: 11 [20:53:01][C][wifi:421]: Subnet: 255.255.255.0 [20:53:01][C][wifi:422]: Gateway: 192.168.0.1 [20:53:01][C][wifi:423]: DNS1: 192.168.0.1 [20:53:01][C][wifi:424]: DNS2: 192.168.0.1

[20:53:01][C][logger:444]: Level: DEBUG [20:53:01][C][logger:445]: Log Baud Rate: 115200 [20:53:01][C][logger:447]: Hardware UART: UART0 [20:53:01][C][i2c.arduino:053]: I2C Bus: [20:53:01][C][i2c.arduino:054]: SDA Pin: GPIO21 [20:53:01][C][i2c.arduino:055]: SCL Pin: GPIO22 [20:53:01][C][i2c.arduino:056]: Frequency: 400000 Hz [20:53:01][C][i2c.arduino:059]: Recovery: bus successfully recovered [20:53:01][I][i2c.arduino:069]: Results from i2c bus scan: [20:53:01][I][i2c.arduino:075]: Found i2c device at address 0x18

[20:53:01][C][ds248x:105]: Sleep Pin: GPIO32 [20:53:01][C][ds248x:107]: Address: 0x18 [20:53:01][D][ds248x:114]: Found sensors:

[20:53:01][C][ds248x:119]: Update Interval: 60.0s

[20:53:01][C][ds248x:122]: Device Class: 'temperature' [20:53:01][C][ds248x:122]: State Class: 'measurement' [20:53:01][C][ds248x:122]: Unit of Measurement: '°C' [20:53:01][C][ds248x:122]: Accuracy Decimals: 1 [20:53:01][C][ds248x:130]: Address: 0xbc0416639d72ff28 [20:53:01][C][ds248x:131]: Resolution: 12 [20:53:01][C][captive_portal:088]: Captive Portal:

[20:53:01][C][mdns:116]: Hostname: node-test [20:53:01][C][ota:097]: Over-The-Air Updates: [20:53:01][C][ota:098]: Address: node-test.local:3232 [20:53:01][C][ota:101]: Using Password. [20:53:01][C][api:139]: API Server: [20:53:01][C][api:140]: Address: node-test.local:6053 [20:53:01][C][api:142]: Using noise encryption: YES [20:53:22][D][ds248x:199]: 'Temp': Got Temperature=23.6°C [20:53:22][D][sensor:094]: 'Temp': Sending state 23.56250 °C with 1 decimals of accuracy [20:54:22][D][ds248x:199]: 'Temp': Got Temperature=23.6°C [20:54:22][D][sensor:094]: 'Temp': Sending state 23.56250 °C with 1 decimals of accuracy [20:55:22][D][ds248x:199]: 'Temp': Got Temperature=23.9°C [20:55:22][D][sensor:094]: 'Temp': Sending state 23.93750 °C with 1 decimals of accuracy [20:56:22][D][ds248x:199]: 'Temp': Got Temperature=23.5°C [20:56:22][D][sensor:094]: 'Temp': Sending state 23.50000 °C with 1 decimals of accuracy [20:57:22][D][ds248x:199]: 'Temp': Got Temperature=23.4°C [20:57:22][D][sensor:094]: 'Temp': Sending state 23.43750 °C with 1 decimals of accuracy [20:57:44][I][ota:117]: Boot seems successful, resetting boot loop counter. [20:57:44][D][esp32.preferences:114]: Saving 1 preferences to flash... [20:57:44][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed [20:58:22][D][ds248x:199]: 'Temp': Got Temperature=23.5°C [20:58:22][D][sensor:094]: 'Temp': Sending state 23.50000 °C with 1 decimals of accuracy [20:59:22][D][ds248x:199]: 'Temp': Got Temperature=23.4°C [20:59:22][D][sensor:094]: 'Temp': Sending state 23.43750 °C with 1 decimals of accuracy [21:00:22][D][ds248x:199]: 'Temp': Got Temperature=23.4°C [21:00:22][D][sensor:094]: 'Temp': Sending state 23.43750 °C with 1 decimals of accuracy

IMG_2615

green2blue commented 9 months ago

Today I tried all the DS18B20 sensors I have on one big network. These are some Original and Counterfit ones. This Chip is amazing. I have got about 25 Sensors with different Sensors Wire length from 1m to 7m working without any problem on 3.3V.

Here is my config: esphome: name: node-test friendly_name: node-test

esp32: board: esp32dev framework: type: arduino

Enable logging

logger:

web_server: port: 80

external_components:

i2c: sda: GPIO21 # set your i2c pins scl: GPIO22 # set your i2c pins id: bus_a frequency: 400kHz # 400 is the maximum the ds2484 supports

ds248x: i2c_id: bus_a address: 0x18 # should be the default sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress active_pullup: true # adds a active pullup which should improve signal integrity strong_pullup: true # enables a strong pullup used to provide the needed current for temperature reading without vcc connected bus_sleep: true # power down the bus when no transaction is in progres update_interval: 10s

sensor:

6BB53690-BB9D-4FB2-BCB4-E588368732F4_1_102_o

Here is the log: logs_node-test_run.txt

green2blue commented 8 months ago

Hello,

thank you. I appreciate every help. Especially writing the esphome documentation would be needed to get the upstreaming process going.

My setup contains only 20 sensors so no segmentation is needed, but I guess it would be easy to add support for the DS2482-800. I don't have any DS2438 to test it, but if somebody is willing to test it, it shouldn't be hard.

I now have the chip here and can test it. Did you already apply the changes to the code? Is it possible to have multiple of these chips connected? (on the esphome side, i2c I know that is possible I only have to change the address)

timomer commented 6 months ago

Hello,

I finally got the parts delivered and finished stumbling along to build an ESPHome device based on WT32-WTH01 and DS2482-100, also a humidity sensor with a DS2438 and a HIH-4000-001 Honeywell - Humidity Sensor.

Plugging in the humidity sensor into my existing pi with a DS2482-100 HAT shows the sensor in Home Assistant where I can see Temp and Humidity. Plugging into the ESPHome with your external component github://mknjc/esphome@ds248x the humidity sensor is not detected, but Temperature sensors (DS18B20) are.

This is as far as I have gotten, looking over the code I was expecting it to report at least an unknown sensor was detected: https://github.com/mknjc/esphome/blob/67c37246151e152a34282f1a93125f0476401cf9/esphome/components/ds248x/ds248x.cpp#L81 I have increased logging to VERBOSE but no extra info is provided.

Unfortunately this is where I hit the limit of my knowledge, happy to test or given some direction on where in the code adding support for a DS2438 slave is needed.

randybb commented 6 months ago

ESPHome supports only DS18B20 temp sensors. Not sure about the detection mechanism, probably it shows only supported sensors, not everything detected on the bus.

alainstark commented 6 months ago

Hello,

I am very interested in this new module in ESPHome.

My wish is to integrate a reliable network of numerous DS18B20 temperature sensors into Home Assistant.

I went with the Olimex-PoE-ISO microcontroller. I added a voltage adapter to the I2C bus to go from 3.2V to 5V. Behind, I use a DS2482-800 and I compiled my first firmware last night.

And it works :-) With only one sensor for now.

On the other hand, the DS2482-800 has 8 1-wire buses and for the moment, only the first bus (which is configured by default) works.

The component data sheet talks about the C3h "Channel select" command but it is not used in the module's .cpp code.

I also found the code from rickkas7 which dates from 7 years ago but which I found interesting and above all well documented.

I will already self-train on the creation of a new module for ESPHome and then, I am ready to help you improve, or even integrate this module into ESPHome.

IMG_20240319_191455 IMG_20240319_191459

alainstark commented 5 months ago

Hello,

I modified the ds248x component code to add ds2482-800 management and it works :-)

I carried out a test with 14 ds18b20 sensors distributed over five different channels and over long distances using category 7 rj45 cable and everything works correctly.

Here is the yaml configuration file:

esphome:
  name: "olimex-01"
  friendly_name: "olimex-01"

esp32:
  board: esp32-poe-iso

# Enable logging
logger:
  # level: INFO
  level: DEBUG
  # level: VERBOSE
  # level: VERY_VERBOSE

<<: !include inc/olimex_network.yaml
<<: !include inc/auth.yaml

external_components:
  # source: github://mknjc/esphome@ds248x
  source:
    type: local
    path: local_components
  components: [ ds248x ]

i2c:
  sda: GPIO13 # set your i2c pins
  scl: GPIO16 # set your i2c pins
  id: bus_a
  frequency: 400kHz # 400 is the maximum the ds2484 supports

ds248x:
  i2c_id: bus_a
  type: ds2482-800
  address: 0x1f # should be the default
#  sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress
  active_pullup: true # adds a active pullup which should improve signal integrity
  strong_pullup: false
  bus_sleep: false
#  strong_pullup: true # enables a strong pullup used to provide the needed current for temperature reading without vcc connected
#  bus_sleep: true # power down the bus when no transaction is in progres
  update_interval: 10s

sensor:

# Channel 0

  - platform: ds248x
    address: 0x80000002a5fea828
    channel: 0
    name: "Temp-01"
    resolution: 12

  - platform: ds248x
    address: 0x3a000002ceac6928
    channel: 0
    name: "Temp-02"
    resolution: 12

  - platform: ds248x
    address: 0x3a000002ceac6928
    channel: 0
    name: "Temp-03"
    resolution: 12

# Channel 1

  - platform: ds248x
    address: 0xf10000051c169828
    channel: 1
    name: "Temp-04"
    resolution: 12

  - platform: ds248x
    address: 0xda000002cea33128
    channel: 1
    name: "Temp-05"
    resolution: 12

  - platform: ds248x
    address: 0xe9000002ce987728
    channel: 1
    name: "Temp-06"
    resolution: 12

# Channel 2

  - platform: ds248x
    address: 0x78000002a5d9e728
    channel: 2
    name: "Temp-07"
    resolution: 12

  - platform: ds248x
    address: 0xdd000002cde71b28
    channel: 2
    name: "Temp-08"
    resolution: 12

  - platform: ds248x
    address: 0xc8000002ce98db28
    channel: 2
    name: "Temp-09"
    resolution: 12

# Channel 3

  - platform: ds248x
    address: 0xa8000002ceac4628
    channel: 3
    name: "Temp-10"
    resolution: 12

  - platform: ds248x
    address: 0x06000002ce7c0128
    channel: 3
    name: "Temp-11"
    resolution: 12

  - platform: ds248x
    address: 0x520000051c037728
    channel: 3
    name: "Temp-12"
    resolution: 12

# Channel 4

  - platform: ds248x
    address: 0x2b000002a5e59528
    channel: 4
    name: "Temp-13"
    resolution: 12

  - platform: ds248x
    address: 0x2b000002a5e59528
    channel: 4
    name: "Temp-14"
    resolution: 12

and this is the log output:


INFO ESPHome 2024.3.2
INFO Reading configuration /config/esphome/olimex-01.yaml...
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 192.168.5.164 using esphome API
INFO Successfully connected to olimex-01 @ 192.168.5.164 in 0.002s
INFO Successful handshake with olimex-01 @ 192.168.5.164 in 0.067s
[18:06:32][I][app:102]: ESPHome version 2024.3.2 compiled on Apr 12 2024, 17:44:08
[18:06:32][C][logger:166]: Logger:
[18:06:32][C][logger:167]:   Level: DEBUG
[18:06:32][C][logger:169]:   Log Baud Rate: 115200
[18:06:32][C][logger:170]:   Hardware UART: UART0
[18:06:32][C][i2c.arduino:059]: I2C Bus:
[18:06:32][C][i2c.arduino:060]:   SDA Pin: GPIO13
[18:06:32][C][i2c.arduino:061]:   SCL Pin: GPIO16
[18:06:32][C][i2c.arduino:062]:   Frequency: 400000 Hz
[18:06:32][C][i2c.arduino:065]:   Recovery: bus successfully recovered
[18:06:32][I][i2c.arduino:075]: Results from i2c bus scan:
[18:06:32][I][i2c.arduino:081]: Found i2c device at address 0x1F
[18:06:32][C][ds248x:171]: DS248x:
[18:06:32][C][ds248x:175]:   Address: 0x1F
[18:06:32][C][ds248x:182]:   Type: DS2482-800
[18:06:32][D][ds248x:192]:   Found sensors:
[18:06:32][D][ds248x:195]:     0x80000002a5fea828 (channel=0)
[18:06:32][D][ds248x:195]:     0x3a000002ceac6928 (channel=0)
[18:06:32][D][ds248x:195]:     0xd7000002a6185d28 (channel=0)
[18:06:32][D][ds248x:195]:     0xf10000051c169828 (channel=1)
[18:06:32][D][ds248x:195]:     0xda000002cea33128 (channel=1)
[18:06:32][D][ds248x:195]:     0xe9000002ce987728 (channel=1)
[18:06:32][D][ds248x:195]:     0xdd000002cde71b28 (channel=2)
[18:06:32][D][ds248x:195]:     0xc8000002ce98db28 (channel=2)
[18:06:32][D][ds248x:195]:     0x78000002a5d9e728 (channel=2)
[18:06:32][D][ds248x:195]:     0xa8000002ceac4628 (channel=3)
[18:06:32][D][ds248x:195]:     0x06000002ce7c0128 (channel=3)
[18:06:32][D][ds248x:195]:     0x520000051c037728 (channel=3)
[18:06:32][D][ds248x:195]:     0x190000051c268928 (channel=4)
[18:06:32][D][ds248x:195]:     0x2b000002a5e59528 (channel=4)
[18:06:32][C][ds248x:198]:   Update Interval: 10.0s
[18:06:32][C][ds248x:221]:   Device 'Temp-01'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x80000002a5fea828
[18:06:32][C][ds248x:230]:     Channel: 0
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-02'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x3a000002ceac6928
[18:06:32][C][ds248x:230]:     Channel: 0
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-03'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x3a000002ceac6928
[18:06:32][C][ds248x:230]:     Channel: 0
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-04'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0xf10000051c169828
[18:06:32][C][ds248x:230]:     Channel: 1
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-05'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0xda000002cea33128
[18:06:32][C][ds248x:230]:     Channel: 1
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-06'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0xe9000002ce987728
[18:06:32][C][ds248x:230]:     Channel: 1
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-07'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x78000002a5d9e728
[18:06:32][C][ds248x:230]:     Channel: 2
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-08'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0xdd000002cde71b28
[18:06:32][C][ds248x:230]:     Channel: 2
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-09'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0xc8000002ce98db28
[18:06:32][C][ds248x:230]:     Channel: 2
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-10'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0xa8000002ceac4628
[18:06:32][C][ds248x:230]:     Channel: 3
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-11'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x06000002ce7c0128
[18:06:32][C][ds248x:230]:     Channel: 3
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-12'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x520000051c037728
[18:06:32][C][ds248x:230]:     Channel: 3
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-13'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x2b000002a5e59528
[18:06:32][C][ds248x:230]:     Channel: 4
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ds248x:221]:   Device 'Temp-14'
[18:06:32][C][ds248x:221]:     Device Class: 'temperature'
[18:06:32][C][ds248x:221]:     State Class: 'measurement'
[18:06:32][C][ds248x:221]:     Unit of Measurement: '°C'
[18:06:32][C][ds248x:221]:     Accuracy Decimals: 1
[18:06:32][C][ds248x:229]:     Address: 0x2b000002a5e59528
[18:06:32][C][ds248x:230]:     Channel: 4
[18:06:32][C][ds248x:231]:     Resolution: 12
[18:06:32][C][ethernet:294]: Ethernet:
[18:06:32][C][ethernet:467]:   IP Address: 192.168.5.164
[18:06:32][C][ethernet:468]:   Hostname: 'olimex-01'
[18:06:32][C][ethernet:469]:   Subnet: 255.255.255.0
[18:06:32][C][ethernet:470]:   Gateway: 192.168.5.99
[18:06:33][C][ethernet:475]:   DNS1: 192.168.5.4
[18:06:33][C][ethernet:476]:   DNS2: 0.0.0.0
[18:06:33][C][ethernet:493]:   MAC Address: A0:B7:65:F0:85:13
[18:06:33][C][ethernet:498]:   Is Full Duplex: YES
[18:06:33][C][ethernet:503]:   Link Speed: 100
[18:06:33][C][ethernet:306]:   Power Pin: 12
[18:06:33][C][ethernet:308]:   MDC Pin: 23
[18:06:33][C][ethernet:309]:   MDIO Pin: 18
[18:06:33][C][ethernet:310]:   PHY addr: 0
[18:06:33][C][ethernet:312]:   Type: LAN8720
[18:06:33][C][mdns:115]: mDNS:
[18:06:33][C][mdns:116]:   Hostname: olimex-01
[18:06:33][C][ota:096]: Over-The-Air Updates:
[18:06:33][C][ota:097]:   Address: olimex-01.local:3232
[18:06:33][C][ota:100]:   Using Password.
[18:06:33][C][ota:103]:   OTA version: 2.
[18:06:33][C][api:139]: API Server:
[18:06:33][C][api:140]:   Address: olimex-01.local:6053
[18:06:33][C][api:142]:   Using noise encryption: YES
[18:06:40][D][ds248x:342]: 'Temp-01': Got Temperature=17.6°C
[18:06:40][D][sensor:094]: 'Temp-01': Sending state 17.56250 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-02': Got Temperature=17.4°C
[18:06:40][D][sensor:094]: 'Temp-02': Sending state 17.37500 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-03': Got Temperature=17.4°C
[18:06:40][D][sensor:094]: 'Temp-03': Sending state 17.37500 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-04': Got Temperature=17.4°C
[18:06:40][D][sensor:094]: 'Temp-04': Sending state 17.43750 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-05': Got Temperature=17.5°C
[18:06:40][D][sensor:094]: 'Temp-05': Sending state 17.50000 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-06': Got Temperature=17.6°C
[18:06:40][D][sensor:094]: 'Temp-06': Sending state 17.56250 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-07': Got Temperature=17.5°C
[18:06:40][D][sensor:094]: 'Temp-07': Sending state 17.50000 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-08': Got Temperature=17.4°C
[18:06:40][D][sensor:094]: 'Temp-08': Sending state 17.43750 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-09': Got Temperature=17.6°C
[18:06:40][D][sensor:094]: 'Temp-09': Sending state 17.62500 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-10': Got Temperature=17.8°C
[18:06:40][D][sensor:094]: 'Temp-10': Sending state 17.75000 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-11': Got Temperature=17.4°C
[18:06:40][D][sensor:094]: 'Temp-11': Sending state 17.37500 °C with 1 decimals of accuracy
[18:06:40][D][ds248x:342]: 'Temp-12': Got Temperature=17.8°C
[18:06:41][D][sensor:094]: 'Temp-12': Sending state 17.81250 °C with 1 decimals of accuracy
[18:06:41][D][ds248x:342]: 'Temp-13': Got Temperature=17.8°C
[18:06:41][D][sensor:094]: 'Temp-13': Sending state 17.75000 °C with 1 decimals of accuracy
[18:06:41][D][ds248x:342]: 'Temp-14': Got Temperature=17.8°C
[18:06:41][D][sensor:094]: 'Temp-14': Sending state 17.75000 °C with 1 decimals of accuracy

Can you help me to add this new component to esphome ? IMG_20240412_173523 IMG_20240412_173535

timomer commented 1 month ago

Hello all,

Amazing to see the progress with this and now see we have ds2482-800 support!

For my project I need DS2438 sensor support, also I agree with @randybb and @makuser that this should be "unified into a single component" and support additional sensors that HA can already display - this would be the best for ongoing HA community needs.

While I am keen to progress this, I lack the time and experience to do so, my own project I'm struggling to find the time\skill for. Therefore I ask is there a possibility to sponsor a developer for this work? Is there a formal HA way of doing this? I would be keen to support an existing developer to do this and contribute the code back to the community.

From what I can see the outline of work to do is...

  1. Add support for detecting other Sensors that HA can display
  2. Merge this code with ESPHome 1-wire bus component
szogun1987 commented 1 month ago

I'm here to vote this thread up. Recent release added platform parameter to the 1-wire integration. Is it preparation for support of DS2482?

timomer commented 1 week ago

Only just updated ESPHome and seen the recent 1-wire chnages that @szogun1987 has hinted: https://github.com/esphome/esphome/pull/6860

@ssieb the developer says...

The dallas component has been split up into the one_wire bus and the dallas_temp sensor. This will allow for other 1-wire interfaces to be added and other 1-wire devices that aren't temperature sensors.

This sounds very promising to officially support the DS2482-100 and DS2482-800 as interfaces and the DS2438 as a new sensor.

@ssieb are you able to share any additional insight into next steps with 1-wire and ESPHome? I am keen to support this work and happy to sponsor a developer \ the project. As you have done recent work on the 1-wire component can you advise if this is possible? Many thanks