1-Wire
The 1-Wire integration supports sensors that use the 1-wire bus for communication.
每个 1-wire 设备都有一个(全局)唯一 ID,用于标识总线上的设备。前两位数字标识设备系列,后 14 位数字是在制造过程中为其指定的全球唯一编号。
不同的系列具有不同的功能并且可以测量不同的数量。
每个 1-wire 组件数据表都描述了该组件提供的不同属性。 owfs 软件 添加了一些额外的工具,使 DIY 实现者更容易使用该组件。
Supported devices:
Binary sensors:
Select:
Sensors:
Switches:
Bridges:
Notes:
-
TAI-8570 压力传感器基于 AAG Electronica 的 1 线复合器件。它在 1 线组件之上还包含气压计、湿度计和照度传感器。此 onewire 平台可以读取并显示来自该设备的值,但传感器将默认为禁用4。
-
对于爱好者来说,使用 DS2438 或 DS2760 系列智能电池监视器作为多用途测量节点是很常见的,只需向 DS2438 或 DS2760 添加一些标准组件,即可将温度、湿度、电流、热电偶温度和亮度置于 1 线总线上。对于不同的组件类型,owfs 中有实现的现成算法。这些是由 owfs 软件公开的,可以通过该平台读取。 B1-R1-A/压力作为大气压力传感器暴露。 S2-R1-A/照度作为照度传感器出现。有关这些属性的更详细说明,请参阅 owfs 文档 DS2438、DS2760。 对于这些组件,更基本的量(温度、VAD、VDD 和 IAD)作为单独的传感器导出。请注意,某些传感器将默认处于禁用状态4。
-
Hobbyboards 是一家销售各种 DIY 板的公司。该公司已经离开市场一段时间了,因此无法提供有关董事会的信息。该平台有其中一些的实现。
-
默认情况下禁用某些传感器以避免总线过载。这些可以通过打开配置中的集成页面、列出 1-Wire 集成器件并更新实体来激活。
-
桥接设备没有传感器。在发现过程中,会在“aux”和“main”分支中搜索其他 1-wire 设备。
-
嵌入式数据系统制造的多传感器。目前仅支持 EDS0066(温度/气压)和 EDS0068(温度/湿度/气压/光照)。
与 1 线总线接口
1-Wire 总线可以使用 owfs 和 owserver 通过网络连接与远程 1-wire 主机连接。
Interface adapter setup
Linux 主机上的“owserver”是 owfs 1-Wire 文件系统 的一部分。使用 1 线接口适配器时,您可以访问运行“owserver”的远程或本地 Linux 主机上的传感器。默认情况下,“owserver”在端口 4304 上运行。使用“host”选项指定远程服务器的主机或 IP,并使用可选的“port”选项更改默认端口。
Configuration
To add the 1-Wire hub to your Home Assistant instance, use this My button:
1-Wire can be auto-discovered by Home Assistant. If an instance is found, it will be shown as Discovered and can be set up right away.
Manual configuration steps
- Browse to your Home Assistant instance.
- Go to Settings > Devices & services.
- In the lower-right corner, select Add integration.
- From the list, select 1-Wire.
- Follow the instructions on screen to complete the setup.
Options
To define options for 1-Wire, follow these steps:
-
In Home Assistant, go to Settings > Devices & services.
-
If multiple instances of 1-Wire are configured, choose the instance you want to configure.
-
On the card, select the cogwheel
. - If the card does not have a cogwheel, the integration does not support options for this device.

-
Edit the options, then select Submit to save the changes.
Entities and attributes
平台启动后,将搜索 1-wire 总线以查找可用的 1-wire 设备。在 Bridge 设备上,会递归搜索“aux”和“main”分支。对于该平台处理的每个设备(请参阅上面支持的设备列表),该平台会为其测量的每个物理量添加一个传感器。传感器的名称是设备 ID,并附加其测量的物理量。不支持的传感器会在日志中注明警告消息。
传感器.28.FF5C68521604_温度
每个传感器将在状态变量中显示其值,并且出于演示目的,模拟值四舍五入到一位小数,计数时四舍五入为整数。
每个传感器还公开一些附加属性。
Removing the integration
此集成遵循标准集成删除。不需要额外的步骤。
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- From the list of devices, select the integration instance you want to remove.
- Next to the entry, select the three-dot
menu. Then, select Delete.
Troubleshooting
温度报告为 85°C
“DS18B20”上的读数为 85°C 可能表示有效值,也可能表示接线问题或断电。
85°C 是
DS18B20的上电复位值。当充当电源的微小内部电容器耗尽时,它可以报告这样的值。
目前无法区分有效和无效的 85°C 值。如果这些值报告不正确,第一步是检查接线(可能确保温度传感器通电,而不是使用寄生电源)。
If all else fails, then a template can be used to filter out the incorrect values:

