|
Post by papa on Feb 3, 2019 19:39:29 GMT
What is a "Thing," a Key OpenHAB Construct?
Previously, the concept of Thing had baffled me. Now through research & experience, I believe it's becoming more understandable. As I see it, a Thing is a physical device and/or service. Such a device and/or service will have one or more channels of information or states. These channels will be of a certain type (like on/off switches, numbers, strings of text, etc). Channels may be read-only, only supplying states or data. Some channels may also be commanded to change their states.
A MQTT Binding's Thing needs a Bridge, a connection to an installed MQTT message broker (like Mosquitto), over which data travels to & from OpenHAB.
According to its supplemental function (time/date related, local network related, weather service related, etc), an OpenHAB addon binding gives OpenHAB access to related data via appropriate devices and/or services. OpenHAB bindings use Things to indicate & offer what types of data are appropriately available from a device and/or service.
A television is a somewhat like an OpenHAB Thing. According to apps & subscriptions, a smart television has "bindings" to a variety of information which come through various channels & apps. A TV has some read only channels. As with a remote control, some of its channels can be commanded to change (volume, media source, etc).
Continues
|
|
|
Post by papa on Feb 3, 2019 19:40:51 GMT
What is a "Thing?" Continued
A DIY Home Automation end node, Node 05 for example, can present as a Thing. Our forum sketch can program it with a selection from a list of devices (types of data) that can be used as channels. Code for a device 40 can read the state of pin connected to a push button. A device 16 can read the state of a pin that actuates an LED or relay AND we can toggle the state of device 16's pin. A DHT sensor (devices 48 & 49) reads air temperature & humidity. All those devices could be channels on a Node/Thing. When configured, a Thing is given a certain standard (e.g. Homie, Generic, etc). All standards, except Generic, are ones that creators have adopted for their device or service. Such standards might help create more of a plug & play environment. A Generic Thing is the most "general" & unstructured standard. More than with other standards, we can tailor a Generic Thing to how its device or service works outside the other standards. We will structure Generic Things with the topics & data constructs of our DIY Home Automation nodes, since our nodes' programming does not fit the other standards.
|
|
|
Post by papa on Dec 18, 2019 22:26:37 GMT
Useful Info from Rich Koshak about Items & Things:"An Item is an abstraction. ... An Item has zero or more links to a Channel on a Thing. The Thing is what knows about MQTT and topics and all that stuff. Items and Things are coequal concepts in openHAB."
|
|