You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the feedback! Importing the external .svgs is currently work in progress. They can vary quite a bit so it's a bit tricky.
Hopefully will get the next version out in upcoming week or two,
RAMSES model: pulls RAMSES-II/evohome devices straight from Ramses Extras' get_topology (or the HA registries as fallback) and drops them as markers in the right room, with class icons, colours, and states
Import card model: imports a custom:floorplan-card or picture-elements card already running in your HA, including Ramses Extras-generated SVGs, pulling the markers/rooms/background back into an editable Studio project
Would be great if you could try it against your Ramses Extras setup once it's merged/released — curious how it holds up on a real topology.
Oh, this is more than I expected and had me thinking about the architecture and maintainability of this. I'll suggest to take this in a different direction, but let me first explain where I'm at currently with the Ramses projects and my roles:
Ramses rf (contributor) low lvl communications with the Ramses radio protocol, etc.
Ramses cc (contributor) HA integration exposing devices and entities that can be used for card, automations etc.
Ramses extras (maintainer) extension on Ramses RF repo's with extra features like cards, automations etc. including the floorplan helpers i'm currently working on.
I noticed you work with Claude a lot. I use different models myself (claude, chatgtp, swe, gemini...depends what suits). If you plan to accept and merge any of my (possible) PR's, I'm sure claude will be able to review it properly to make sure it fits your goals.
Since Floorplan editors/studios are quite a recent dev area (at least on HA) I am still betting on different horses. I don't know what editor will suit our Ramses purposes best. It depends on progress, features, adaptability, how likely is it going to be used by our users (Ramses) and how likely is it that it still is maintained in a few years from now...
I actually started with plain floorplanner, then your studio, and also came across https://github.com/vespassassina/ha-floorplan-studio and maybe some other may show up.
Now the technical part, since I actually tested your branch (built feat/ramses-import locally, ran it as a card on our dev instance against a real ramses_extras topology — 53 devices, messy orphans and all — and it works: room placement by area, staging row, state rules, the lot). A few notes:
the HA area is dropped after placement; showing 'in room X' in the marker inspector (you already have pointInPolygon) or keeping area_id on the marker would make the linkage visible and enable room→area sync later.
parent is in the payload and you parse it, but it's dropped before the marker — the plan has entity-bound icons, no topology. If you want it, a generic meta/links field on Marker is the smallest schema change; otherwise the listener hook lets integrations derive it live from get_topology without schema changes.
One more topology data point: HA 2026.9 introduced real parent/child devices (parent_device_id). ramses_cc already registers zones/DHW as child devices of the controller on ≥2026.9 — but only one level, since HA children can't have children, so TRV-in-zone stays flat. Meaning: your importer needs to read via_device and parent_device_id, and even then the full ramses tree (TCS→zone→actuators, FAN→bound devices) only exists in the ramses_rf schema — which is what get_topology exposes. One more reason topology belongs with the provider.
Your PR splits cleanly in two, and the split point is the interesting part:
plan.ts — the placement planner (area→room matching, staging rows, idempotent re-import, single undo) is completely generic. It only sees device_id, area_id, entities[]. This is the valuable bit and it's editor territory.
src/ramses/topology.ts + fetch.ts — that's a second copy of our internals: it mirrors our ENTITY_ROLE_PATTERNS, _PRIMARY_DOMAIN_ORDER, icon map, class list and the literal ramses_extras/floorplan_helper/get_topology WS type. Ramses-domain knowledge living outside the ramses repos.
And the drift is already real — on live data I hit two concrete mismatches:
Your test fixture expects zone sub-devices (01:145038_02, class unknown) in get_topology's devices. We intentionally fold ctl_02/ctl_HW entities onto their physical sensor/actuator — zones only exist in heat_zones (name/sensor/actuators/class), which the importer ignores. Result: no zone markers when Ramses Extras is installed, while your ramses_cc-registry fallback does produce zones (they're real HA sub-devices there). Same modal, different result depending on which repo is installed.
Our device_class: "SEN" hint beats your id-derived class, so 17 TRVs/thermostats imported as generic "Sensor" with a thermometer icon instead of radiator/thermostat. Also APP, HVC, unknown classes it has to guess around.
That's exactly the maintenance trap: every change on our side (new device class, renamed field, folded entity) silently breaks or misleads your copy, and you'd have to track ramses_rf's device taxonomy forever — for an integration you (perhaps) don't use.
So here's the proposal — same direction as what I suggested on vespassassina/ha-floorplan-studio#1: keep the editor generic and let integrations register their own providers, menus and defaults. Shape-wise I'd register a manifest, not a class:
A manifest is data + functions the editor calls at defined points — no foreign code instantiated inside your component, you keep lifecycle control, plugins never get DOM refs.
Capability slots cover different kinds of things: device importers (deviceSources — "RAMSES" becomes "Import devices", hidden when none registered), menu/toolbar items (actions → clicks emit a bubbling CustomEvent with {id, floorId, selection}), and pure data contributions like iconMap or wall/door style defaults.
On the decoration side: don't give us listeners to patch the DOM after render — give us defaults we can override. iconMap, markerDefaults, stateRulePresets and a css URL, merged as user config > plugin > built-in, covers almost everything our overlay does imperatively today (spinning FAN icons, heat-demand colours, captions). All we'd need besides is stable CSS hooks (custom properties / ::part / data-entity attributes) so our stylesheet overrides your defaults rather than our JS injecting classes into your shadow DOM. Real listeners shrink to interactions only — selection, gestures, menu clicks — three or four documented events.
Versioning is one field: unknown provides keys are ignored by older editors, so both sides evolve independently. Z-wave, esphome, knx… can register the same way — that's the big win for you: you maintain the canvas/planner/renderer, integrations own their domain menus. And most of the contract is data you can validate in one place — less API to maintain, not more.
Two more concrete things this fixes:
Right now our actions card literally writes to your IndexedDB projects store — fragile on both sides; an official importProject()/CustomEvent API kills that coupling in both directions.
For the fallback path: instead of ramses_cc-filtered registry scanning, make it generic — "import devices by integration" (pick a domain: ramses_cc, zwave_js, hue…). Same feature, zero ramses specifics, useful to everyone.
Concrete way forward: no need to split or rework your PR — merge it as-is if you want, it works today. Then we create a PR on top that introduces the manifest registries/hooks and moves the ramses-specific half out into a provider, with our integration as the working example (PoC included). The diff itself documents the plugin API for other integrations. If you'd rather split it yourself first, that's fine too — but I'm happy to do the work.
The neutral data contract is already there btw: your paste path accepts a studio project / floorplan_seed_studio response and merges it — project_json is the boundary. Our service already emits studio-native markers with icons/colours/labels/actions resolved server-side.
Thanks for actually running it against real hardware, that's exactly the kind of signal a solo side project can't generate on its own, and the two mismatches you found (zone folding, SEN beating id-derived class) are a pretty clean proof of the point you're making.
And yes, let's go with the plugin manifest direction. Agreed on the framing: plan.ts (area, room matching, staging, idempotent re-import, undo) is the part worth keeping generic in the editor; everything that has to track ramses_rf's device taxonomy belongs with you, not duplicated here. The registerPlugin() shape you sketched, deviceSources, actions, iconMap/markerDefaults/stateRulePresets, css, versioned via ignored-unknown-keys, looks like the right contract to commit to, including the "editor keeps lifecycle control, no DOM refs handed to plugins" constraint.
Happy to have you drive the PR, with your ramses provider as the reference implementation, makes sense for the diff to double as the plugin API's documentation. A few things I'd want in that PR (or we can hash out on the PR itself):
stable event names/payload shape for the action click CustomEvents, documented once, not implied by one example
the importProject()/event-based replacement for the current direct-IndexedDB write, since that's a real bug risk today regardless of the rest
enough in CHANGELOG/USER_GUIDE for a second integration author (zwave_js, esphome, whoever) to register without reading your provider's source
No need to touch the fallback registry-scan path in the same PR unless it's easy, generic "import by integration domain" can follow once the plugin surface settles.
Go ahead whenever you're ready, I'll review promptly.
Activity
tinkersoder commentedon Oct 24, 2026
Thanks for the feedback! Importing the external .svgs is currently work in progress. They can vary quite a bit so it's a bit tricky.
Hopefully will get the next version out in upcoming week or two,
tinkersoder commentedon Nov 3, 2026
Follow-up: opened #6 with both import paths.
get_topology(or the HA registries as fallback) and drops them as markers in the right room, with class icons, colours, and statescustom:floorplan-cardorpicture-elementscard already running in your HA, including Ramses Extras-generated SVGs, pulling the markers/rooms/background back into an editable Studio projectWould be great if you could try it against your Ramses Extras setup once it's merged/released — curious how it holds up on a real topology.
wimpie70 commentedon Nov 3, 2026
Oh, this is more than I expected and had me thinking about the architecture and maintainability of this. I'll suggest to take this in a different direction, but let me first explain where I'm at currently with the Ramses projects and my roles:
I noticed you work with Claude a lot. I use different models myself (claude, chatgtp, swe, gemini...depends what suits). If you plan to accept and merge any of my (possible) PR's, I'm sure claude will be able to review it properly to make sure it fits your goals.
Since Floorplan editors/studios are quite a recent dev area (at least on HA) I am still betting on different horses. I don't know what editor will suit our Ramses purposes best. It depends on progress, features, adaptability, how likely is it going to be used by our users (Ramses) and how likely is it that it still is maintained in a few years from now...
I actually started with plain floorplanner, then your studio, and also came across https://github.com/vespassassina/ha-floorplan-studio and maybe some other may show up.
Now the technical part, since I actually tested your branch (built
feat/ramses-importlocally, ran it as a card on our dev instance against a real ramses_extras topology — 53 devices, messy orphans and all — and it works: room placement by area, staging row, state rules, the lot). A few notes:Your PR splits cleanly in two, and the split point is the interesting part:
plan.ts— the placement planner (area→room matching, staging rows, idempotent re-import, single undo) is completely generic. It only seesdevice_id,area_id,entities[]. This is the valuable bit and it's editor territory.src/ramses/topology.ts+fetch.ts— that's a second copy of our internals: it mirrors ourENTITY_ROLE_PATTERNS,_PRIMARY_DOMAIN_ORDER, icon map, class list and the literalramses_extras/floorplan_helper/get_topologyWS type. Ramses-domain knowledge living outside the ramses repos.And the drift is already real — on live data I hit two concrete mismatches:
01:145038_02, classunknown) inget_topology'sdevices. We intentionally foldctl_02/ctl_HWentities onto their physical sensor/actuator — zones only exist inheat_zones(name/sensor/actuators/class), which the importer ignores. Result: no zone markers when Ramses Extras is installed, while your ramses_cc-registry fallback does produce zones (they're real HA sub-devices there). Same modal, different result depending on which repo is installed.device_class: "SEN"hint beats your id-derived class, so 17 TRVs/thermostats imported as generic "Sensor" with a thermometer icon instead of radiator/thermostat. AlsoAPP,HVC,unknownclasses it has to guess around.That's exactly the maintenance trap: every change on our side (new device class, renamed field, folded entity) silently breaks or misleads your copy, and you'd have to track ramses_rf's device taxonomy forever — for an integration you (perhaps) don't use.
So here's the proposal — same direction as what I suggested on vespassassina/ha-floorplan-studio#1: keep the editor generic and let integrations register their own providers, menus and defaults. Shape-wise I'd register a manifest, not a class:
deviceSources— "RAMSES" becomes "Import devices", hidden when none registered), menu/toolbar items (actions→ clicks emit a bubblingCustomEventwith{id, floorId, selection}), and pure data contributions likeiconMapor wall/door style defaults.iconMap,markerDefaults,stateRulePresetsand acssURL, merged as user config > plugin > built-in, covers almost everything our overlay does imperatively today (spinning FAN icons, heat-demand colours, captions). All we'd need besides is stable CSS hooks (custom properties /::part/data-entityattributes) so our stylesheet overrides your defaults rather than our JS injecting classes into your shadow DOM. Real listeners shrink to interactions only — selection, gestures, menu clicks — three or four documented events.provideskeys are ignored by older editors, so both sides evolve independently. Z-wave, esphome, knx… can register the same way — that's the big win for you: you maintain the canvas/planner/renderer, integrations own their domain menus. And most of the contract is data you can validate in one place — less API to maintain, not more.Two more concrete things this fixes:
projectsstore — fragile on both sides; an officialimportProject()/CustomEventAPI kills that coupling in both directions.Concrete way forward: no need to split or rework your PR — merge it as-is if you want, it works today. Then we create a PR on top that introduces the manifest registries/hooks and moves the ramses-specific half out into a provider, with our integration as the working example (PoC included). The diff itself documents the plugin API for other integrations. If you'd rather split it yourself first, that's fine too — but I'm happy to do the work.
The neutral data contract is already there btw: your paste path accepts a studio project /
floorplan_seed_studioresponse and merges it —project_jsonis the boundary. Our service already emits studio-native markers with icons/colours/labels/actions resolved server-side.Regards, Willem
tinkersoder commentedon Nov 4, 2026
Thanks for actually running it against real hardware, that's exactly the kind of signal a solo side project can't generate on its own, and the two mismatches you found (zone folding, SEN beating id-derived class) are a pretty clean proof of the point you're making.
Merged #6 as-is. It's live on main now.
And yes, let's go with the plugin manifest direction. Agreed on the framing: plan.ts (area, room matching, staging, idempotent re-import, undo) is the part worth keeping generic in the editor; everything that has to track ramses_rf's device taxonomy belongs with you, not duplicated here. The registerPlugin() shape you sketched, deviceSources, actions, iconMap/markerDefaults/stateRulePresets, css, versioned via ignored-unknown-keys, looks like the right contract to commit to, including the "editor keeps lifecycle control, no DOM refs handed to plugins" constraint.
Happy to have you drive the PR, with your ramses provider as the reference implementation, makes sense for the diff to double as the plugin API's documentation. A few things I'd want in that PR (or we can hash out on the PR itself):
No need to touch the fallback registry-scan path in the same PR unless it's easy, generic "import by integration domain" can follow once the plugin surface settles.
Go ahead whenever you're ready, I'll review promptly.
-Joona