Skip to content
Rick Steeves edited this page Jan 31, 2021 · 1 revision

Table of Contents

Introduction

Every automation system has at least three elements: inputs (for reading measured signals), internal logic and outputs (to control devices). MisterHouse is no different. Aim of this text is to provide basic information on how the temperature readings are captured and processed within MisterHouse.

Temperature readings: basics

MisterHouse can read temperature from many sources. Some modules (example: 'internet_weather.pl') read the temperature from internet sources like NOAA. Other modules (example: 'weather_iB_OWW_client.pl') get their readings from locally attached weather stations like One Wire Weather Station. Before raw temperature readings are fetched into internal logic of MisterHouse, they must be normalized. This task is done by each module separately. Every module has to convert the data it gets from the source into a set of standard variables used by MisterHouse. These variables are stored in '$Weather' hash. Some of the most popular: code $Weather{TempInside} $Weather{HumidInside} $Weather{TempOutside} $Weather{HumidOutside} code

Universal glue: xAP

According to xAP Wiki, xAP is an open protocol intended to support the integration of telemetry and control devices primarily within the home - it is the glue that supports the interconnectivity of Home Automation devices. So xAP is perfect communication layer for connecting inputs and outputs to Misterhouse.

Temperature readings: xAP

xAP broadcasting

code

+=========+ +===========+ +=============+ +==========+ /-> xAP | 1-Wire | USB | owserver | TCP/IP | owfs | file- | oxc | /--> broad- | Adapter | ===> | port:3000 | =====> | listen:3000 | =====> | method= | ---> casting | | | | port | (-s 3000) | system | owfs | \--> +=========+ +===========+ 3000 +=============+ +==========+ \-> UDP:3639

code

And this is how MH reads the xAP messages code

        +====================================================================================+
        |               xAP-enabled MisterHouse                                              |
        | xap_disable = 0 in 'mh_private.ini'                                                |
        | xap_nohub =   0 in 'mh_private.ini'                                                |
        |                                                                                    |

xAP | +==================+ +================+ | broad- | | OWX | $temp_inside | User's code | => $Weather{TempInside} | ======> | -> | OneWire_xAP.pm | $humid_inside | | => $Weather{HumidInside} | casting | |(reads 1-wire xAP | ============> | like | => [...] |

        |    | events)          |               | onewire_xap.pl | =>                        |
        |    +==================+               +================+ => $Weather{TempOutside}  |
        |              ^                                ^                                    |
        |              |                                |                                    |
        |  +========================+     +============================+                     |
        |  |Device definition table |     |    AnalogSensor_Item.pm    |                     |
        |  | items.mht   OR         |     |(functions to map xAP events|                     |
        |  | onewire_xap.mht        |     | to user's code)            |                     |
        |  +========================+     +============================+                     |
        +====================================================================================+

code

code format="bash" code

Clone this wiki locally