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..729e9d0 100644 --- a/chatgpt.html +++ b/chatgpt.html @@ -11,7 +11,7 @@ - + @@ -31,21 +31,24 @@

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 help you step by step. 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. Finish the setup guide, then connect the assistant under Settings → Access. On a new box from the next beta, you can also choose Set up with ChatGPT or Claude instead on the first page.
  6. +
  7. In ChatGPT on the web, open Plugins, choose +, then Add custom MCP server. Give it a name and paste this address: +
    https://cloud.ftw.energy/mcp?profile=public
    + In a Business workspace, an admin adds it. On a Pro plan, ChatGPT can read your home but cannot control it or set it up.
  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 +61,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..c04e02e 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; } @@ -69,7 +70,7 @@ h3 { margin-bottom: 8px; font-size: 21px; font-weight: 500; line-height: 1.25; l .nav-links { display: flex; align-items: center; gap: 24px; font-size: 11px; } .nav-links a { color: var(--ink2); text-decoration: none; } .nav-links a:hover { color: var(--ink); } -.nav-links .nav-cta { padding: 10px 14px; background: var(--ink); color: var(--ground); } +.nav-links .nav-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--ink); color: var(--ground); } .nav-links .nav-cta:hover { color: var(--ground); background: #ffffff; } .mobile-nav { display: none; position: relative; } .mobile-nav summary { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid var(--rule); font-size: 11px; } @@ -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: 44px; 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) { @@ -406,7 +410,7 @@ footer { padding: 64px 0 28px; border-top: 1px solid var(--hairline); background @media (max-width: 600px) { .wrap { width: calc(100% - 32px); } body { font-size: 16px; } - .nav-links .nav-cta { padding: 9px 10px; } + .nav-links .nav-cta { padding: 0 10px; } .project-facts { grid-template-columns: 1fr 1fr; row-gap: 16px; } .project-facts div:nth-child(3) { padding-left: 0; border-left: 0; } .hero-actions .btn { flex: 1 1 auto; } @@ -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..7b58385 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..d8f0b13 --- /dev/null +++ b/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / +Disallow: /api/ +Disallow: /future/api/ diff --git a/sourceful.css b/sourceful.css index 0781099..67542fe 100644 --- a/sourceful.css +++ b/sourceful.css @@ -56,7 +56,7 @@ code, pre, .nav-links, .brand-name, .project-state, .section-kicker, .nav-links { display: flex; align-items: center; gap: 26px; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; } .nav-links a { color: var(--cream); text-decoration: none; opacity: 0.68; } .nav-links a:hover { opacity: 1; } -.nav-links .nav-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 14px; background: var(--signal); color: var(--ink); opacity: 1; font-weight: 700; } +.nav-links .nav-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: var(--signal); color: var(--ink); opacity: 1; font-weight: 700; } .hero { background: var(--cream); border-bottom: 1px solid var(--line); } .hero-layout { min-height: min(860px, calc(100svh - 68px)); display: grid; grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr); gap: 64px; align-items: center; padding-block: 72px; } @@ -267,7 +267,7 @@ footer { padding: 62px 0 26px; background: var(--ink); color: var(--cream); } @media (max-width: 600px) { .nav { min-height: 62px; gap: 12px; } .brand-name { font-size: 17px; } - .nav-links .nav-cta { min-height: 34px; padding-inline: 11px; } + .nav-links .nav-cta { min-height: 44px; padding-inline: 11px; } .hero-layout { padding-block: 54px 66px; } .project-state { align-items: flex-start; line-height: 1.5; } h1 { font-size: clamp(3.25rem, 15.5vw, 4.5rem); } @@ -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..0ac6009 --- /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

+ +

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. Finish the setup guide, then connect the assistant under Settings → Access. On a new box from the next beta, you can also choose Set up with ChatGPT or Claude instead on the first page.
  4. +
  5. Add FTW to your assistant with this address: +
    https://cloud.ftw.energy/mcp?profile=public
    +
      +
    • Claude, on claude.ai or in the desktop app: open Customize → Connectors, choose +, then Add custom connector. Give it a name, paste the address and keep the recommended sign-in, Claude's published identity. On a Team or Enterprise plan, an owner adds it under Organization settings → Connectors, and then you connect.
    • +
    • ChatGPT, on the web: FTW is not in ChatGPT's plugin directory yet; it waits for OpenAI's review. Until then, open Plugins, choose +, then Add custom MCP server, and paste the address. In a Business workspace, an admin adds it. On a Pro plan, ChatGPT can read your home but cannot control it or set it up. 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 help you step by step. Grok, Cursor, Claude Code and Codex connect the same way: see the steps. How access and privacy work

+
+ +

Add your phone

+ + +

Get help

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

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 hjälpa dig steg för steg. 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. Gör klart installationsguiden och anslut sedan assistenten under Settings → Access. På en ny box från nästa beta kan du också välja Set up with ChatGPT or Claude instead på första sidan.
  6. +
  7. Öppna Plugins i ChatGPT på webben, välj + och sedan Add custom MCP server. Ge servern ett namn och klistra in den här adressen: +
    https://cloud.ftw.energy/mcp?profile=public
    + I en Business-arbetsyta lägger en administratör till den. Med Pro kan ChatGPT läsa av hemmet men inte styra det eller sätta upp det.
  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 +61,6 @@

Få hjälp

+ diff --git a/sv/start.html b/sv/start.html new file mode 100644 index 0000000..4ee6a75 --- /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

+ +

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, med sätt 1 eller 2.
  2. +
  3. Gör klart installationsguiden och anslut sedan assistenten under Settings → Access. På en ny box från nästa beta kan du också välja Set up with ChatGPT or Claude instead på första sidan.
  4. +
  5. Lägg till FTW i assistenten med den här adressen: +
    https://cloud.ftw.energy/mcp?profile=public
    +
      +
    • Claude, på claude.ai eller i datorappen: öppna Customize → Connectors, välj + och sedan Add custom connector. Ge kopplingen ett namn, klistra in adressen och behåll den rekommenderade inloggningen, Claude's published identity. Med Team eller Enterprise lägger en ägare till den under Organization settings → Connectors, och sedan ansluter du.
    • +
    • ChatGPT, på webben: FTW finns inte i ChatGPT:s katalog för plugin än; den väntar på OpenAI:s granskning. Till dess öppnar du Plugins, väljer + och sedan Add custom MCP server, och klistrar in adressen. I en Business-arbetsyta lägger en administratör till den. Med Pro kan ChatGPT läsa av hemmet men inte styra det eller sätta upp det. 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 hjälpa dig steg för steg. Grok, Cursor, Claude Code och Codex ansluts på samma sätt: se stegen (på engelska). Så fungerar åtkomst och integritet

+
+ +

Lägg till telefonen

+ + +

Få hjälp

+ +
+ + + + + + diff --git a/tests/start-page.test.mjs b/tests/start-page.test.mjs new file mode 100644 index 0000000..5b5ad26 --- /dev/null +++ b/tests/start-page.test.mjs @@ -0,0 +1,146 @@ +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, /