@MatthiasU has a link to the repository where his work is in the third post of this thread.
Below is a sanitized version of the One Wire section from my configuration.yaml
. I had my owserver setup long before on another computer. I would suggest using owserver in your configuration if you can, as in the past I have found the OWFS to not be as reliable and to have more issue than OWserver. If it is on the same computer you can use localhost as the host name. Port 4304 is the default port if you have not set one up for owserver.
I do have a handful of family 28 temperature sensors (DS18B20+) that auto configure. I have set friendly names for them in customize.yaml. This can be done in the web interface under Configuration > Customizations. Then set the Name for each sensor.
However to make the unknown one wire sensors work I am using NodeRed with MQTT to make this work. Thus you will see for each sensor or switch:
- platform: mqtt
in the configuration file. I added the Home Assistant MQTT integration for this under Configuration > Integrations.
I will post a sanitized version of my NodeRed configuration below the one wire configuration.
In any case I hope this helps get you on the right track, but if you have any more questions just ask.
Frederick
From configuration.yaml
.
# One Wire
sensor:
- platform: onewire
host: server-running-owserver
port: 4304
- platform: mqtt
name: "Greenhouse Dew Point"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/dew_point"
icon: mdi:water
unit_of_measurement: '°C'
- platform: mqtt
name: "Greenhouse Humidex"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/humidex"
unit_of_measurement: '°C'
icon: mdi:coolant-temperature
- platform: mqtt
name: "Greenhouse Heat Index"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/heat_index"
unit_of_measurement: '°C'
icon: mdi:thermometer-lines
- platform: mqtt
name: "Greenhouse Humidity"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/humidity"
unit_of_measurement: '%'
icon: mdi:water-percent
- platform: mqtt
name: "Greenhouse Light"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/light"
unit_of_measurement: 'lm'
icon: mdi:theme-light-dark
- platform: mqtt
name: "Greenhouse Temperature @ plant level"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/temperature"
unit_of_measurement: '°C'
- platform: mqtt
name: "Greenhouse Barometer"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/pressure"
unit_of_measurement: 'mbar'
icon: mdi:arrow-up-down-bold
- platform: mqtt
name: "GH Alarm LED"
state_topic: "7E.xxxxxxxxxxxx/EDS0068/LED/state"
icon: mdi:led-on
switch:
- platform: mqtt
name: "HB Relay 1"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.0"
command_topic: "29.xxxxxxxxxxxx/PIO.0"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 2"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.1"
command_topic: "29.xxxxxxxxxxxx/PIO.1"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 3"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.2"
command_topic: "29.xxxxxxxxxxxx/PIO.2"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 4"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.3"
command_topic: "29.xxxxxxxxxxxx/PIO.3"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 5"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.4"
command_topic: "29.xxxxxxxxxxxx/PIO.4"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 6"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.5"
command_topic: "29.xxxxxxxxxxxx/PIO.5"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 7"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.6"
command_topic: "29.xxxxxxxxxxxx/PIO.6"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "HB Relay 8"
device:
manufacturer: "Hobby Boards"
model: "8CIO8-R1-A"
identifiers: "29.xxxxxxxxxxxx"
name: "hobby_boards__8_io_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.7"
command_topic: "29.xxxxxxxxxxxx/PIO.7"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 1"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.0"
command_topic: "29.xxxxxxxxxxxx/PIO.0"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 2"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.1"
command_topic: "29.xxxxxxxxxxxx/PIO.1"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 3"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.2"
command_topic: "29.xxxxxxxxxxxx/PIO.2"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 4"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.3"
command_topic: "29.xxxxxxxxxxxx/PIO.3"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 5"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.4"
command_topic: "29.xxxxxxxxxxxx/PIO.4"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 6"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.5"
command_topic: "29.xxxxxxxxxxxx/PIO.5"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 7"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.6"
command_topic: "29.xxxxxxxxxxxx/PIO.6"
payload_on: 1
payload_off: 0
retain: true
- platform: mqtt
name: "Denkovi Relay 8"
device:
manufacturer: "Denkovi"
model: "DAE-8RELAYS-1WIRE"
identifiers: "29.45640C00000"
name: "denkovi_8relays_board_1"
state_topic: "29.xxxxxxxxxxxx/PIO.7"
command_topic: "29.xxxxxxxxxxxx/PIO.7"
payload_on: 1
payload_off: 0
retain: true
First a screenshot of the NodeRed Configuration then the exported configuration.
The top section in the screen shot is for the sensors. The inject nodes query OWserver for the sensor reading which is send via the MQTT out node to the HA MQTT server. In between msg.retain is set to true and one binary sensor state is converted from 1 or 0 to On and Off.
In the bottom section the MQTT in nodes subscribe to the topic for the one wire devices we want to control. This is the send to the OWserver node.
Here is the exported configuration from NodeRed. You can create a new flow then import this into it in NodeRed to give you a head start on building your flow.
[
{
"id": "39173a0d.ce859e",
"type": "tab",
"label": "Owserver",
"disabled": false,
"info": ""
},
{
"id": "74e9cfc0.ba6408",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Humidex",
"topic": "7E.xxxxxxxxxxxx/EDS0068/humidex",
"payload": "",
"payloadType": "str",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 150,
"y": 220,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "b8b7ea5b.cc057",
"type": "change",
"z": "39173a0d.ce859e",
"name": "",
"rules": [
{
"t": "set",
"p": "retain",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1040,
"y": 280,
"wires": [
[
"1b4d15b6.0b6cca",
"27f383a7.d7a38c"
]
]
},
{
"id": "e2b6112d.0de5a",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Dew Point",
"topic": "7E.xxxxxxxxxxxx/EDS0068/dew_point",
"payload": "",
"payloadType": "str",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 150,
"y": 180,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "1b4d15b6.0b6cca",
"type": "mqtt out",
"z": "39173a0d.ce859e",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"broker": "f1bedc54.aad908",
"x": 1250,
"y": 260,
"wires": []
},
{
"id": "27f383a7.d7a38c",
"type": "debug",
"z": "39173a0d.ce859e",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 1270,
"y": 180,
"wires": []
},
{
"id": "d70f815d.ee7068",
"type": "owfs",
"z": "39173a0d.ce859e",
"name": "Ubuntuserver - read",
"uncached": false,
"mode": "read",
"host": "localhost",
"port": "3333",
"paths": [],
"x": 540,
"y": 160,
"wires": [
[
"8625ddc7.56f2c8"
]
]
},
{
"id": "43acf816.d2a408",
"type": "mqtt in",
"z": "39173a0d.ce859e",
"name": "Hobby Boards 8 channel I/O board",
"topic": "29.xxxxxxxxxxxx/#",
"qos": "0",
"datatype": "auto",
"broker": "f1bedc54.aad908",
"x": 200,
"y": 360,
"wires": [
[
"f7691044.2db148"
]
]
},
{
"id": "54d440d0.ee496",
"type": "debug",
"z": "39173a0d.ce859e",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 1030,
"y": 360,
"wires": []
},
{
"id": "eedc1057.bd241",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Humidity",
"topic": "7E.xxxxxxxxxxxx/EDS0068/humidity",
"payload": "",
"payloadType": "str",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 150,
"y": 140,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "a3ad6cbd.7bb9a",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Light",
"topic": "7E.xxxxxxxxxxxx/EDS0068/light",
"payload": "",
"payloadType": "str",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 130,
"y": 100,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "25a2d39e.9cd78c",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Temperature @ plant level",
"topic": "7E.xxxxxxxxxxxx/EDS0068/temperature",
"payload": "",
"payloadType": "str",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 200,
"y": 20,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "eb1afcd4.946038",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Barometer",
"topic": "7E.xxxxxxxxxxxx/EDS0068/pressure",
"payload": "",
"payloadType": "date",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 150,
"y": 60,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "5f54febf.7cd",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Heat Index",
"topic": "7E.xxxxxxxxxxxx/EDS0068/heat_index",
"payload": "",
"payloadType": "date",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 150,
"y": 260,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "9bf3943b.d752e8",
"type": "inject",
"z": "39173a0d.ce859e",
"name": "Greenhouse Environmental Sensor Alarm LED",
"topic": "7E.xxxxxxxxxxxx/EDS0068/LED/state",
"payload": "",
"payloadType": "date",
"repeat": "10",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 220,
"y": 300,
"wires": [
[
"d70f815d.ee7068"
]
]
},
{
"id": "8625ddc7.56f2c8",
"type": "switch",
"z": "39173a0d.ce859e",
"name": "Binary inputs sort",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "7E.xxxxxxxxxxxx/EDS0068/LED/state",
"vt": "str"
},
{
"t": "neq",
"v": "7E.xxxxxxxxxxxx/EDS0068/LED/state",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 770,
"y": 160,
"wires": [
[
"e7db45fd.eebcd"
],
[
"b8b7ea5b.cc057"
]
]
},
{
"id": "e7db45fd.eebcd",
"type": "change",
"z": "39173a0d.ce859e",
"name": "1 to On and 0 to Off",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "num",
"to": "On",
"tot": "str"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "Off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 260,
"wires": [
[
"b8b7ea5b.cc057"
]
]
},
{
"id": "30501bdb.ca641c",
"type": "owfs",
"z": "39173a0d.ce859e",
"name": "OWserver - write",
"uncached": false,
"mode": "write",
"host": "server-running-owserver",
"port": "4304",
"paths": [],
"x": 900,
"y": 480,
"wires": [
[]
]
},
{
"id": "dbf43cef.d02ea8",
"type": "change",
"z": "39173a0d.ce859e",
"name": "\t29.xxxxxxxxxxxx/PIO.0",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "29.xxxxxxxxxxxx/PIO.0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
"y": 500,
"wires": [
[
"f7691044.2db148"
]
]
},
{
"id": "45243106.cf0758",
"type": "mqtt in",
"z": "39173a0d.ce859e",
"name": "Denkovi 8 Channel Relay Board",
"topic": "29.xxxxxxxxxxxx/#",
"qos": "2",
"datatype": "auto",
"broker": "f1bedc54.aad908",
"x": 190,
"y": 420,
"wires": [
[
"f7691044.2db148"
]
]
},
{
"id": "f7691044.2db148",
"type": "change",
"z": "39173a0d.ce859e",
"name": "set msg.retain",
"rules": [
{
"t": "set",
"p": "retain",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 480,
"wires": [
[
"30501bdb.ca641c",
"54d440d0.ee496"
]
]
},
{
"id": "f1bedc54.aad908",
"type": "mqtt-broker",
"z": "",
"name": "owserver",
"broker": "home-assistant-hostname",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": false,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]