# HeatLoss Pro > A web app for room-by-room heat loss (EN 12831-1 or a simplified method), summer cooling hour by hour with a hot day of every room (windows opened as CIBSE TM59 assumes where nothing cools a room), and sizing heat pumps, radiators, fan coils and underfloor heating. An AI assistant working in the person's browser can draw a plan and fill in its properties through tools the page offers, the same way the person would. The app: https://heatlosspro.cloud/?app=1 (also /nl/, /fr/, /de/, /es/, /it/). A first visit opens the demo house: `get_plan` then says `demoHouse: true`, and the editing tools refuse until `new_plan` starts a blank plan (its rooms, results and heating are the demo's, not the person's). Plans are saved in the person's browser and, signed in, synced to their account. Sharing a plan as a link needs it saved in a project (the Projects button) and the person signed in; there is no tool for it. A calculation runs on the server; the first one for a plan, and one after more than the included changes, needs the person's payment or subscription. An assistant can ask for a calculation but never pay: the person decides in the window that opens. ## How to reach the tools - WebMCP: where the browser supports it (`navigator.modelContext`), the page registers its tools when the app opens. Call them by name. - Any assistant that can run JavaScript in the page (browser automation): `window.HeatLossPro.tools()` lists the tools with their input schemas; `await window.HeatLossPro.call(name, args)` runs one and resolves to `{ ok: true, result }` or `{ ok: false, error }`. A wrong input's error says what to change; nothing is changed then. Each tool call is one step the person can undo, and is saved like any edit. On a shared plan opened to look at, the tools only read. ## Conventions - Lengths in metres. The plan is seen from above: x to the right, y down. Points are `[x, y]`. - Temperatures in °C, power in kW (rooms' figures in results are in W). - Walls are straight lines from `from` to `to`. Points that meet must be exactly the same coordinates. - Rooms are not drawn: closed walls make them (named "Room 1", "Room 2"…). Rename and set them with `set_room`. - A space outdoors or left out of the heated house (a patio, covered terrace, carport, unheated garage) is a room with `cutout: true`: it loses no heat, and its walls with the house count as outside walls. - An emitter or underfloor loop is `connected` once flow and return are piped to a heat source. Until then it is shown unpiped, and once anything is piped the room simulation counts an unpiped one as giving nothing. ## The tools - `get_plan`: house settings, floors, rooms (outline, area, middle, `cutout`), walls, windows and doorways, emitters and heat sources (`connected`), and the pipework the Heating view shows: `pipes`, `manifolds`, `mixingValves`, `pumps`, `floorLinks`, `underfloorZones`, all with their ids. Call it first, and after drawing to get the new ids. - `new_plan`: a blank plan in place of the one on screen (the person is asked first; undo brings it back). Needed when `get_plan` says `demoHouse`. - `get_options`: the accepted values: wall build-ups with their U-value, glazing, shading, room types, underfloor finishes, ceiling types, emitter types. - `set_house`: design outdoor temperature (winter, summer), heating flow temperature, cooling water out/back (default 7/12 °C), latitude, summer day's swing, air changes per hour. - `add_floor`: a new floor above or below another; drawing then goes on it. - `draw_walls`: walls through points (`closed` joins back to the start). `kind`: `exterior` (default) or `interior`; `preset` an outside wall build-up; `heightM`. A wall drawn across a room splits it. - `add_window`: a window or glazed door in an outside wall, or a doorway (`kind: "opening"`) in an inner wall: `wallId`, `startM` along the wall from its `from` end, `widthM`, `heightM`, `glazing`, `shading`, `opens` (`part`, the default; `full` for a casement or door; `fixed`). The wall splits around it; the pieces get new ids. - `set_wall`: change walls or windows by id: build-up, height, glazing, shading, opens. - `set_room`: name, type (sets the design temperature by the house's rules), desired temperature, ceiling height, ceiling type, underfloor heating (on, coverage, finish, pipe spacing, cooling), `cutout` (outdoors or not heated). - `add_emitter`: a radiator (`heatKw` at 45/40 °C water, 20 °C room), fan coil (`heatKw` at top speed, `coolKw` the catalogue's at 7/12 °C water, `fanSpeed`) or air conditioner in a heated room, placed unpiped (`connected: false`). `set_emitter` changes one. - `find_models`: heat pumps and air conditioners in the catalogue by brand and model. `add_heat_source`: a heat pump by catalogue model (its datasheet outputs), or by `heatKw` / `coolKw`. It stands outdoors: `at` must be outside every room (a cutout too); without `at` it goes beside the drawing. - `connect_heating`: pipes the heating in one step: a manifold per floor (in a utility room, store or hall near the heat source where there is one), and one branching flow and return run from it through the doorways (or a shared wall where no doorway is drawn) to every radiator, fan coil and underfloor loop not piped yet, as a two-pipe system is laid; the pipes come into the house through the outside wall nearest the heat pump. Underfloor loops go behind a mixing valve when the flow temperature is above 35 °C. Floor links join the other floors. Cutouts, roof levels and air conditioners are left out (listed under `skipped`). Returns the new ids, `connected`, `notConnected`, and `roomsWithoutHeating` (heated rooms with nothing to pipe: give them an emitter or underfloor heating, or leave a closet or hall to be heated through its doorway). - `delete`: walls, windows, rooms, emitters, heat sources, pipes, manifolds, mixing valves, pumps, floor links or underfloor zones by id. - `calculate`: runs the calculation and returns the results (or `calculated: false` when the person did not go ahead or must pay). `get_results`: the last results; `upToDate` is false when the plan changed since, and the screen marks those figures old until the person calculates again. - `undo`: undoes the last tool call. - `export_plan` / `import_plan`: the whole plan as JSON, and replacing the drawing with one (the person is asked first). ## A house from drawings and a product list 1. `get_plan`; if it says `demoHouse`, `new_plan`. Then `get_options` and `set_house` (location's design temperatures, flow temperature, cooling water if it cools). 2. Per floor: `draw_walls` the outside outline, closed, with its build-up. Then each inner wall, wall to wall, `kind: "interior"`. `get_plan` for the rooms and wall ids. 3. `add_window` for every window and outside door, and doorways between rooms. 4. `set_room` for each room: name, type, ceiling height, underfloor heating; `cutout: true` for patios, terraces and unheated garages. 5. `add_emitter` per radiator or fan coil with its datasheet figures; `find_models` and `add_heat_source` for the heat pump, outdoors. 6. `connect_heating`, and check that `notConnected` is empty; give each room under `roomsWithoutHeating` an emitter or underfloor heating unless it is a closet or hall its doorway heats. 7. `calculate`, then `get_results`; compare what the emitters give with what each room needs. Measure from the drawings' dimensions, not from the image's pixels. When a product's figure is not known, look it up (manufacturer datasheet) rather than guess, and tell the person which figures you assumed. ## The plan file A plan is JSON, as `export_plan` gives and the app saves: `levels` (floors: `id`, `name`, `kind`), `lines` (walls, windows and doorways: `levelId`, `x1`, `y1`, `x2`, `y2` in metres, and their kind and build-up), `rooms` (`levelId`, `name`, `polygon`, `targetTemp`, `ceilingHeight`, `ufh`…), `emitters`, `sources`, `ufhZones`, `pipes`, `settings`. The person can drop a `.json` plan on the drawing (or pick it where a floor plan image is added) to open it; it replaces the drawing after they confirm, and undo brings the old one back. Making a plan with the tools and exporting it is the reliable way to get every field right. ## Limits - No tool reads walls off a PDF or image: the assistant reads the drawing and enters what it reads. - `connect_heating` follows the doorways drawn: draw them (`add_window` with `kind: "opening"`) first, or the runs go through the middle of the walls rooms share. The pipes are sized automatically; the person can redraw them. The heat loss calculation does not need pipes; the hydraulics, the emitters' delivered output and the room simulation do. - Floor and roof build-ups per floor are set in the app's floor panel.