-
Notifications
You must be signed in to change notification settings - Fork 130
1 Wire Temperature
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.
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
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.
xAP broadcasting
+=========+ +===========+ +=============+ +==========+ /-> 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
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) | | | +========================+ +============================+ | +====================================================================================+