From d6dbd9410bfe712dd72d03cf3da68b1e74d463c0 Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Sat, 28 Nov 2026 09:47:50 +0100 Subject: [PATCH 1/2] One way in: a start page, /claude, a real 404 and phone polish /start and /sv/start say what a home needs (a computer that stays on, equipment from the device catalog, 6 of 91 drivers confirmed on real hardware), that FTW is in public beta, and the four ways to start: Home Assistant, one install line on any 64-bit Linux computer with systemd, a ready box (waitlist) and an AI assistant. Then the phone: the App Store, the Android test build through Discord, and the demo. Plain text pages an assistant can read and follow. The home page's hero gets a "You need" line, and Get FTW and the row of ways lead to /start. Section 05 names the catalog count and the beta. The Swedish Discord button says so, and the news has 28 Nov. /claude redirects to /start#assistant. 404.html turns off Pages' fallback to the home page, so unknown paths answer 404. robots.txt is new. The ChatGPT pages no longer speak of a development installation or deny setup writes: the public profile has setup tools behind a separate grant the owner approves on the box. They give the MCP address and the steps. home.css: toggles, assistant tabs and the vision link are 44 px tall, no label outside the drawn iPhone is under 11 px, and the app screenshots have short alt text. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Fredrik Ahlgren --- 404.html | 36 +++++++++++ README.md | 22 ++++++- _redirects | 3 + chatgpt.html | 21 +++--- copy.js | 17 +++++ home.css | 38 ++++++----- home.js | 11 ++-- index.html | 43 +++++++------ robots.txt | 3 + sourceful.css | 16 +++++ start.html | 113 ++++++++++++++++++++++++++++++++ sv/chatgpt.html | 21 +++--- sv/start.html | 113 ++++++++++++++++++++++++++++++++ tests/start-page.test.mjs | 132 ++++++++++++++++++++++++++++++++++++++ 14 files changed, 529 insertions(+), 60 deletions(-) create mode 100644 404.html create mode 100644 copy.js create mode 100644 robots.txt create mode 100644 start.html create mode 100644 sv/start.html create mode 100644 tests/start-page.test.mjs diff --git a/404.html b/404.html new file mode 100644 index 0000000..a8a76c8 --- /dev/null +++ b/404.html @@ -0,0 +1,36 @@ + + + + + + Page not found | FTW + + + + + + + + + +
+

404

+

Page not found

+

There is no page at this address.

+ +
+ + + + diff --git a/README.md b/README.md index ee2bcdd..a6fad79 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,24 @@ short Markdown proposal or a focused fix with relevant evidence. Work is agentic first; see [CONTRIBUTING.md](CONTRIBUTING.md). Keep existing license and attribution intact. Inspect rendered copy before publishing. +## The start page + +`/start` (`start.html`) and `/sv/start` are the one way in: what a home +needs, the four ways to start (Home Assistant, a Linux computer, a ready box, +an AI assistant) and then the phone. Keep them plain text pages that an +assistant can read and follow. The home page's hero, its row of ways and +"Get FTW" lead there, and `/claude` redirects to `/start#assistant`. + +Both start pages and the home page say how many drivers the +[device catalog](https://srcfl.github.io/device-drivers/) confirms on real +hardware ("6 of 91"). Read the numbers from the catalog's counts and change +all three together; `tests/start-page.test.mjs` keeps them equal and checks +the install line, the Home Assistant button and the MCP address on each page. + +`404.html` answers every unknown path with a 404. Without it, Cloudflare +Pages would serve the home page with a 200. Every internal link must point at +a page that exists; the test checks them. + ## Installation copy Section 05 of the home page gives two paths first: the Home Assistant button @@ -107,6 +125,7 @@ after a failed native install. - Home Assistant app: https://github.com/srcfl/ftw/blob/master/docs/home-assistant-app.md (the button uses https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fsrcfl%2Fhome-assistant-addons) - Linux installer: https://ftw.energy/install.sh (a redirect; see Installation copy) +- Get started: https://ftw.energy/start and https://ftw.energy/sv/start - ChatGPT integration and its availability: `/chatgpt` - Anonymous project statistics: https://stats.ftw.energy/ - FTW plugin for assistants: https://github.com/srcfl/ftw-plugin @@ -139,7 +158,8 @@ python3 -m http.server 8000 Then open http://localhost:8000. The static server runs neither `_worker.js` nor `_redirects`, so the sign-up forms report that sign-up is closed and -`/install.sh` answers 404. +`/install.sh` answers 404. It does not drop `.html` either: open +`/start.html` for `/start`. ```bash node --test tests/*.test.mjs diff --git a/_redirects b/_redirects index e8676b5..2291c4e 100644 --- a/_redirects +++ b/_redirects @@ -4,3 +4,6 @@ # The one-line install on the home page. The installer picks the release. /install.sh https://raw.githubusercontent.com/srcfl/ftw/master/scripts/install.sh 302 + +# The address to give someone who wants to connect Claude: the assistant way on the start page. +/claude /start#assistant 302 diff --git a/chatgpt.html b/chatgpt.html index a4186fd..644fc29 100644 --- a/chatgpt.html +++ b/chatgpt.html @@ -11,7 +11,7 @@ - + @@ -31,21 +31,23 @@

FTW for ChatGPT

Get help installing FTW, understand your home's energy flow and plans, and investigate problems with supported meters, solar, batteries and EV chargers.

-

Public directory release in preparation. Sourceful Labs AB develops this integration. It is not yet listed as an approved public plugin. Existing development connections remain separate.

+

Not in ChatGPT's plugin directory yet. Sourceful Labs AB develops this integration, and it waits for OpenAI's review. Until it is listed, you can add it to ChatGPT yourself, as the steps below show.

No FTW box yet?

-

The Setup Guide helps you choose a host, follow the current install guide, connect supported equipment and check fresh readings. You do not need a connected home to ask for setup help. You run the install on your own host; ChatGPT cannot log in to your Pi or router for you.

-

Start with Install and update FTW. Check your model and tested functions in the device catalog. A catalog entry alone does not prove control on your equipment.

+

Install FTW first. Get started shows what you need and the two ways to install it yourself: the Home Assistant button, or one line for a 64-bit Linux computer. Give ChatGPT that page and it can walk you through. You run the install on your own computer; ChatGPT cannot log in to your Pi or router for you.

+

Check your model and tested functions in the device catalog. A catalog entry alone does not prove control on your equipment.

Understand a connected home

With your approval, ChatGPT can read current power, battery and car state, past power readings, the planner's proposals, equipment health, and redacted logs and settings. Old and missing readings remain distinct from fresh measurements. Plans and estimated savings do not prove what the equipment did or what you saved.

-

The public connection uses a fixed set of named tools. It does not offer arbitrary API access, backup exports or remote setup writes. When a question needs data it cannot read, it explains the gap and guides you through a local check.

-

Approve access in FTW

+

The public connection uses a fixed set of named tools. It offers no arbitrary API access and no backup exports. When a question needs data it cannot read, it explains the gap and guides you through a local check.

+

Connect ChatGPT

    -
  1. Run a current FTW beta, enable FTW Cloud on the box and read the Cloud information before accepting it.
  2. -
  3. Start the FTW connection in your ChatGPT development installation. The FTW authorization page shows a code and a link for the owner.
  4. +
  5. Run a current FTW beta, enable FTW Cloud on the box and read the Cloud information before accepting it. On a new box, choose Set up with ChatGPT or Claude instead on its first page. On a box you already use, open Settings → Access.
  6. +
  7. In ChatGPT, add this address as a custom MCP server on the Plugins page. Some workspaces need developer mode turned on first. +
    https://cloud.ftw.energy/mcp?profile=public
  8. +
  9. ChatGPT opens the FTW authorization page. It shows a code and a link for the owner. It also says that FTW Cloud has not checked this assistant: check that it names ChatGPT.
  10. Approve the request in your FTW app or the box's own Access page. Choose the rights and how long access lasts. Keep passwords, keys and approval codes out of chat.
  11. Ask which home ChatGPT can reach and what you granted. You can end access in FTW at any time.
-

Reading is separate from control. A short charging action needs your request and a matching grant. A request for a lasting goal change waits for the owner's approval. Core checks every command and keeps control on the box.

+

Reading, control and setup are separate. A short charging action needs your request and a matching grant. A request for a lasting goal change waits for the owner's approval. The setup tools can look for devices on your home network, test a device with control blocked, change the box's settings and restart it. They need a separate setup grant, which the owner approves on the box. With that grant, ChatGPT can save settings after you review and confirm the exact draft, and restart the box after you confirm the short break. Core checks every command and keeps control on the box.

Your data

FTW Cloud can read this assistant connection while it passes requests and answers between ChatGPT and your box. OpenAI receives the data you authorize the connection to return. See Privacy: assistants and the plugin terms.

Get help

@@ -58,5 +60,6 @@

Get help

+ diff --git a/copy.js b/copy.js new file mode 100644 index 0000000..ed608d0 --- /dev/null +++ b/copy.js @@ -0,0 +1,17 @@ +// Copy buttons on the text pages. Each copies the text of the element its data-copy names. +// The buttons start hidden, so a page without scripts shows only the text to select. +const sv = document.documentElement.lang === 'sv'; +const words = sv ? { copy: 'Kopiera', done: 'Kopierat', select: 'Markera texten' } : { copy: 'Copy', done: 'Copied', select: 'Select it' }; +document.querySelectorAll('button.copy[data-copy]').forEach(button => { + button.hidden = false; + button.addEventListener('click', async () => { + try { + await navigator.clipboard.writeText(document.querySelector(button.dataset.copy).textContent); + button.textContent = words.done; + button.classList.add('done'); + } catch { + button.textContent = words.select; + } + setTimeout(() => { button.textContent = words.copy; button.classList.remove('done'); }, 1800); + }); +}); diff --git a/home.css b/home.css index 7280d76..6dea632 100644 --- a/home.css +++ b/home.css @@ -44,8 +44,9 @@ img, video { display: block; max-width: 100%; } .small-note { color: var(--ink3); font-size: 13px; line-height: 1.6; } .small-note a, .fine a, .install-notes a { color: var(--ink2); } .fine { max-width: 76ch; margin: 44px 0 0; color: var(--ink3); font-size: 13px; line-height: 1.6; } -.links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 40px 0 0; } +.links { display: flex; flex-wrap: wrap; gap: 0 32px; margin: 40px 0 0; } .text-link { color: var(--ink); font-weight: 500; } +.links .text-link { display: inline-flex; align-items: center; min-height: 44px; } h1 { margin-bottom: 28px; font-size: clamp(3.2rem, 6.2vw, 6rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.045em; text-wrap: balance; } h2 { margin-bottom: 28px; font-size: clamp(2.4rem, 4.6vw, 4.4rem); font-weight: 300; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; } @@ -86,18 +87,21 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .hero-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 72px; align-items: center; padding-block: 88px 64px; } .project-state { margin-bottom: 28px; color: var(--ink3); font-size: 11px; } .hero-lede { max-width: 560px; margin: 0; color: var(--ink2); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; } +.hero-need { max-width: 560px; margin: 22px 0 0; color: var(--ink2); font-size: 15px; line-height: 1.55; } +.hero-need span { margin-right: 12px; color: var(--ink3); font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } +.hero-need a { color: var(--ink); } .project-facts { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 720px; margin: 48px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); } .project-facts div { padding-right: 14px; } .project-facts div + div { padding-left: 16px; border-left: 1px solid var(--hairline); } -.project-facts dt { margin-bottom: 4px; color: var(--ink3); font: 500 10px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } +.project-facts dt { margin-bottom: 4px; color: var(--ink3); font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } .project-facts dd { margin: 0; font-size: 14px; } .hero-shot { margin: 0; justify-self: end; width: min(340px, 100%); } -.hero-shot figcaption, .tour > .meta { margin-top: 20px; color: var(--ink3); font: 500 10px/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } +.hero-shot figcaption, .tour > .meta { margin-top: 20px; color: var(--ink3); font: 500 11px/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } .routes { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hairline); } .routes a { position: relative; padding: 22px 36px 26px 0; font-size: 15px; text-decoration: none; } .routes a + a { padding-left: 24px; border-left: 1px solid var(--hairline); } .routes a:hover b { transform: translateX(3px); } -.routes span { display: block; margin-bottom: 6px; color: var(--ink3); font: 500 10px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } +.routes span { display: block; margin-bottom: 6px; color: var(--ink3); font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } .routes b { position: absolute; right: 20px; top: 44px; color: var(--ink2); font-weight: 400; transition: transform 0.2s ease; } /* The iPhone: a 17 Pro in deep blue, drawn in the app's points. --pt is one point, so the @@ -190,7 +194,7 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .example { padding: 32px; border: 1px solid var(--hairline); background: var(--raised); } .example-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; } .toggle { display: flex; gap: 28px; border-bottom: 1px solid var(--rule); } -.toggle button, .tabs button { margin-bottom: -1px; padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink3); font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; } +.toggle button, .tabs button { display: inline-flex; align-items: flex-end; min-height: 44px; margin-bottom: -1px; padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink3); font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; } .toggle button:hover, .tabs button:hover { color: var(--ink2); } .toggle button[aria-checked="true"], .tabs button[aria-selected="true"] { border-color: var(--ink); color: var(--ink); } .example-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; } @@ -200,13 +204,13 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .plot .col { position: relative; height: 100%; } .plot .price { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); background: var(--hairline); } .plot .buy { position: absolute; left: 20%; right: 20%; bottom: 0; height: var(--h); background: var(--grid); transition: height 0.7s cubic-bezier(0.22, 0.8, 0.24, 1); transition-delay: var(--d, 0ms); } -.plot .tag { position: absolute; left: 50%; bottom: calc(var(--h) + 6px); transform: translateX(-50%); color: var(--ink2); font: 500 10px/1 var(--mono); white-space: nowrap; transition: bottom 0.7s cubic-bezier(0.22, 0.8, 0.24, 1); } +.plot .tag { position: absolute; left: 50%; bottom: calc(var(--h) + 6px); transform: translateX(-50%); color: var(--ink2); font: 500 11px/1 var(--mono); white-space: nowrap; transition: bottom 0.7s cubic-bezier(0.22, 0.8, 0.24, 1); } .lanes { display: grid; gap: 5px; margin-top: 12px; } .lane, .axis { display: grid; grid-template-columns: 64px repeat(24, 1fr); gap: 3px; align-items: center; } -.lane span:first-child { color: var(--ink3); font: 500 9px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; } +.lane span:first-child { color: var(--ink3); font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; } .lane i { height: 10px; background: var(--c, transparent); opacity: var(--o, 0); transition: opacity 0.5s ease, background 0.5s ease; transition-delay: var(--d, 0ms); } .lane i.off { background: var(--hairline); opacity: 1; } -.axis { margin-top: 10px; color: var(--ink3); font: 500 10px/1 var(--mono); } +.axis { margin-top: 10px; color: var(--ink3); font: 500 11px/1 var(--mono); } .readout { display: flex; flex-direction: column; justify-content: center; padding-left: 40px; border-left: 1px solid var(--rule); } .readout p { margin: 0; } .readout-cost { margin: 10px 0 12px !important; font-size: 80px; font-weight: 300; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; } @@ -238,7 +242,7 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .dial { display: block; width: 100%; max-width: 230px; height: auto; margin: 0 auto; } .dial .hand { transform-origin: 120px 120px; transform-box: view-box; transition: transform 0.25s linear; } .receipt { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; } -.receipt span { padding: 7px 9px; border: 1px solid var(--rule); color: var(--ink3); font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; } +.receipt span { padding: 7px 9px; border: 1px solid var(--rule); color: var(--ink3); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; } .receipt span + span::before { content: "▸ "; } .js .receipt.in span { animation: receipt 6s steps(1, end) infinite; } .js .receipt.in span:nth-child(2) { animation-delay: 0.6s; } @@ -257,7 +261,7 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .address code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; color: var(--stores); font-size: clamp(14px, 1.6vw, 19px); scrollbar-width: none; } .cmd { margin: 12px 0 4px; padding-bottom: 8px; border-color: var(--rule); } .cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13px; scrollbar-width: none; } -.copy { flex: none; min-height: 32px; padding: 0 12px; border: 1px solid var(--rule); background: none; color: var(--ink2); font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; } +.copy { flex: none; min-height: 32px; padding: 0 12px; border: 1px solid var(--rule); background: none; color: var(--ink2); font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; } .copy:hover { border-color: var(--ink2); color: var(--ink); } .copy.done { border-color: var(--live); color: var(--live); } .tabs { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 40px 0 24px; border-bottom: 1px solid var(--rule); } @@ -270,7 +274,7 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .transcript { border-top: 1px solid var(--ink2); } .transcript > .meta { padding: 14px 0; border-bottom: 1px solid var(--hairline); } .turn { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hairline); } -.turn span { padding-top: 4px; color: var(--ink3); font: 500 10px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } +.turn span { padding-top: 4px; color: var(--ink3); font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; } .turn p { margin: 0; font-size: 16px; } .turn-tool span, .turn-tool p { color: var(--stores); } .turn-tool p { font: 400 12px/1.6 var(--mono); } @@ -371,10 +375,10 @@ footer { padding: 64px 0 28px; border-top: 1px solid var(--hairline); background .footer-brand span { color: var(--ink3); font-size: 14px; } .footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; } .footer-links div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; } -.footer-links span { margin-bottom: 10px; color: var(--ink3); font-size: 10px; } +.footer-links span { margin-bottom: 10px; color: var(--ink3); font-size: 11px; } .footer-links a { min-height: 30px; display: flex; align-items: center; color: var(--ink2); font-size: 14px; text-decoration: none; } .footer-links a:hover { color: var(--ink); } -.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; border-top: 1px solid var(--hairline); color: var(--ink3); font-size: 10px; } +.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; border-top: 1px solid var(--hairline); color: var(--ink3); font-size: 11px; } .sourceful-mark img { display: block; height: 22px; width: auto; } @media (max-width: 1120px) { @@ -417,11 +421,11 @@ footer { padding: 64px 0 28px; border-top: 1px solid var(--hairline); background .glyphs { font-size: 13px; } .example, .paths article, .newsletter { padding: 20px; } .toggle { gap: 18px; width: 100%; } - .toggle button { font-size: 10px; letter-spacing: 0.08em; } + .toggle button { letter-spacing: 0.06em; } .plot { height: 170px; gap: 2px; } - .plot-wrap { grid-template-columns: 44px 1fr; } - .lane, .axis { grid-template-columns: 44px repeat(24, 1fr); gap: 2px; } - .lane span:first-child { font-size: 8px; letter-spacing: 0.04em; } + .plot-wrap { grid-template-columns: 60px 1fr; } + .lane, .axis { grid-template-columns: 60px repeat(24, 1fr); gap: 2px; } + .lane span:first-child { letter-spacing: 0.02em; } .plot .tag { display: none; } .readout-cost { font-size: 64px; } .pipeline, .paths { grid-template-columns: minmax(0, 1fr); } diff --git a/home.js b/home.js index f3eaa7e..2037583 100644 --- a/home.js +++ b/home.js @@ -177,8 +177,10 @@ if (dial) { const hand = svg('g', { class: 'hand' }); hand.append(svg('line', { x1: center, y1: center - 40, x2: center, y2: center - rim - 4, stroke: 'var(--ink)', 'stroke-width': 1.5, 'stroke-linecap': 'round' })); const time = svg('text', { x: center, y: center - 2, 'text-anchor': 'middle', fill: 'var(--ink)', 'font-size': 26, 'font-weight': 700, 'font-family': 'var(--sans)' }); - const detail = svg('text', { x: center, y: center + 18, 'text-anchor': 'middle', fill: 'var(--ink3)', 'font-size': 10, 'font-family': 'var(--mono)', 'letter-spacing': '.06em' }); - dial.append(ticks, sun, carRun, goal, hand, time, detail); + // The price and what happens go on two short lines, so the text stays inside the ticks at 11 px or more. + const label = y => svg('text', { x: center, y, 'text-anchor': 'middle', fill: 'var(--ink3)', 'font-size': 12, 'font-family': 'var(--mono)', 'letter-spacing': '.02em' }); + const price = label(center + 15), action = label(center + 28); + dial.append(ticks, sun, carRun, goal, hand, time, price, action); // The hand steps a quarter hour every 250 ms, one turn in 24 seconds; the middle names the quarter under it. let turned = 0; @@ -186,10 +188,11 @@ if (dial) { const q = step % 96; const clock = q / 4; const row = withPlan.rows[hours.indexOf(Math.floor(clock))]; - const action = row.car ? 'CAR CHARGES' : row.battery > 0.05 ? 'STORES' : row.battery < -0.05 ? 'GIVES' : 'WAITS'; + const doing = row.car ? 'CAR CHARGES' : row.battery > 0.05 ? 'STORES' : row.battery < -0.05 ? 'GIVES' : 'WAITS'; hand.style.transform = `rotate(${180 + step * 3.75}deg)`; time.textContent = `${String(Math.floor(clock)).padStart(2, '0')}:${String((q % 4) * 15).padStart(2, '0')}`; - detail.textContent = `${(row.price / 100).toFixed(2)} KR · ${action}`; + price.textContent = `${(row.price / 100).toFixed(2)} KR`; + action.textContent = doing; }; // Start at 03:00, the quarter the example conversation asks about. quarterAt(turned = 12); diff --git a/index.html b/index.html index bfd8333..e267504 100644 --- a/index.html +++ b/index.html @@ -30,7 +30,7 @@ - + - + diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..aa86ef5 --- /dev/null +++ b/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Disallow: /api/ diff --git a/sourceful.css b/sourceful.css index 0781099..f1542f8 100644 --- a/sourceful.css +++ b/sourceful.css @@ -316,3 +316,19 @@ html { scroll-padding-top: 84px; } .doc-terms div { padding: 14px 0; border-bottom: 1px solid var(--line); } .doc-terms dt { color: var(--ink); font-weight: 700; } .doc-terms dd { margin: 4px 0 0; } + +/* Get started (/start, /sv/start) and the 404 page: numbered ways, a command line with Copy. */ +.doc h3 { margin: 0 0 12px; color: var(--ink); font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; } +.doc h3 span { margin-right: 10px; color: var(--signal); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; } +.doc code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.88em; overflow-wrap: anywhere; } +.doc .way { padding: 28px 0 8px; border-top: 1px solid var(--line); } +.doc .way + h2 { margin-top: 44px; } +.doc .note { color: var(--muted); font-size: 15px; } +.doc .btn { margin: 12px 0 4px; text-decoration: none; } +.doc .cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 6px; padding: 10px 10px 10px 16px; background: var(--ink); color: var(--cream); } +.doc .cmd code { flex: 1 1 18em; min-width: 0; font-size: 14px; line-height: 1.5; } +.doc .copy { flex: none; margin-left: auto; min-width: 72px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-dark); background: none; color: var(--cream); font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; } +.doc .copy:hover { border-color: var(--cream); } +.doc .copy.done { border-color: var(--confirmed); color: var(--confirmed); } +.doc .copy:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; } +.doc ol > li > ul { margin-top: 10px; } diff --git a/start.html b/start.html new file mode 100644 index 0000000..7b22c78 --- /dev/null +++ b/start.html @@ -0,0 +1,113 @@ + + + + + + Get started | FTW + + + + + + + + + + + + + +
+

FTW · Public beta

+

Get started with FTW

+

FTW runs on a computer in your home. It plans your battery, car and solar around prices and the weather, then runs them. Here is what you need, and four ways to start.

+ +

What you need

+
    +
  • A computer at home that stays on. Home Assistant, or any 64-bit Linux computer with systemd: a Raspberry Pi 3 or newer, a mini PC or an old laptop.
  • +
  • Equipment FTW supports, on your home network: an inverter, battery, EV charger or meter. Search yours by brand in the device catalog. 6 of 91 drivers are confirmed on real hardware so far.
  • +
+

FTW is in public beta. There is no stable release yet, and it changes often. Tell us in the FTW Discord what works and what breaks.

+ +

Four ways to start

+ +
+

1 Home Assistant

+
    +
  1. Choose the button. It adds the FTW repository to your Home Assistant.
    Add to Home Assistant
  2. +
  3. Install FTW (beta).
  4. +
  5. Choose Start.
  6. +
  7. Choose Open Web UI. FTW opens inside Home Assistant. To keep it in the sidebar, turn on Show in sidebar.
  8. +
+

Needs Home Assistant OS. Step by step

+
+ +
+

2 A Linux computer

+

Any 64-bit Linux computer with systemd: a Raspberry Pi 3 or newer with Raspberry Pi OS Lite (64-bit), a mini PC or an old laptop.

+
    +
  1. Run this line on that computer: +
    curl -fsSL https://ftw.energy/install.sh | bash -s -- --fresh-host
  2. +
  3. Open the address it prints, such as http://192.168.1.23:8080/setup, in a browser on the same network.
  4. +
+

It installs the newest release on a computer with no FTW yet. Step by step. Already running FTW? Switch or update.

+
+ +
+

3 A ready box

+

A small computer set up for FTW, ready to plug in. It is not on sale yet. Join the waitlist and we'll email you when orders open.

+
+ +
+

4 Start from an AI assistant

+

Claude or ChatGPT can set up your home with you, once FTW runs on your computer.

+
    +
  1. Install FTW first, with way 1 or 2.
  2. +
  3. On the box's first page, choose Set up with ChatGPT or Claude instead. Already set up? Connect later under Settings → Access.
  4. +
  5. Add FTW to your assistant with this address: +
    https://cloud.ftw.energy/mcp?profile=public
    +
      +
    • Claude: in Claude on the web, desktop or phone, open Settings → Connectors. Choose Add custom connector, paste the address and leave the client ID empty.
    • +
    • ChatGPT: FTW is not in ChatGPT's plugin directory yet; it waits for OpenAI's review. Until then, add the address as a custom MCP server on ChatGPT's Plugins page. Some workspaces need developer mode turned on first. More about FTW for ChatGPT
    • +
  6. +
  7. The assistant opens an FTW Cloud page with a code. Type the code on the box under Settings → Access, or approve it in the FTW app.
  8. +
  9. Ask the assistant to set up your home. It reads only what you allow. Control and setup are separate grants, and the box checks every step.
  10. +
+

Need help with the install itself? Give any assistant this page, https://ftw.energy/start, and ask it to walk you through. Grok, Cursor, Claude Code and Codex connect the same way: see the steps. How access and privacy work

+
+ +

Add your phone

+
    +
  • iPhone: the FTW app, FTW Energy in the App Store. Free, iOS 26 or later. On the box, open Settings → FTW app, choose Show pairing code and scan it with the app. App support
  • +
  • Android: an early test build. Ask for it in the FTW Discord.
  • +
  • No FTW yet? Try the demo. It shows a simulated home, and so does the app until you pair it.
  • +
+ +

Get help

+ +
+ + + + + + diff --git a/sv/chatgpt.html b/sv/chatgpt.html index 6e18e79..70c3895 100644 --- a/sv/chatgpt.html +++ b/sv/chatgpt.html @@ -11,7 +11,7 @@ - + @@ -31,21 +31,23 @@

FTW för ChatGPT

Få hjälp att installera FTW, förstå hemmets energiflöde och planer och undersöka fel i mätare, solceller, batterier och billaddare som FTW stöder.

-

Den offentliga publiceringen förbereds. Sourceful Labs AB utvecklar integrationen. Den finns ännu inte som godkänt offentligt plugin. Befintliga utvecklingsanslutningar är separata.

+

Finns inte i ChatGPT:s katalog för plugin än. Sourceful Labs AB utvecklar integrationen, och den väntar på OpenAI:s granskning. Tills den finns där kan du lägga till den i ChatGPT själv, som stegen nedan visar.

Ingen FTW-box än?

-

Installationsguiden hjälper dig att välja dator, följa den aktuella installationsguiden, ansluta utrustning och kontrollera färska mätvärden. Du behöver inget anslutet hem för att få hjälp med installationen. Du kör installationen på din egen dator; ChatGPT kan inte logga in på din Pi eller router åt dig.

-

Börja med Installera och uppdatera FTW. Kontrollera modell och testade funktioner i enhetskatalogen. Att en modell finns i katalogen bevisar inte att FTW kan styra just din utrustning.

+

Installera FTW först. Kom igång visar vad du behöver och de två sätten att installera själv: knappen för Home Assistant, eller en rad för en 64-bitars Linux-dator. Ge ChatGPT den sidan, så kan den guida dig. Du kör installationen på din egen dator; ChatGPT kan inte logga in på din Pi eller router åt dig.

+

Kontrollera modell och testade funktioner i enhetskatalogen. Att en modell finns i katalogen bevisar inte att FTW kan styra just din utrustning.

Förstå ett anslutet hem

Med ditt godkännande kan ChatGPT läsa aktuell effekt, batteriets och bilens laddnivå, tidigare effektvärden, planerarens förslag, utrustningens status samt loggar och inställningar där boxen har dolt känsliga uppgifter. Gamla och saknade mätvärden skiljer sig från färska mätningar. Planer och beräknade besparingar bevisar inte vad utrustningen gjorde eller vad du sparade.

-

Den offentliga anslutningen har en fast uppsättning namngivna verktyg. Den ger inte fri API-åtkomst, export av säkerhetskopior eller rätt att spara installationens inställningar. Om en fråga kräver andra uppgifter förklarar den vad som saknas och hjälper dig att kontrollera lokalt.

-

Godkänn åtkomst i FTW

+

Den offentliga anslutningen har en fast uppsättning namngivna verktyg. Den ger inte fri API-åtkomst eller export av säkerhetskopior. Om en fråga kräver andra uppgifter förklarar den vad som saknas och hjälper dig att kontrollera lokalt.

+

Anslut ChatGPT

    -
  1. Kör en aktuell FTW-beta, slå på FTW Cloud på boxen och läs informationen innan du accepterar villkoren.
  2. -
  3. Starta FTW-anslutningen i din utvecklingsinstallation av ChatGPT. FTW:s sida för godkännande visar en kod och en länk för ägaren.
  4. +
  5. Kör en aktuell FTW-beta, slå på FTW Cloud på boxen och läs informationen innan du accepterar villkoren. På en ny box väljer du Set up with ChatGPT or Claude instead på första sidan. På en box du redan använder öppnar du Settings → Access.
  6. +
  7. Lägg till den här adressen som en egen MCP-server på sidan Plugins i ChatGPT. I vissa arbetsytor måste utvecklarläget (developer mode) vara på först. +
    https://cloud.ftw.energy/mcp?profile=public
  8. +
  9. ChatGPT öppnar FTW:s sida för godkännande. Den visar en kod och en länk för ägaren. Där står också att FTW Cloud inte har kontrollerat assistenten: se efter att det står ChatGPT.
  10. Godkänn förfrågan i FTW-appen eller på boxens egen sida för åtkomst. Välj rättigheter och giltighetstid. Skriv inte lösenord, nycklar eller koder för godkännande i chatten.
  11. Fråga vilket hem ChatGPT kan nå och vad du har tillåtit. Du kan avsluta åtkomsten i FTW när som helst.
-

Läsning och styrning är separata val. En kort laddning kräver att du ber om den och har gett rätt behörighet. En bestående måländring väntar på ägarens godkännande. Core kontrollerar varje kommando och styrningen stannar på boxen.

+

Läsning, styrning och installation är separata val. En kort laddning kräver att du ber om den och har gett rätt behörighet. En bestående måländring väntar på ägarens godkännande. Installationsverktygen kan leta efter enheter på hemmanätverket, testa en enhet med styrningen spärrad, ändra boxens inställningar och starta om den. De kräver en separat behörighet för installation, som ägaren godkänner på boxen. Med den behörigheten kan ChatGPT spara inställningar när du har granskat och bekräftat det exakta utkastet, och starta om boxen när du har godkänt det korta avbrottet. Core kontrollerar varje kommando och styrningen stannar på boxen.

Dina uppgifter

FTW Cloud kan läsa assistentens anslutning när tjänsten förmedlar frågor och svar mellan ChatGPT och boxen. OpenAI tar emot de uppgifter du låter anslutningen lämna ut. Läs Integritet: assistenter och villkoren för pluginet.

Få hjälp

@@ -58,5 +60,6 @@

Få hjälp

+ diff --git a/sv/start.html b/sv/start.html new file mode 100644 index 0000000..0f0cd0f --- /dev/null +++ b/sv/start.html @@ -0,0 +1,113 @@ + + + + + + Kom igång | FTW + + + + + + + + + + + + + +
+

FTW · Öppen beta

+

Kom igång med FTW

+

FTW körs på en dator i ditt hem. Den planerar batteriet, bilen och solcellerna efter elpriset och vädret, och styr dem sedan. Här står vad du behöver och fyra sätt att börja.

+ +

Det här behöver du

+
    +
  • En dator hemma som alltid är på. Home Assistant, eller en 64-bitars Linux-dator med systemd: en Raspberry Pi 3 eller nyare, en minidator eller en gammal bärbar dator.
  • +
  • Utrustning som FTW stöder, på hemmanätverket: växelriktare, batteri, laddbox eller elmätare. Sök efter din på märke i enhetskatalogen (på engelska). 6 av 91 drivrutiner är bekräftade på riktig hårdvara hittills.
  • +
+

FTW är i öppen beta. Det finns ingen stabil version än, och FTW ändras ofta. Berätta i Discord på svenska vad som fungerar och vad som går sönder.

+ +

Fyra sätt att börja

+ +
+

1 Home Assistant

+
    +
  1. Välj knappen. Den lägger till FTW i din Home Assistant.
    Lägg till i Home Assistant
  2. +
  3. Installera FTW (beta).
  4. +
  5. Välj Starta (Start).
  6. +
  7. Välj Öppna webbgränssnittet (Open Web UI). FTW öppnas inne i Home Assistant. Vill du ha FTW i sidofältet slår du på Visa i sidofältet (Show in sidebar).
  8. +
+

Kräver Home Assistant OS. Steg för steg (på engelska)

+
+ +
+

2 En Linux-dator

+

En 64-bitars Linux-dator med systemd: en Raspberry Pi 3 eller nyare med Raspberry Pi OS Lite (64-bit), en minidator eller en gammal bärbar dator.

+
    +
  1. Kör den här raden på datorn: +
    curl -fsSL https://ftw.energy/install.sh | bash -s -- --fresh-host
  2. +
  3. Öppna adressen som raden skriver ut, till exempel http://192.168.1.23:8080/setup, i en webbläsare på samma nätverk.
  4. +
+

Raden installerar den senaste versionen på en dator som inte har FTW. Steg för steg (på engelska). Kör du redan FTW? Byt eller uppdatera (på engelska).

+
+ +
+

3 En färdig box

+

En liten dator som är förberedd för FTW och klar att koppla in. Den säljs inte än. Skriv upp dig på väntelistan (på engelska), så mejlar vi när beställningarna öppnar.

+
+ +
+

4 Börja med en AI-assistent

+

Claude eller ChatGPT kan sätta upp hemmet tillsammans med dig, när FTW väl körs på din dator.

+
    +
  1. Installera FTW först, på sätt 1 eller 2.
  2. +
  3. Välj Set up with ChatGPT or Claude instead på boxens första sida. Redan igång? Anslut senare under Settings → Access.
  4. +
  5. Lägg till FTW i assistenten med den här adressen: +
    https://cloud.ftw.energy/mcp?profile=public
    +
      +
    • Claude: öppna Settings → Connectors i Claude på webben, datorn eller telefonen. Välj Add custom connector, klistra in adressen och lämna klient-id tomt.
    • +
    • ChatGPT: FTW finns inte i ChatGPT:s katalog för plugin än; den väntar på OpenAI:s granskning. Till dess lägger du till adressen som en egen MCP-server på sidan Plugins i ChatGPT. I vissa arbetsytor måste utvecklarläget (developer mode) vara på först. Mer om FTW för ChatGPT
    • +
  6. +
  7. Assistenten öppnar en sida hos FTW Cloud med en kod. Skriv koden på boxen under Settings → Access, eller godkänn i FTW-appen.
  8. +
  9. Be assistenten att sätta upp ditt hem. Den läser bara det du tillåter. Styrning och installation är separata behörigheter, och boxen kontrollerar varje steg.
  10. +
+

Behöver du hjälp med själva installationen? Ge valfri assistent den här sidan, https://ftw.energy/sv/start, och be den guida dig. Grok, Cursor, Claude Code och Codex ansluts på samma sätt: se stegen (på engelska). Så fungerar åtkomst och integritet

+
+ +

Lägg till telefonen

+
    +
  • iPhone: FTW-appen, FTW Energy i App Store. Gratis, iOS 26 eller senare. Öppna Settings → FTW app på boxen, välj Show pairing code och skanna koden med appen. Support för appen
  • +
  • Android: en tidig testversion. Fråga efter den i Discord på svenska.
  • +
  • Ingen FTW än? Prova demon. Den visar ett simulerat hem, och det gör appen också tills du parkopplar den.
  • +
+ +

Få hjälp

+ +
+ + + + + + diff --git a/tests/start-page.test.mjs b/tests/start-page.test.mjs new file mode 100644 index 0000000..7515f0a --- /dev/null +++ b/tests/start-page.test.mjs @@ -0,0 +1,132 @@ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync, existsSync, readdirSync } from 'node:fs'; + +const read = path => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8'); +const exists = path => existsSync(new URL(`../${path}`, import.meta.url)); +const line = 'curl -fsSL https://ftw.energy/install.sh | bash -s -- --fresh-host'; +const startPages = ['start.html', 'sv/start.html']; + +// The rules in _redirects: "source destination [code]", one per line. +const redirects = read('_redirects').split('\n').map(l => l.trim()).filter(l => l && !l.startsWith('#')) + .map(l => { const [source, destination, code = '302'] = l.split(/\s+/); return { source, destination, code: Number(code) }; }); + +// The page a site path serves on Cloudflare Pages, or null: "/" is index.html, "/x/" is +// x/index.html, and "/x" is x.html or the file x itself. +function served(path) { + const clean = decodeURIComponent(path).replace(/^\//, ''); + if (clean === '' || clean.endsWith('/')) return exists(`${clean}index.html`) ? `${clean}index.html` : null; + if (exists(`${clean}.html`)) return `${clean}.html`; + return exists(clean) ? clean : null; +} +const ids = page => new Set([...read(page).matchAll(/\sid="([^"]+)"/g)].map(m => m[1])); + +test('both start pages show the one install line once, with a Copy button for it', () => { + for (const page of startPages) { + const html = read(page); + const code = html.match(/([\s\S]*?)<\/code>/); + assert.ok(code, `${page} has the install line`); + assert.equal(code[1].replace(/<[^>]+>/g, ''), line, page); + assert.equal(html.match(/id="install-line"/g).length, 1, page); + assert.match(html, /