1-Wire on different device

Hi All,
Just starting my HA journey - and I’m looking to shift my current home made (programmed) home heating to HA.
The setup at present is:
lots of DS18b20’s dotted around connected to 3 RPI’s
the data gets written off to mariadb
some python scripts check if the zone is cold and turn on/off a relay acordingly.

My HA is running on a VM on a repurposed desktop via HASS.IO.

What i am looking for is a way for my pi’s to report the ds18b20 data to Home Assistant, ideally without too many scripts as a go between for the ease of support/replacements.

I was hoping to use the 1-Wire module, but it seems that the ds18b20 needs to be connected to the same hardware that HA is running on.

Any ideas?

Take a look at this page Raspberry Pi with DS18B20 temperature sensors :: Cavelab blog — Stories from the Cavelab. I just set up a system similar to what you have and it works well.

I would install Mosquitto either on one of the Pi’s or on Home Assistant itself. Then on each of the PI’s install mosquitto-clients you can then publish whatever data you want to Home Assistant on MQTT (Mosquitto), by using the program mosquitto_pub on the Pi’s. Just set up MQTT sensors on Home Assistant to receive the data:


  - platform: mqtt
    name: "Auditorium Stalls"
    state_topic: "building/dhjm/eobs/auditorium/7d0000043f24ba28"
    unit_of_measurement: '°C'
  - platform: mqtt
    name: "Auditorium Balcony"
    state_topic: "building/dhjm/eobs/auditorium/da0000043f2f6428"
    unit_of_measurement: '°C'
  - platform: template
        friendly_name: "Auditorium Average Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ ((float(states.sensor.auditorium_stalls.state) + float(states.sensor.auditorium_balcony.state)) / 2) | round(1) }}"
  - platform: mqtt
    name: "Blower Room Temperature"
    state_topic: "building/dhjm/eobs/organ/9d00000470ca7628"
    unit_of_measurement: '°C'

Then on the Pi I would simply have a script that runs:

mosquitto_pub -t "building/dhjm/eobs/auditorium/7d0000043f24ba28" -d "14.1" -u "my-user-name" -P "my-password"

Thanks both,

I’ll take a look at setting up MQTT to publish - I already have mosquito setup on HA for tasmota and my alarm, so I guess publishing my sensors may be the cleanest option!