Weather
A weather station on the roof of the plant, as one thing on the screen. HotLoop does not phone anybody to find out it is raining. The station says so: an Ecowitt or a Tempest over MQTT, a Davis or a Vaisala over Modbus, anything over OPC UA. A reading from any of those is already a tag, and a weather entity is the tags of one station, each in its role: the temperature, the humidity, the pressure, the wind, the rain and the sunlight.
No weather service, no API key, no internet. A site whose uplink died three weeks ago still shows the temperature on its own roof. (For where the sun is, see the sun; that is worked out from the site’s latitude and longitude and needs no station at all.)
Building one
Section titled “Building one”A weather entity is made the way a motor is (see Entities): an admin names the tags. On the Entities screen, New equipment, Weather. Or over the API:
POST /api/entities{ "domain": "weather", "name": "Roof station", "bindings": [ {"role": "temperature", "device_id": "roof", "tag_name": "Temp"}, {"role": "humidity", "device_id": "roof", "tag_name": "Humidity"}, {"role": "wind_speed", "device_id": "roof", "tag_name": "Wind"}, {"role": "wind_bearing","device_id": "roof", "tag_name": "Bearing"} ]}Only temperature is required. A station with no rain gauge has no rain_rate
and shows no rain row. Every role takes a number tag, and none of them is
written: a station is read, never commanded, so no tag has to be armed and the
entity takes no service.
| Role | Details | Attribute it makes |
|---|---|---|
temperature |
required, the state | unit_of_measurement |
humidity |
relative humidity, percent | humidity |
pressure |
air pressure, in the tag’s unit | pressure |
wind_speed |
average wind | wind_speed |
wind_gust |
strongest recent gust | wind_gust |
wind_bearing |
where the wind comes from, 0 to 360 degrees | wind_bearing |
rain_rate |
how hard it is raining now | rain_rate |
rain_today |
rain since midnight | rain_today |
solar_radiation |
sunlight on the sensor, usually W/m² | solar_radiation |
uv_index |
the UV index | uv_index |
Each attribute also carries <name>_unit with the unit of its tag, so a screen
never has to guess whether the pressure is in hPa or inHg.
What is worked out on the box
Section titled “What is worked out on the box”Three values a station rarely sends, worked out from its own readings:
| Attribute | From | How |
|---|---|---|
dew_point |
temperature, humidity | The Magnus formula (Sonntag 1990), held to the psychrometric tables from 0 to 30 °C |
heat_index |
temperature, humidity | The National Weather Service’s Rothfusz regression with its two published adjustments. It only exists from 80 °F (26.7 °C) up, because that is where the NWS stops using it |
wind_chill |
temperature, wind speed | The NWS 2001 index. It only exists at or below 50 °F (10 °C) with wind over 3 mph, the range it was fitted to |
They come back in the temperature’s own unit, so a station in degrees Fahrenheit
gets a dew point in degrees Fahrenheit. Temperature units HotLoop converts are
°C, °F and K, and wind units m/s, km/h, mph, knots and ft/s, read from the tag’s
unit. A temperature tag with no unit is not converted by guessing: the entity’s
own unit_of_measurement can say what it is, and without either, nothing is
worked out from it.
The heat index and the wind chill are not failures when they are missing. Below 80 °F there is no heat index, and in calm or warm air there is no wind chill, so the card has no row for them.
A missing reading is not zero
Section titled “A missing reading is not zero”A weather entity is never optimistic, and never fills a gap with a number.
- A sensor that is not bound is not a row.
- A sensor that is bound and cannot be read right now (its tag is bad, its device
is down, nothing has arrived yet) is left out of the attributes and named in
unavailable. The card says Unavailable where its number would be. - A reading that cannot be a measurement is treated the same way: a humidity above 105 percent, a bearing outside 0 to 360 degrees, a negative rainfall or wind speed. A humidity of 101 or 102, which a sensor in fog reads, is shown as 100. A pyranometer’s small negative reading at night is shown as 0.
- A value worked out from a reading that is unavailable is unavailable too, and
is named: no humidity means no
dew_pointand noheat_index. - If the temperature cannot be read, the state is
unknown(orunavailablewhen the device is down), with the usual quality, and the rest of the card still shows what the other sensors say.
On the screen
Section titled “On the screen”On the Entities screen a weather station is one tile: the temperature in large type, and under it a row for each reading the station gives, in a fixed order (humidity, pressure, wind, wind direction, gusts, rain rate, rain today, sunlight, UV index, dew point, heat index, wind chill). The temperature has the usual trend line. The card reads in every language the UI has, and lays out right to left in Arabic.
Agents read and build a station through the tools every entity has, and one that tells them what a station takes:
| Tool | Does |
|---|---|
list_composite_entities |
Reads what create_entity can make, each domain with its roles, which are required and which a service writes. Weather has ten roles, one required, and no services |
create_entity |
Builds a station from tags, as POST /api/entities. It needs a reason and the MCP write switch like every change |
get_states |
Reads one: the state is the temperature, and the text a model reads lists every attribute beside it, unavailable included |
list_entities |
Finds stations with domain: weather |
delete_entity |
Removes one |
call_service on a weather entity is refused: it takes no service.
What it does not do
Section titled “What it does not do”- It does not forecast. There is no forecast without asking somebody else, and HotLoop does not.
- It does not log a station’s temperature as logbook rows, the way no sensor does. The history is the tag’s: the trend line on the tile is the temperature tag’s, and every other tag is in the historian like any other.
- It does not read a station for you. The station arrives as tags first: add its device (MQTT, Modbus or OPC UA), then bind the tags.