Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
ef6ed35
Home Assistant's live reading is asked for every 30 s, not 5 s
claude Nov 15, 2026
c164db4
Web dashboard: tiles dragged to reorder, hidden by their x or a remov…
claude Nov 15, 2026
e5dac00
Web dashboard: a drag held at the page's edge scrolls to its end only…
claude Nov 15, 2026
4f773cc
Web dashboard: a click on a gauge zooms its tile to fill the window, …
claude Nov 15, 2026
aee3e2b
Web dashboard: a bounce cut short leaves the gallery in place; a doub…
claude Nov 15, 2026
ea3dd58
Web dashboard: the weather behind the tiles, as pixel art on one canv…
claude Nov 15, 2026
ba82f32
Web dashboard: fainter, shorter ice; a framed tile's drag frames; the…
claude Nov 15, 2026
5ec6b97
Web dashboard: the strip's time at the bottom right, its links to its…
claude Nov 15, 2026
8060d34
Web dashboard: the wind's leaves loop on phones too (eddies sized and…
claude Nov 15, 2026
e286675
Web dashboard: a tile's frame unseen until the mouse is over it (stil…
claude Nov 15, 2026
0ebc88b
Web dashboard: the red frame on a tile whose weather calls up an effe…
claude Nov 15, 2026
3676ab3
Web dashboard: zoomed, a tile shows its title and gauge alone, fillin…
claude Nov 15, 2026
36ef446
Web dashboard: Esc mid-zoom goes back from where the tile is drawn (i…
claude Nov 15, 2026
ac88b0e
Tests: the whole suite in about 53 s, down from about 100 (every chec…
claude Nov 16, 2026
3682e73
Web dashboard: the strip says "last reading HH:MM" (was "updated HH:MM")
claude Nov 16, 2026
148a461
Web dashboard: the humidity effect (drips) from 90 % outdoor humidity…
claude Nov 16, 2026
7dc9483
Web dashboard: the wind effect (leaves) above 15 km/h of wind speed (…
claude Nov 16, 2026
4ccce38
Web dashboard: the heat effect from 35 °C outdoors (was 40)
claude Nov 16, 2026
25d4105
Web dashboard: the wind blows from the right: leaves, wisps, gusts, t…
claude Nov 16, 2026
dd886d0
Web dashboard: uv's beams sway slowly a few pixels about their own pl…
claude Nov 16, 2026
6640a69
Web dashboard: "stop animations" at the bottom left, just right of th…
claude Nov 16, 2026
da26927
Web dashboard: a single tile zooms too (a gallery of one: paging only…
claude Nov 16, 2026
65dc190
Web dashboard: MCP_DASHBOARD_ANIMATIONS (on, the default; off: no wea…
claude Nov 16, 2026
05d6539
Tests: the single-tile zoom and MCP_DASHBOARD_ANIMATIONS off ride in …
claude Nov 16, 2026
348d396
Web dashboard: uv's beams sway a third as far, and far more slowly
claude Nov 16, 2026
ce86629
Web dashboard: rain in the wind rides its gust bands, bunching into c…
claude Nov 16, 2026
dca3d55
Web dashboard: the rain and the leaves ride one set of gust bands; cu…
claude Nov 16, 2026
496eba4
Web dashboard: heavy raindrops knock the leaves they hit
claude Nov 16, 2026
40114e3
Web dashboard: a knock measured on the leaf itself; no hit from a dro…
claude Nov 16, 2026
fe83da3
Web dashboard: humidity's beads run down the glass, leaving a wet tra…
claude Nov 16, 2026
737a46f
Web dashboard: humidity's dried tracks cleared from the glass; no bea…
claude Nov 16, 2026
363b97b
Web dashboard: condensation beads form anywhere on the glass, merge a…
claude Nov 16, 2026
67071fc
Web dashboard: humidity's beads as fast as ever on a track, mist bead…
claude Nov 16, 2026
9c889b6
Web dashboard: humidity fogs the glass first, its beads build in the …
claude Nov 16, 2026
2be684b
Web dashboard: humidity's fog half as dense again, beads about three …
claude Nov 16, 2026
36c85ad
Web dashboard: one set of rules for every bead on the glass, humidity…
claude Nov 16, 2026
3c0556c
Web dashboard: "stop animation" (singular) also ends the test links' …
claude Nov 16, 2026
2b9c679
Web dashboard: the thermometers' glass catches the light: a highlight…
claude Nov 16, 2026
04acee4
Web dashboard: frostier ice: feathery fern-like frost crystals, pale …
claude Nov 16, 2026
e084d32
Web dashboard: a wind direction gauge: a compass right after Wind, ma…
claude Nov 16, 2026
f6ebd94
Web dashboard: past-hour red hands and a Gust column: Wind, Rain rate…
claude Nov 16, 2026
1f1d487
Web dashboard: a flash flood: with the station's rain rate over 30 mm…
claude Nov 16, 2026
3c5be67
Web dashboard: a gust over 99 km/h blows a cow, a barn or a chicken a…
claude Nov 16, 2026
20cbfb3
Web dashboard: natural bead trails. On clear glass (a rain bead's, or…
claude Nov 16, 2026
49e115c
Web dashboard: a clearer compass, one thermometer line, beads meet th…
claude Nov 16, 2026
85c557b
Web dashboard: nothing an effect leaves behind comes back once it has…
claude Nov 16, 2026
e00144d
Web dashboard: more natural frost, never twice alike. The ice grows s…
claude Nov 16, 2026
8f5afe3
Web dashboard: leaves that touch a flash flood stick to it and stay w…
claude Nov 16, 2026
d206aa2
Web dashboard: the AQI's effect is a particulate haze, even over the …
claude Nov 16, 2026
6d06749
Web dashboard: frost without snowflakes. The six-armed stars, twigged…
claude Nov 16, 2026
6ada1e8
Tests: the full suite reliably quicker, the zoom's timing checks robu…
claude Nov 16, 2026
8d57dd1
Web dashboard: "stop animation" is no longer a toggle. It stops the a…
claude Nov 16, 2026
995ccbf
Web dashboard: the flash flood choppy in the wind, only the rain both…
claude Nov 16, 2026
24a652b
Revert "Web dashboard: the flash flood choppy in the wind, only the r…
claude Nov 16, 2026
66354c3
Tests: the weather's tests on its own clock, its frames cheaper. Ever…
claude Nov 16, 2026
6a1d18e
Web dashboard: no dots in humidity trails. A condensation bead's trai…
claude Nov 16, 2026
d5357da
Web dashboard: tiny condensation beads stay put and snap together. A …
claude Nov 16, 2026
94df052
Web dashboard: no band words, gauges a little lower. The word under e…
claude Nov 16, 2026
0e235af
Web dashboard: the haze as drifting volumetric clouds, and no ordered…
claude Nov 16, 2026
6b7fe36
Web dashboard: every leaf stuck in a flood sinks and stays. Each of t…
claude Nov 16, 2026
620236b
Web dashboard: the UV beams sway a third as far and a quarter as ofte…
claude Nov 16, 2026
9db4076
Web dashboard: a stalled device shows in the strip, greyed out. The s…
claude Nov 16, 2026
61ccede
Revert "Web dashboard: the UV beams sway a third as far and a quarter…
claude Nov 16, 2026
9093cf6
Web dashboard: low motion mode for e-ink displays. MCP_DASHBOARD_ANIM…
claude Nov 16, 2026
5cba210
Web dashboard: MCP_DASHBOARD_INDOOR hides the indoor tiles. A setting…
claude Nov 16, 2026
63bc30a
Web dashboard: condensation trails go with the fog as it clears. With…
claude Nov 16, 2026
9b51edb
Web dashboard: humidity's frame cost no longer grows the longer it ru…
claude Nov 16, 2026
f57df21
Tests: the live poll's two-readings check waits for them, not a fixed…
claude Nov 16, 2026
ec5a0b0
Tests: the night-across-midnight check at fixed times of day; -n0 nam…
claude Nov 16, 2026
671cb78
Tests: the idle-draft refresh check waits for its four drafts, not a …
claude Nov 16, 2026
08a499f
Web dashboard: humidity's beads outside the shared particle budget, t…
claude Nov 16, 2026
02f4212
Web dashboard: light humidity beads up with tiny ones fastest; heavie…
claude Nov 16, 2026
5625ddf
Tests: humidity's beads outside the shared budget, the rain outside t…
claude Nov 16, 2026
da4874e
Web dashboard: more tiny beads the more humid (light a little fewer t…
claude Nov 16, 2026
2defb41
Web dashboard: every bead fastest down a trail (water on water), fog …
claude Nov 16, 2026
ce2bef7
Tests: more tiny beads in heavy humidity than light, beads running fr…
claude Nov 16, 2026
e4baccc
Web dashboard: the biggest beads (r 2.5 and up) sometimes elongate a …
claude Nov 16, 2026
1713c33
Web dashboard: heavy rain's splash leaves a few droplets on the glass…
claude Nov 16, 2026
a3f118e
Web dashboard: beads run only from about sixteen tiny ones' water (RU…
claude Nov 16, 2026
184ee88
Web dashboard: beads on dry glass run half as fast (PACE dry 0.15, wa…
claude Nov 16, 2026
05c556b
Tests: beads crawling on dry glass (0.15 of fog), running from r 1.4,…
claude Nov 16, 2026
5c24733
Web dashboard: beads on dry glass a little quicker again (PACE dry 0.…
claude Nov 16, 2026
43ba275
ecobot-mcp starts quicker (step 1): holiday calendar on first use, on…
claude Nov 16, 2026
17fbc89
ecobot-mcp answers sooner after start (step 2): the station's live re…
claude Nov 17, 2026
27c65b2
ecobot-mcp answers sooner after start (step 3): the port opens withou…
claude Nov 17, 2026
3c20358
ecobot-mcp answers sooner after start (step 4): a fetch a question wa…
claude Nov 17, 2026
90e7ae7
Dashboard weather: the heat as real heat haze, not squiggles
claude Nov 17, 2026
399522c
Web dashboard: beads on dry glass at 0.3 of fog speed (was 0.25); a h…
claude Nov 17, 2026
95872d2
Dashboard weather: each part of it its own random stream; checks over…
claude Nov 17, 2026
1adb606
Dashboard weather: the heat as a blazing sun's glare, not a shimmer
claude Nov 17, 2026
c2ae11d
Dashboard weather: heavy rain's drops splash in harder, no landing pause
claude Nov 17, 2026
197e053
Web dashboard: a modern compass the size of the dials, today's wind r…
claude Nov 17, 2026
2d65ca4
Web dashboard: the UV's and the particles' tables show their Max alon…
claude Nov 17, 2026
6ca73b7
Web dashboard: the compass's needle red (the red hands' red), over to…
claude Nov 17, 2026
da91021
Web dashboard: the compass's N like E, S and W; no frame on mouseover…
claude Nov 17, 2026
dfc0075
Web dashboard: the humidity's fog cheaper to repaint; a big bead's po…
claude Nov 17, 2026
9243b19
Web dashboard: the heat as faint red beams between the UV's, 40 % lon…
claude Nov 17, 2026
629de23
Web dashboard: the gust link a one-off, never in the URL (?fx=gust ig…
claude Nov 17, 2026
35672fd
Web dashboard: the heat's beams a deep infrared crimson; UV, rain rat…
claude Nov 17, 2026
0df8cb1
Web dashboard: the US AQI tile titled "AQI"; saved layouts naming "US…
claude Nov 17, 2026
88438c4
Web dashboard: "°C | °F" and "km/h | mph" switches left of the strip;…
claude Nov 17, 2026
43c564b
Web dashboard: the bottom-left link reads "stop" (was "stop animation…
claude Nov 17, 2026
128ceb8
Web dashboard: the limit triangles flush with the dial's outer edge, …
claude Nov 17, 2026
0991cd1
Web dashboard: MCP_DASHBOARD_ANIMATIONS redefined. On (the default): …
claude Nov 17, 2026
5064bbc
Web dashboard: Wind's gust as a limit triangle too (no red hand), its…
claude Nov 17, 2026
bb0fd09
Web dashboard: pressure in whole hPa; every dial's hub about half the…
claude Nov 17, 2026
f85e1c9
Web dashboard: no haze of spray along the bottom in heavy rain
claude Nov 17, 2026
69b76b7
Web dashboard: the drag grip 5 dots across, 3 down
claude Nov 17, 2026
7c73258
Web dashboard: today's pressure trend as a little LCD window below th…
claude Nov 17, 2026
0676494
Web dashboard: tiny beads on the fog swell slowly into small ones
claude Nov 17, 2026
6760579
Web dashboard: today's pressure as a glowing blue-violet trace across…
claude Nov 17, 2026
b332e9a
Web dashboard: "hPa | inHg" and "mm | in" switches beside the others;…
claude Nov 17, 2026
772187e
Web dashboard: the pressure's trace lit like a neon tube: a crisp, un…
claude Nov 17, 2026
98a6a72
Web dashboard: the humidity's trails through the fog smooth, no longe…
claude Nov 17, 2026
45b7aa4
Web dashboard: the pressure's trace gone; a thin arrow after its read…
claude Nov 17, 2026
5ef11bd
Web dashboard: no pressure arrow when steady: under 0.3 hPa either wa…
claude Nov 17, 2026
3391e87
Web dashboard: the pressure's arrow plainer and right against the rea…
claude Nov 17, 2026
29ae75e
Web dashboard: a turned phone or tablet lays out as a fresh load (siz…
claude Nov 17, 2026
1fc1f49
Web dashboard: the drag grip 3x4 dots (three across, four down; 15 by…
claude Nov 17, 2026
eac7e8f
Sky: beads on fog never dry or vanish; no condensing at the cap or in…
claude Nov 17, 2026
83b7676
Pressure arrow: 2 px gap after the last digit's ink
claude Nov 17, 2026
98c3a3e
Sky: heavy humidity shows more still beads than light (a larger bead …
claude Nov 17, 2026
535fa46
Web dashboard: a tilted phone's gravity makes the humidity's beads ru…
claude Nov 17, 2026
efd8216
Dashboard: the largest beads swell a little as they swallow a tiny one
claude Nov 17, 2026
06caee5
Dashboard: compass reading shows degrees only (179°, not 179° S)
claude Nov 17, 2026
ea03a41
Dashboard Sky: a bead locked onto another's run follows it all the wa…
claude Nov 17, 2026
db76866
Sky beads: the biggest (r >= 3.6) run steadily on fog and in trails, …
claude Nov 17, 2026
77ee295
Dashboard: rotation re-measured on every signal (resize, orientationc…
claude Nov 17, 2026
61bcbe6
Dashboard tilt: pure screenGravity(ax, ay, angle, ios) derived from f…
claude Nov 17, 2026
5f6acfc
Dashboard tilt: flat pools (no running, beads merge into ever larger …
claude Nov 17, 2026
fd0f846
Dashboard tilt: on iOS the rotation is window.orientation (else the o…
claude Nov 17, 2026
4bcbadb
Dashboard Sky: the weather reaches 100 px past the window's top and b…
claude Nov 17, 2026
f811455
Dashboard Sky: a bead's trail starts at once from its back edge when …
claude Nov 17, 2026
68c3d7b
Dashboard tests: drop the every-effect-at-once scenario; its lasting …
claude Nov 17, 2026
75b13fa
Dashboard flood: the frog paddles instead of sitting on a lily pad: s…
claude Nov 17, 2026
fbb2564
Dashboard: 'reset preferences' leaves the status strip and sits left …
claude Nov 17, 2026
0801f16
Dashboard flood: the frog is gangly: same head, a skinny kinked trunk…
claude Nov 17, 2026
26ce971
Dashboard flood: the frog is twice as elongated below the head: trunk…
claude Nov 17, 2026
707904c
Dashboard flood: the frog's proportions follow the reference images: …
claude Nov 17, 2026
ec37829
Dashboard flood: the frog is a third smaller (sprite 43 x 35, head 15…
claude Nov 17, 2026
2cbb737
Dashboard flood: the frog tucks its knees up beside the belly (recove…
claude Nov 17, 2026
c5ce61a
Dashboard flood: the frog's toes are slightly shorter (7-8 px) and we…
claude Nov 17, 2026
651f4a9
Dashboard flood: the frog's toes peek out farther (8-9 px, 9-10 in th…
claude Nov 17, 2026
4a95898
Dashboard flood: the frog's legs are four-part (thigh, shin, a long a…
claude Nov 17, 2026
df4f86e
Dashboard flood: undo the long legs and Z-fold ankle (4a95898); the t…
claude Nov 17, 2026
9043262
Dashboard flood: back to the c5ce61a frog (7-8 px toes, single light …
claude Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ python -m pytest -m "" # every test, the slow ones too (as CI ru
python -m pytest -m slow # the slow ones alone
python scripts/eval_prompts.py # the saved questions: the reasoning effort (made in code) and the tools' expectations, no key needed
```
Plain `pytest` takes about 19 s on four cores; everything (`-m ""`) about 45 s. The slow tests, 0.5 s or more each run alone (the browser
Plain `pytest` takes about 19 s on four cores; everything (`-m ""`) about 51 s, and must stay under a minute: the browser tests are split
into parts that run side by side, and wait on the page (`calm` in `tests/web_dashboard_browser.js`) rather than for fixed times.
The weather's tests count its own frames and time, never the machine's: each of its frames is a fixed step of its time however long it
took to draw (`window.__skyTest`, see `weatherPage`), and most of its pages are driven (`driven`: the test makes the frames, one after
another, from the same start whatever the load, its randomness seeded: the same frames every run; `SKY_SEED=n` seeds it otherwise, to
see how near a check is to failing). A frame's cost is the page script's own CPU time (`frameCost`), not the clock's. The slow tests, 0.5 s or more each run alone (the browser
tests of the web page, the service evals over every tool, the tests that start servers, the archive's own), are listed in
`tests/slow_tests.txt` and marked `slow` by `tests/conftest.py`; `python scripts/slow_tests.py` measures every test again and rewrites the
list (about two and a half minutes). The slowest fixture, the fake station's 18-month archive (`archived_cache` in `tests/conftest.py`),
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ RUN if [ -n "$COMMIT" ]; then echo "$COMMIT" > .git/HEAD; fi
ENV PATH=/opt/venv/bin:$PATH PYTHONUNBUFFERED=1

# ecobot-mcp. Importing it once writes the bytecode of every module it loads at start, and only those, and checks it needs nothing
# but its own packages (no Telegram, no model client: they are not in this venv)
# but its own packages (no Telegram, no model client: they are not in this venv). Besides the program's own imports, what main() and
# the first requests import (the tools, lib.service.*; uvicorn's HTTP protocol and lifespan; anyio's asyncio backend; the HTTP clients'
# connection pool and certificates): without their bytecode each start compiled them again before listening (its user can't write any)
FROM app AS ecobot-mcp
COPY --from=venv-mcp /opt/venv /opt/venv
RUN DATA_DIR=/tmp/build python -c "import sys, importlib.util; import ecobot_mcp.__main__, lib.mcp_server; \
RUN DATA_DIR=/tmp/build python -c "import sys, importlib, importlib.util, pkgutil; import ecobot_mcp.__main__, lib.mcp_server, lib.service; \
[importlib.import_module('lib.service.' + m.name) for m in pkgutil.iter_modules(lib.service.__path__)]; \
import uvicorn.protocols.http.h11_impl, uvicorn.lifespan.on, anyio._backends._asyncio, httpcore, truststore, certifi; \
assert not {'telegram', 'openai'} & set(sys.modules), 'ecobot-mcp imported the bot'; \
assert importlib.util.find_spec('telegram') is None and importlib.util.find_spec('openai') is None" \
&& rm -rf /tmp/build
Expand Down
51 changes: 47 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ the internet), and fits every tile on the screen in portrait or landscape where
updates by itself when a new reading arrives, and says "reconnecting…" while ecobot-mcp is away. This page is the dashboard: the
Telegram bot has none of its own (its Status button sends a picture of the temperature, humidity and rain gauges alone).

Temperature, humidity, pressure, rain, UV index and the US AQI come first; then the weather station's other gauges, then the air
Temperature, humidity, pressure, rain, UV index and the AQI come first; then the weather station's other gauges, then the air
sensor's (when there is one). The air sensor's bands are on US standards:

- **US AQI**, the higher of PM2.5's and PM10's (as AirNow gives it; "(PM10)" after the category when PM10 sets it), on a 0-500 dial with the EPA's six categories and colours (Good 0-50 green, Moderate 51-100 yellow,
- **AQI** (the tile's title; it is the US AQI, which the bot and ecobot-mcp's tools still call it), the higher of PM2.5's and PM10's (as AirNow gives it; "(PM10)" after the category when PM10 sets it), on a 0-500 dial with the EPA's six categories and colours (Good 0-50 green, Moderate 51-100 yellow,
Unhealthy for Sensitive Groups 101-150 orange, Unhealthy 151-200 red, Very Unhealthy 201-300 purple, Hazardous 301-500 maroon), the
category's name under the number;
- **PM2.5** (µg/m³) on the EPA's 2024 breakpoints (9.0, 35.4, 55.4, 125.4, 225.4) and **PM10** on the EPA's (54, 154, 254, 354,
Expand All @@ -274,7 +274,7 @@ sensor's (when there is one). The air sensor's bands are on US standards:

On the air dials every category gets an equal share of the dial (as AirNow's AQI dial draws them), so "good" and "moderate" aren't
squeezed into a sliver of a scale that runs to 500; the numbers round the dial are the breakpoints. The monitor's own temperature and
humidity repeat the station's outdoor ones, so they have no gauge. The US AQI and each category's name are of the reading now, so they
humidity repeat the station's outdoor ones, so they have no gauge. The AQI and each category's name are of the reading now, so they
always agree with the needle and with the PM2.5 and PM10 dials (the alerts and the bot's words rate PM2.5 and PM10 on the last two
readings, so a passing spike isn't called poor). The page's data never asks the air sensor: with its reading
stale it shows the one it holds.
Expand All @@ -283,10 +283,53 @@ A tile whose reading is missing just now (the station or the air sensor not send
scale's low end where 0 isn't on it: pressure 950 hPa, CO₂ 400 ppm) with its highs and lows still beside it; when the reading comes
back the tile brightens and its gauge rises in place. A reading the station or the monitor has never sent has no tile.

The tiles can be arranged to taste. Drag a tile by its gauge to move it (with a mouse, from anywhere on it but its title, its reading
and its table, which stay selectable for copying; on a touch screen, a long press picks it up, with a short buzz on Android); the
others make room. Its ×, shown on mouseover (or after a long press), hides it, as does dropping it on the "remove" zone that slides
down from the top while dragging. With a tile hidden, "reset preferences" beside the time at the bottom brings every tile back in the
usual order (and the units below back to metric). Fewer tiles grow to fill the window (a single one fills it), never smaller than the whole dashboard's. The arrangement
is kept in the browser (its local storage, per browser and device); nothing is sent to ecobot-mcp. A gauge added later takes its
usual place among yours.

Four small switches at the bottom right, left of the time (just above it on a phone), choose the units: "°C | °F" for every
temperature tile (Temperature, Dew point, Feels like, Indoor temperature), "km/h | mph" for the Wind's, "hPa | inHg" for Atmospheric
pressure and "mm | in" for Rain and Rain rate (mm/h becomes in/h), the one in use lit (buttons, so Tab and Enter or Space work too).
The tile's reading, its scale and the numbers on it (0-40 °C becomes 32-104 °F, 0-100 km/h 0-60 mph, 950-1050 hPa 28-31 inHg, the
rain's 0-100 mm 0-4 in and its rate's 0-50 mm/h 0-2 in/h), its Daily, Monthly and Yearly figures, its unit and the red hand (the
Wind's gust, the rain rate's high) all change in place, with the same decimals (two in inHg and inches); the pressure's arrow (after
its reading: up and blue when it rose 0.3 hPa or more over the past hour, down and red when it fell as much, none when
steady (under 0.3 hPa either way) or with less than about an hour of readings) points the same way. ecobot-mcp still sends metric and the browser converts. The wind's direction stays in degrees. Each browser keeps its
choice with the arrangement, and "reset preferences" (shown while any is not metric) puts all four back to metric. The weather
behind the gauges goes by the metric readings whatever is shown (heat from 35 °C, leaves above 15 km/h, a flood above 30 mm/h).

A click or tap on a gauge (or Enter or Space on a tile reached with Tab) zooms its title and gauge (its table hidden until you go
back) to fill the window, a single tile shown too. Zoomed, page through the tiles like a photo gallery, each still live: ← and →, Space (next) and Backspace (previous), a
swipe, a drag on the gauge, or a two-finger sideways swipe on a trackpad; it stops at the first and the last (with one tile, paging just nudges it and back). A click or tap (not on the text) or Esc goes back.

Behind the gauges, the weather is drawn as faint pixel art while the readings call for it: rain while it rains, hazy clouds drifting across from the US
AQI's Moderate band up, UV beams at a UV index of 11, the glass fogging over at 90 % humidity (heavier to 100 %), beads condensing in the fog and running down it, wiping clear tracks, leaves blowing past
above 15 km/h of wind, faint red beams between the UV's from 35 °C (more and brighter to 43 °C) and ice below 0 °C. "stop" at the bottom left stops and clears them for that page view only, and ends any effect a temporary test link turned on;
nothing is saved, so a reload brings them back. `MCP_DASHBOARD_ANIMATIONS` sets how much moves, for everyone: `on` (the default)
animates everything; `low` keeps the gauges sweeping and the tiles rearranging animated but draws no weather (no "stop" or test links)
and zooms at once; `off` draws no weather and animates nothing (the gauges jump to each new reading, zooming and rearranging happen at
once). A browser asking for reduced motion gets `off`'s.

On a phone or tablet the humidity's beads run downhill as it tilts: the page reads the motion sensor (gravity, turned for the screen's
rotation, so the true downhill whichever way it is held), smoothed; they run off whichever edge is lowest, and the steeper the
tilt the faster (sin of the angle off level: none under 5 degrees, rising smoothly to full speed at 40, which holds through upright, then
easing off again from 140 degrees). Lying flat, face up or face down (under 5 degrees), the water pools instead: nothing runs, no trails
are laid, and beads that touch (or sit a few px apart: a slight pull draws them together) keep merging into ever larger blobs, with no
size limit. Android's Chrome and Firefox give the sensor freely and it starts by itself; an iPhone's or
iPad's Safari asks first, so a small "tilt" link appears at the bottom left (a tap asks; gone once answered). Desktop browsers have no
sensor, so nothing changes there, and with `low` or `off` (or reduced motion) the sensor is never read. The browser needs the page
served over HTTPS for the sensor (behind a TLS proxy, not plain `http://` on the LAN, except on localhost).

It is read-only (the weather and air readings, nothing else), so it is open to anyone on your network: no token, and any name or address
in the URL (`MCP_ALLOWED_HOSTS` is only for `/mcp`, which keeps its token). ecobot-mcp has to listen beyond the machine itself:
Docker publishes port 8765 already; under systemd set `MCP_BIND=0.0.0.0:8765`. It is plain HTTP: keep it on your own network. To
turn it off, set `MCP_DASHBOARD=off`.
turn it off, set `MCP_DASHBOARD=off`. To keep your home's own readings off it (privacy), set `MCP_DASHBOARD_INDOOR=off`: the indoor
tiles (Indoor temperature, Indoor humidity) are then neither drawn nor sent, and nothing indoor leaves ecobot-mcp through the dashboard.
The bot, the MCP tools, the Status picture and the alerts still have them.

To put it on a site of its own behind a reverse proxy, map the site's root to `/dashboard/` (it answers there too), e.g. with nginx
`location / { proxy_pass http://deb1:8765/dashboard/; }`. The live updates need nothing more: they tell nginx not to buffer them.
Expand Down
4 changes: 3 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ At least one of Ecowitt (cloud or Home Assistant) or AirGradient (cloud, local o
| `MCP_AIRGRADIENT_API_TOKEN`, `MCP_AIRGRADIENT_LOCATION_ID` | – | Enables AirGradient via cloud API: history and gap fill |
| `MCP_AIRGRADIENT_LOCAL_URL` | – | Sensor's local server, e.g. `http://airgradient_<serial>.local` or an IP. Live reading polled every 60 s, recorded as 5-min means (`pm02Compensated` over `pm02`). Cloud, if configured, only fills gaps. Without cloud vars: sensor + SQLite only, no cloud requests. `.local` resolved in-process (mDNS); in Docker needs the host network (README: Docker networking) or an IP. Sensor down → cloud fallback, retry after 5 min |
| `MCP_AIRGRADIENT_SOURCE` | `auto` | `auto`: each that is set, the sensor itself first, then Home Assistant (if it has the sensor), then the cloud; `local`, `homeassistant` or `cloud`: that one alone |
| `MCP_HOMEASSISTANT_URL`, `MCP_HOMEASSISTANT_TOKEN` | – | Home Assistant (e.g. `http://192.168.1.219:8123`) and a long-lived access token (your profile page there). With its Ecowitt and AirGradient integrations the readings are read back to shade the recent charts between each 5 minutes' lowest and highest, for the days ecobot was not watching too (the last 31 days at most; Home Assistant keeps 10 unless its recorder says otherwise). Both needed. They also make Home Assistant a source of the station's readings (see `MCP_ECOWITT_SOURCE`): minute lines, a live reading every few seconds and rain alerts as the gauge reports; without them the shading comes from ecobot's own readings |
| `MCP_HOMEASSISTANT_URL`, `MCP_HOMEASSISTANT_TOKEN` | – | Home Assistant (e.g. `http://192.168.1.219:8123`) and a long-lived access token (your profile page there). With its Ecowitt and AirGradient integrations the readings are read back to shade the recent charts between each 5 minutes' lowest and highest, for the days ecobot was not watching too (the last 31 days at most; Home Assistant keeps 10 unless its recorder says otherwise). Both needed. They also make Home Assistant a source of the station's readings (see `MCP_ECOWITT_SOURCE`): minute lines, a live reading every 30 seconds and rain alerts as the gauge reports; without them the shading comes from ecobot's own readings |
| `MCP_AIRGRADIENT_DASHBOARD_URL` | – | "live chart" link in air replies and alerts |
| `MCP_PLACE` | `Melbourne` | Name in the Pollen & asthma and Forecast headings |
| `MCP_POLLEN` | `off` | Melbourne grass pollen + thunderstorm asthma (melbournepollen.com.au): report, `pollen_asthma` tool, alert at High. Oct–Dec only |
Expand Down Expand Up @@ -71,6 +71,8 @@ At least one of Ecowitt (cloud or Home Assistant) or AirGradient (cloud, local o
| `MCP_CHART_BASE_URL` | none | Where people's browsers reach the chart links' pictures (`?charts=link`, below): the URL a reverse proxy serves `/charts` at, e.g. `https://api.example.org/ecobot-charts` with nginx's `location /ecobot-charts/ { proxy_pass http://127.0.0.1:8765/charts/; }`. Unset: the address the MCP request came to (`X-Forwarded-Proto` and `X-Forwarded-Host` when a proxy sends them) with `/charts` |
| `MCP_CHART_LINK_HOURS` | `24` | How long a chart link's picture answers (1 to 720 hours). They are kept in memory (at most 500, 64 MB in all, the oldest dropped first): a restart forgets them, and an old link answers 404 |
| `MCP_DASHBOARD` | `on` | The gauges' live web page at `/dashboard` beside `/mcp` (`http://deb1:8765/dashboard`): read-only, so it needs no token and answers any `Host` (open it by the machine's name or address from the LAN); `/mcp` keeps both checks. `off`: `/dashboard`, `/dashboard/`, `/dashboard/icon.png`, `/dashboard/data` and `/dashboard/events` answer 404 |
| `MCP_DASHBOARD_ANIMATIONS` | `on` | How much moves on the dashboard page, for every viewer. `on`: everything: the gauges' needles sweep to each new reading, the weather is drawn behind the gauges (pixel-art rain, haze, UV, humidity, wind, heat and ice while the readings call for them, something blown across in a gust over 99 km/h, with a "stop" link stopping them in that page view until a reload), zooming a tile and the tiles rearranging (one moved or hidden) are animated. `low`: the gauges sweep and the tiles rearrange animated as with `on`, but no weather at all (nothing drawn, no "stop" link, no test links) and zooming happens at once. `off`: no weather, and nothing animated: the gauges' needles and readings jump straight to each new reading, zooming and rearranging happen at once. New readings are applied as they come in each. A browser asking for reduced motion gets `off`'s, whatever this is |
| `MCP_DASHBOARD_INDOOR` | `on` | The page's indoor tiles (Indoor temperature, Indoor humidity: every indoor reading's). `off` (privacy, as the page needs no token): they are left out, neither drawn nor sent: `/dashboard/data` carries no indoor reading at all, as if the station had no indoor sensor, and `/dashboard/events` sends no event for an indoor change alone. Only the dashboard: the bot, the MCP tools, the Status picture and the alerts still read and show them. A browser's saved arrangement naming the indoor tiles does no harm. Any other value keeps `on`, with a warning |

Every request to `/mcp` needs a token (`AUTH_TOKENS`, below). Chart images are not a setting of ecobot-mcp but of each client: a client whose MCP URL ends `?charts=png` (`http://127.0.0.1:8765/mcp?charts=png`) gets each chart as a PNG beside the figures, drawn in `DARKMODE`'s theme; a client whose URL ends `?charts=link` gets each chart as a link to its PNG (`/charts/<id>.png`, served with no token and any `Host`, so anyone with the link can open it until it expires; `MCP_CHART_BASE_URL`, `MCP_CHART_LINK_HOURS`) and the model is asked to put it in its reply as a markdown image, for a chat app that shows those but not a tool's image (LibreChat); a call's request `_meta` `chart_image` (`"png"`, `"link"` or `"none"`) overrides its connection's ([ecobot-mcp.md](ecobot-mcp.md) 3.7). They need Pillow (`requirements-charts.txt`, in both Docker images): installed from `requirements-mcp.txt` alone ecobot-mcp answers with the charts' JSON and a note, and warns once.

Expand Down
Loading
Loading