DS18B20 temperature sensor, read from a shared OneWireBusMaster’s cache instead of sysfs directly.
Arguments
Bold arguments are mandatory. For more information on the listed arguments refer to the class documentation: herosdevices.hardware.analog_devices.ds18b20.DS18B20BusConsumer If parameters appear in this list but not in the class definition, please recursively check the linked base classes for the definition of the parameter.
Argument
Type
Default Value
Description
bus_master
<class ‘herosdevices.core.bus.onewire.OneWireBusMaster’>
the OneWireBusMaster (typically a RemoteHERO proxy to one) that polls the physical bus this device lives on.
device_id
<class ‘str’>
id of the onewire device as named by the w1 Linux kernel driver (e.g. “28-00000df6f834”).
Example JSON for BOSS
The following JSON strings can be used to start a HERO device representation of DS18B20BusConsumer using BOSS .
{
"_id" : "device_ds18b20_table_right" ,
"classname" : "herosdevices.hardware.analog_devices.DS18B20BusConsumer" ,
"arguments" : {
"bus_master" : "$device_w1therm_bus" ,
"device_id" : "28-00000e1e6004"
},
"datasource" : {
"async" : false ,
"observables" : {
"temperature" : {
"conversion" : "x / 1000" ,
"unit" : "degC" ,
"boundaries" : [
[
21 ,
22
],
[
20 ,
24
],
[
15 ,
30
]
]
}
},
"interval" : 15
}
}
from examples/analog_devices/ds18b20_bus.json
{
"_id" : "my_DS18B20BusConsumer" ,
"classname" : "herosdevices.hardware.analog_devices.ds18b20.DS18B20BusConsumer" ,
"arguments" : {
"bus_master" : "<class 'herosdevices.core.bus.onewire.OneWireBusMaster'>" ,
"device_id" : "<class 'str'>"
}
}
generated from signature
Inheritance
digraph inheritance40f16c97c5 {
bgcolor=transparent;
rankdir=TB;
size="";
"herosdevices.core.bus.onewire.OneWireBusConsumer" [URL="../../../autoapi/herosdevices/core/bus/onewire/index.html#herosdevices.core.bus.onewire.OneWireBusConsumer",color="#5fabe8",fillcolor="#5fabe827",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,penwidth=2,shape=box,style="rounded,filled",target="_top",tooltip="A read-only onewire device that sources its raw value from a OneWireBusMaster instead of sysfs."];
"herosdevices.core.bus.onewire.W1ThermBusConsumer" [URL="../../../autoapi/herosdevices/core/bus/onewire/index.html#herosdevices.core.bus.onewire.W1ThermBusConsumer",color="#5fabe8",fillcolor="#5fabe827",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,penwidth=2,shape=box,style="rounded,filled",target="_top",tooltip="w1_therm sensor, read from a shared OneWireBusMaster's cache instead of sysfs directly."];
"herosdevices.core.bus.onewire.OneWireBusConsumer" -> "herosdevices.core.bus.onewire.W1ThermBusConsumer" [arrowsize=1,color="#5fabe8",dir="back",penwidth=2,style="setlinewidth(0.5)"];
"herosdevices.hardware.analog_devices.ds18b20.DS18B20BusConsumer" [URL="../../../autoapi/herosdevices/hardware/analog_devices/ds18b20/index.html#herosdevices.hardware.analog_devices.ds18b20.DS18B20BusConsumer",color="#5fabe8",fillcolor="#5fabe827",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,penwidth=2,shape=box,style="rounded,filled",target="_top",tooltip="DS18B20 temperature sensor, read from a shared OneWireBusMaster's cache instead of sysfs directly."];
"herosdevices.core.bus.onewire.W1ThermBusConsumer" -> "herosdevices.hardware.analog_devices.ds18b20.DS18B20BusConsumer" [arrowsize=1,color="#5fabe8",dir="back",penwidth=2,style="setlinewidth(0.5)"];
"herosdevices.interfaces.atomiq.Measurable" -> "herosdevices.hardware.analog_devices.ds18b20.DS18B20BusConsumer" [arrowsize=1,color="#5fabe8",dir="back",penwidth=2,style="setlinewidth(0.5)"];
"herosdevices.interfaces.Interface" [URL="../../../autoapi/herosdevices/interfaces/index.html#herosdevices.interfaces.Interface",color="#5fabe8",fillcolor="#5fabe827",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,penwidth=2,shape=box,style="rounded,filled",target="_top",tooltip="Generic Interface to describe and check capabilities of a device driver."];
"herosdevices.interfaces.atomiq.AtomiqInterface" [URL="../../../autoapi/herosdevices/interfaces/atomiq/index.html#herosdevices.interfaces.atomiq.AtomiqInterface",color="#5fabe8",fillcolor="#5fabe827",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,penwidth=2,shape=box,style="rounded,filled",target="_top",tooltip="This interface defines the necessary methods for a HERO to seamlessly being converted into an atomiq component."];
"herosdevices.interfaces.Interface" -> "herosdevices.interfaces.atomiq.AtomiqInterface" [arrowsize=1,color="#5fabe8",dir="back",penwidth=2,style="setlinewidth(0.5)"];
"herosdevices.interfaces.atomiq.Measurable" [URL="../../../autoapi/herosdevices/interfaces/atomiq/index.html#herosdevices.interfaces.atomiq.Measurable",color="#5fabe8",fillcolor="#5fabe827",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,penwidth=2,shape=box,style="rounded,filled",target="_top",tooltip="HERO implementation of :external+atomiq:py:class:`atomiq.components.primitives.Measurable`."];
"herosdevices.interfaces.atomiq.AtomiqInterface" -> "herosdevices.interfaces.atomiq.Measurable" [arrowsize=1,color="#5fabe8",dir="back",penwidth=2,style="setlinewidth(0.5)"];
}