Compare commits
40
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96e5311baf | ||
|
|
16eddacebf | ||
|
|
382d6e04f2 | ||
|
|
bffc4d0acc | ||
|
|
4a8da8ad0c | ||
|
|
888b6c9b79 | ||
|
|
2407e09456 | ||
|
|
984d9af232 | ||
|
|
1d67e8ceba | ||
|
|
c56f1a5ba9 | ||
|
|
d8cf076019 | ||
|
|
992c3e18f2 | ||
|
|
a2a119d3ee | ||
|
|
e62f987563 | ||
|
|
59292517b7 | ||
|
|
df4a6f36a3 | ||
|
|
173d02e3cc | ||
|
|
93c015ec77 | ||
|
|
8c6b23bd22 | ||
|
|
4967dd7950 | ||
|
|
6bd3598779 | ||
|
|
5fd674bb00 | ||
|
|
2bf5f4a60a | ||
|
|
cfc77787a0 | ||
|
|
bb153490b0 | ||
|
|
a804fc8e15 | ||
|
|
18e73194e0 | ||
|
|
510aece983 | ||
|
|
8845efdc23 | ||
|
|
3f6cca056c | ||
|
|
7a9b2c0a38 | ||
|
|
b9a095bc6e | ||
|
|
00fca890de | ||
|
|
ff54f4461a | ||
|
|
24188f96f7 | ||
|
|
b934f78b9a | ||
|
|
804f2d0494 | ||
|
|
eff9eb83d7 | ||
|
|
4a875aa8ea | ||
|
|
2a81b4a502 |
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
|
*.png binary
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
node_modules/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
.pytest_cache/
|
||||||
|
.ruff_cache/
|
||||||
|
.mypy_cache/
|
||||||
|
.venv/
|
||||||
|
deploy.local.json
|
||||||
|
preview/screenshots/
|
||||||
|
private/
|
||||||
|
*.pem
|
||||||
|
*.key
|
||||||
|
|
||||||
|
# owned 3D models never go into the repository
|
||||||
|
*.glb
|
||||||
|
nextfloor_meshes/
|
||||||
|
preview/.tutorial-state.json
|
||||||
|
|
||||||
|
# local tutorial recordings
|
||||||
|
frontend/tutorial/out/
|
||||||
|
# tool installers do not belong here
|
||||||
|
*.whl
|
||||||
|
|
||||||
|
# knowledge-graph tooling output
|
||||||
|
graphify-out/
|
||||||
|
*.bak-graphify
|
||||||
|
tools/docs/dist/
|
||||||
+759
@@ -0,0 +1,759 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to NextFloor, newest first. Every release lists what is **Added**, **Changed** and **Fixed**. Releases: [GitHub releases](https://github.com/therealMRBK/NextFloor/releases).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Utility overview follows topology (Symcon 0.4.3):** List buildings inside a selected branch and storeys inside a building, with the matching immediate-child breakdown for locations and the all-locations view. Keep the current selection's totals above the view and use its actual name/path in the summary and side heading. Open child groups through the existing topology navigation and retain native area/room/device breakdowns at floor level, outdoor-owner counters, manual floor overrides, periods, trends, live zero values and Err: subtotals. Use a shared native-category discovery context for parent and child subtotals so linked categories in other buildings cannot inflate an individual building row. Preserve shared-source deduplication and legacy plans.
|
||||||
|
|
||||||
|
- **Unambiguous editor hierarchy (Symcon 0.4.1):** Move location, branch and building management into a separate Hierarchy dialog. Choose the building above the plan and add storeys only inside that selection; leave the right panel for existing floor, room and device properties. Group the room list by its linked native Symcon category, retain explicit room-name adoption and show the selected room's floor path. Building or metadata selection never reassigns floors or creates a storey. Preserve an empty building selection across refreshes and last-storey deletion, clear old plan selections on navigation and reject stale room edits. Replace the implicit floor-assignment dropdown with a dialog that names and captures the selected floor and changes its parent only when explicitly applied. Keep floor reordering and the lower-floor tracing layer inside the selected building or location's outside plan. Preserve legacy IDs, data points, per-location outdoors and permission keys.
|
||||||
|
|
||||||
|
- **Symcon version notices (Symcon 0.3.3):** Hide Home Assistant restart/companion-cache version banners in the Symcon designer, label the version tooltip for the Symcon module and rebuild the designer with the current release version. Actual load/save errors remain visible.
|
||||||
|
|
||||||
|
- **Native account form (Symcon 0.3.2):** Serialize every row of Symcon's iterable form List variables before saving rights, fixing rejected or lost room/device/object grants. Move the password and reset action below the user name. Reload all three tables and their target choices on account changes, preserving missing plan targets for their owner and clearing password/new-user inputs. Correct the designer button and documentation: `link:` opens a browser, whereas IPSView's internal Pro Console tab is a dedicated console integration, not a general module API.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Branch overviews, scoped outdoors and room moves (Symcon 0.4.2):** Select entire locations or branches above the editor, with read-only plan overviews and scoped 3D scenes. Create independent outdoor plans at location, branch and building level; preserve legacy location references, unique navigation keys, owner paths, thumbnails, isolated live values, stack ranks and roof exclusions through saves and backups. Add an explicit room-move dialog with destination building/storey and adjustable position, retaining room IDs, native links, openings, contained furniture/devices/notes and related geometry. Reject stale selections and duplicate destination devices before changing the plan. Migrate existing room/device grants only for unique stable identities when their floor changes, preserving permission levels and undo without granting access to additional users.
|
||||||
|
|
||||||
|
- **Five-level site topology (Symcon 0.4.0):** Add optional location → branch → building → floor → room groups with editor creation, naming, reassignment and protected removal. Preserve existing floor/room IDs and native grants when enabling the hierarchy. Each location owns an independent outdoor plan. Designer and tile navigation drill into the selected branch, keep the upper room menu hidden until a floor is selected, frame previews from the node's own geometry and clip room previews. Scope live values and utility overviews to the selected group, keep floor explosion/automatic roofs within each building, and limit whole-building transforms to its floors. Native permission choices expose complete paths. Persist topology and outdoor membership through schema validation and backups.
|
||||||
|
|
||||||
|
- **Hydronic status bindings (Symcon 0.3.1):** Add native object-tree status selection for individual heating/cooling circuits, every fresh-water cascade unit and the common plant. Floating cards and detail dialogs preserve formatted Integer aliases, including zero, live updates, unavailable values, archive access and scoped user permissions. Status readings remain read-only, hide unlinked rows and truncate long labels without widening cards; existing single stations retain their links when promoted to cascades.
|
||||||
|
|
||||||
|
- **Native accounts and scoped access (Symcon 0.3.0):** Add stable password login, hashed instance-local accounts managed exclusively in the native module form, admin editor access and independent global/room/placed-device/native-object view and control grants. Preserve whole-building geometry while removing unauthorized live bindings and values, restrict user-wide access to the visualization's data, and authorize archives, bulk actions, images, editor operations and transport ownership on the server. Add revocable HttpOnly sessions, CSRF checks, throttling, optional remembered login, password reset and one-use console admin tickets; tiles no longer carry admin credentials. User sessions do not persist private admin drafts in shared browser storage.
|
||||||
|
- **Garden paving materials (Symcon 0.3.0):** Add paving stones, spaced garden stepping slabs and irregular natural-stone paths with independent scale/rotation, locally generated 3D textures and matching editor types.
|
||||||
|
|
||||||
|
- **Per-area texture controls (Symcon 0.2.30):** Set outdoor pattern size (5–2000%, 100% preserves the original metre scale) and rotation independently for every area. Persist and duplicate the settings, wrap rotation and bound scale, and apply inverse sampling transforms to solid/transparent and sloped geometry without altering outlines or neighbors. Legacy plans retain the original appearance; an info popup explains the controls.
|
||||||
|
|
||||||
|
- **Outdoor snapping and surface textures (Symcon 0.2.29):** Snap outdoor outlines to nearby corners and edges when drawing, moving or resizing, preserving whole-area geometry and Alt bypass. Add street, sidewalk, gravel, river and stream surfaces with schema persistence; river/stream areas default to cutting through surrounding surfaces. All outdoor materials use local metre-scaled procedural textures with distance filtering, including paving joints, asphalt grain, pebbles, vegetation, earth, wood and water ripples. Textures compose with floor fading, slopes, transparency and scene themes without external assets.
|
||||||
|
|
||||||
|
- **Fresh-water cascades with storage links (Symcon 0.2.28):** Rebuild the 3D station around separate primary and potable-water paths and a plate exchanger. Add up to 16 named parallel units with independent native temperature, power, pump and isolation-valve links; preserve legacy single-station bindings on edit. Share the supply/return, hot/cold-water and optional circulation headers, keep one compact cascade overlay, and open per-station readouts/commands with archive trends and existing read-only guards. Link a placed same-floor buffer through two primary-only pipes that follow placement and floor transforms; removal releases connections and subscriptions. Buffer colour layers interpolate measured probes only. Adding/removing units adjusts width and never sends device commands or invents parent utility totals.
|
||||||
|
|
||||||
|
- **Charging station telemetry (Symcon 0.2.25):** Built-in and pack wallboxes expose native object-tree links for SoC, start/end time, charging duration, charged energy and Integer lock status with unchanged Symcon associations. Optional floating cards and room readouts work without a power/switch link, hide unlinked rows, retain zero/live/offline values and offer archive trends. Time/duration formats support native display and explicit numeric units. All telemetry is read-only.
|
||||||
|
|
||||||
|
- **Metered device hierarchy (Symcon 0.2.24):** Show placed devices and furniture with linked power below their plan room and native area in the right overview. Rooms without their own meter act as value-free headings; existing room counters remain separate. Device readings, including manifold pump power, retain zero/offline/live values and archive icons without changing parent totals. The hierarchy stays accessible on device-only floors.
|
||||||
|
|
||||||
|
- **Hydronic 3D equipment (Symcon 0.2.23):** Place configurable heating/cooling manifolds, buffer tanks and fresh-water stations from the furniture library. Manifolds support separate valve/pump circuits and valve-free feed pumps, independent command/readback bindings, raw-value changeover selection and visual-only valve inversion. Buffers start with seven height-configurable probe slots and support up to 64 plus flow/return; fresh-water stations expose flow, return, circulation and domestic hot water with independent charging/circulation pumps. Live pump rotors, valve pointers and probe colours accompany lazy floating cards/dialogs, archive trends and native action controls with read-only guards. Feedback stays authoritative even offline; native values and write ranges remain unchanged. Multi-reading hydraulic cards use nearby free columns to stay on screen.
|
||||||
|
|
||||||
|
- **Native area and room utility hierarchy (Symcon 0.2.22):** Floor overviews group by the linked native area ID and display its category name and readings once. Only rooms with explicitly assigned power/flow or consumption meters appear as indented children. The room editor provides native numeric meter selectors for all five media; children retain live values, archive access and navigation. Existing area totals cover room details; explicit room meters supply missing quantities without double counting and floor meters retain precedence.
|
||||||
|
|
||||||
|
- **Native picker feedback (Symcon 0.2.21):** Rejected selections explain native datatype requirements, instances/categories, missing variables or already linked schedules/presence variables inside the popup. Confirmation cannot apply an older pending choice after a rejection. Manual native variable selection uses actual datatypes instead of name/path/profile/domain heuristics; Boolean garage and staircase lights both support an explicit on/off light role without a dimmer, retaining saved references.
|
||||||
|
|
||||||
|
- **Furniture power cards (Symcon 0.2.20):** Every furniture item with a power link can opt into a floating 3D power card, including pack wallboxes with only a power variable. Cards retain zero/export readings, show missing readings as a dash, expose native archive trends and follow floor/room navigation and the global Cards switch. Native integer/float power variables remain selectable regardless of inferred device domain; power-only pack lights also offer marker settings.
|
||||||
|
|
||||||
|
- **Utility overview visibility switch:** The top bar can completely hide or restore the right floor/room overview independently of the top totals, with the choice remembered in the browser.
|
||||||
|
|
||||||
|
- **Native utility overview by scope:** The top bar shows building totals in all-floors view and the selected floor's totals otherwise. A quiet, foldable side card lists floors or rooms with power/flow and consumption, trend access, live updates and navigation. Building totals respect floor overrides and deduplicate shared native meters.
|
||||||
|
|
||||||
|
- **Native Symcon archive trends:** Logged values expose a compact trend icon in floating room cards and room/HVAC/weather/meter readouts. A lazy dialog reads original archive data with custom time/resolution and Y limits, time navigation, wheel/drag zoom, line/step/bar/table views, min/max, live refresh and CSV export. Counter aggregation uses native interval consumption; Boolean/string logs, empty/error/limited responses and different units are handled explicitly.
|
||||||
|
|
||||||
|
- **Native Symcon utility meters:** Discover electricity, water, gas, heating and cooling meters in a room's linked area hierarchy, including hidden categories and dummy modules. Display instantaneous power/flow and cumulative energy/consumption separately, sum compatible room readings per floor, and allow independent floor meter overrides for every medium through the object-tree picker. Preserve periods and units, deduplicate links, prefer parent totals over sub-meters, watch live updates, and expose room and floor reports.
|
||||||
|
|
||||||
|
- **Native Symcon room climate and clocks:** Select underfloor heating, supply/extract VSRs and temperatures, reheater and an aliased Integer room status from the object tree. The room menu displays and controls native writable values and shows multiple classic weekly schedules with day groups, switch points, action labels and activation controls.
|
||||||
|
- **Native Symcon weather and presence:** Link individual weather variables and arbitrary Boolean presence variables; weather data drives the 3D sky and rain warnings, while named people appear in the status bar and optionally in a chosen room.
|
||||||
|
|
||||||
|
- **Room-name toolbar switches:** The 3D view and editor expose a direct room-name switch at the top, sharing the remembered designer preference. Cards expose the same switch in their 3D top bar. Hiding room names keeps notes, devices and climate cards visible.
|
||||||
|
|
||||||
|
- **Room illuminance and multiple device readings:** Rooms can link a brightness sensor and show lux with a sun symbol; CO₂ uses a cloud. A small + button adds device/furniture values with independent object-tree choices, custom symbols and optional labels, shown on device markers and in the room panel.
|
||||||
|
|
||||||
|
- **Floating room climate cards:** Each room can show temperature, humidity and CO₂ in a glass card above its own position, using its selected sensors. Cards follow live values and room/floor navigation and can be toggled without configuring an energy meter.
|
||||||
|
|
||||||
|
- **IP-Symcon variable reload:** A button in the designer title bar reloads the complete object tree, variables and current presentation metadata without closing the plan, with progress, success and error feedback.
|
||||||
|
|
||||||
|
- **IP-Symcon object-tree picker:** Data point fields open a modal dialog with the real Symcon hierarchy, including instances, links, hidden objects and empty categories, ordered as in the console. Search keeps matching objects in their original branches; confirmation, cancellation and keyboard navigation are supported.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Zoom-dependent device cards (Symcon 0.2.27):** Use actual perspective pixels per plan metre to reveal room, equipment and device details progressively. Active consumption/export appears before idle zero-W cards, with hysteresis around zoom boundaries. Keep summaries/totals independent, prioritise useful readings, preserve focused controls, and hide overflowing or excessively displaced device cards instead of creating long towers. Zooming/panning back into the group restores its detail cards without changing data or bindings.
|
||||||
|
|
||||||
|
- **Corrected hydronic 3D circuits (Symcon 0.2.26):** Match the supplied mixed-circuit reference with separate lower supply/return headers, depth-separated crossings, inline flow-side pump and valve, upper temperature probes and a consumer symbol. Three-way mixers connect to the return; two-way valves and valve-free feed groups omit that bypass. Static pipework and live instruments share their layout. Pump faces distinguish running/stopped/unknown feedback, while bindings, native values and visual-only inversion remain unchanged. Correct outward winding on lying cylinder walls and both end caps, including mirrored models.
|
||||||
|
|
||||||
|
- **Compact trend popup:** Move custom time/resolution, display options, Y limits and CSV behind a settings button, keep a compact quick toolbar, and give the responsive chart most of the popup height. The settings overlay preserves chart size.
|
||||||
|
|
||||||
|
- **Explicit Symcon area names:** Selecting a room area preserves the room name. A dedicated button adopts only the actual leaf category name.
|
||||||
|
|
||||||
|
- **Incomplete Symcon utility sums:** Keep the sum of available meter values and prefix it with `Err:` in room/floor reports and power labels. Show `Err: –` when every source is unavailable and remove the marker automatically after recovery.
|
||||||
|
|
||||||
|
- **Symcon interface:** Underfloor heating moves into room climate. The linked room-status alias replaces the calculated comfort value. Announcement, speaker, quiet-time and Bluetooth-location controls are removed from the Symcon interface.
|
||||||
|
|
||||||
|
- **Symcon view title and form:** The configured visualization name replaces the NextFloor header text; the explanatory paragraph in the instance form is removed.
|
||||||
|
|
||||||
|
- **Room climate cards in floor views:** The all-floors overview hides the floating room climate cards. Opening a floor or room shows its enabled cards again.
|
||||||
|
|
||||||
|
- **Designer help popups:** Explanations are opened through compact information symbols instead of occupying the forms. Keyboard and touch users can open and dismiss the dialogs.
|
||||||
|
|
||||||
|
- **Compact room climate cards:** Floating cards show symbols and values without repeating the room name or labels. Unlinked metrics and entirely empty cards are hidden; linked unavailable sensors retain a dash.
|
||||||
|
|
||||||
|
- **Foldable wall menu:** The wall settings in the room sidebar can be collapsed using their heading.
|
||||||
|
|
||||||
|
- **IP-Symcon picker main category:** Hidden categories and their variables always remain visible. I/O, splitter, core, configurator, discovery and visualization instances are grouped under a collapsed virtual “System” folder, with searchable/selectable descendants and no changes to the actual Symcon object tree.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Compact trend icons and stable climate rows:** Shrink the chart glyph to 12 px with a frameless 18 px button. Floating room cards give icons their own aligned column so logged and unlogged readings retain the same value alignment and row height.
|
||||||
|
|
||||||
|
- **Symcon WebHook lifecycle:** Register already during Create, on kernel ready/start and after updates. Ongoing registration maintenance restores delayed route loss even after a previous success, while preserving the instance URL, token and project.
|
||||||
|
|
||||||
|
- **Symcon picker width and unlinking:** Long selected object names and paths are truncated within the form, with the full path in a tooltip. A dedicated clear button removes the binding directly and preserves other room-climate sensors.
|
||||||
|
|
||||||
|
- **IP-Symcon blind feedback and visual directions:** Numeric position feedback can be selected independently of inferred domains and is read using its native range. Blind and slat directions can be reversed separately in 3D only. Displayed readings, sliders, buttons, swipes and grouped commands keep their original values, including zero; feedback variables are never written.
|
||||||
|
|
||||||
|
- **IP-Symcon room humidity selection:** Manual room-climate fields accept numeric Integer/Float variables even without inferred classes or profiles. German “Feuchtigkeit” and subscript “CO₂” names are recognized, and parent category names no longer override measurement classes.
|
||||||
|
|
||||||
|
- **IP-Symcon dimmers and venetian blinds:** Numeric variables can be explicitly linked as dimmers or blind controls independently of inferred names. Native integer/float ranges and steps are respected in both directions. Separate blind-height and slat-position variables can be selected in the object tree and controlled independently in the room panel and quick menu; dimmer sliders stay available while off.
|
||||||
|
|
||||||
|
- **IP-Symcon KNX room temperatures:** Current Symcon presentation units are read alongside legacy profiles. Numeric temperature variables remain selectable and readable even when a parent name caused an actuator classification; saved mappings stay intact.
|
||||||
|
|
||||||
|
- **IP-Symcon “HTTP 200” / output-buffer overflow:** Large API responses use bounded response chunks instead of exceeding the kernel's 1 MiB output limit. The full variable/object tree, packs, plans, images and backups are reassembled without data loss, polling cannot overlap, and malformed responses receive a useful error message.
|
||||||
|
- **IP-Symcon “Hook not found”:** The module restores its internal WebHook after kernel startup and before opening the designer or tile, reports registration failures instead of showing “ready”, retries failed registrations and offers a “Repair WebHook” button without replacing the instance or its saved project.
|
||||||
|
- **IP-Symcon module discovery:** NextFloor is registered as a regular device instance with complete module metadata, so it is available in “Add instance”. The independent HTML-SDK tile remains enabled. A package check now rejects invalid module types, missing manifest fields and an incorrect installation directory layout before building.
|
||||||
|
- **IP-Symcon designer version check:** The frontend uses the Symcon library version rather than the Home Assistant integration version, preventing an incorrect Home Assistant restart prompt.
|
||||||
|
|
||||||
|
## [0.26.6]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Notes with a height and a photo** (#113): a note in the plan gets its own height above the floor (a pin under the ceiling, at the shutoff valve) and a photo, uploaded or as a URL, that shows when the note is tapped in the 3D view.
|
||||||
|
- **Temperature of technical devices** (thanks @tfischer84, #112): an inverter, a battery, a PC or any other electric device takes a temperature sensor under *Device temperature*. Its value shows on the device's pin in the 3D view; from 60 °C the pin is highlighted.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Outside has its own section in the editor** (thanks @eskahone, #83): the view for Outside and the devices its panel hides moved from the favourites into *🌳 Outside*, right below *Start view*.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Lamps light up in the editor plan as in 3D** (thanks @tfischer84, #111): a lamp whose light was found in its room by itself (not picked by hand), or that glows with one of its further lights, now lights up in the editor's floor plan too.
|
||||||
|
|
||||||
|
## [0.26.5]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Chimneys on the roof:** the roof tool places chimneys in four shapes (brick, round, wide with two flues, steel flue pipe with a rain cap), with their own width, depth and height above the roof. Drag them in the plan or in the 3D view.
|
||||||
|
- **Furniture colours per material** (thanks @eskahone, #82): in the editor under *Settings*, each material furniture is built from (body, wood, fabric, white, metal, dark) gets a colour for the whole house, pieces from the furniture builder and the packs included. A card can set its own with `furniture_colors`, or in the card editor under *Furniture colours of this card*.
|
||||||
|
- **Fold the energy card:** a small button in the corner of the glass energy card folds it down to its ring and the solar power, on phones and desktops; the browser remembers it.
|
||||||
|
- **Fine-tune a robot map by hand** (#109): after calibrating, arrows move the map by 10 cm, ⟲ ⟳ turn it by 1° and − + change its size by 1 %.
|
||||||
|
- **Weather forecast card** (thanks @eskahone, #84): in the house settings under *Weather forecast*, choose 3, 5 or 7 days and a top corner. A small card shows the weather of each day with its high and low and the rain.
|
||||||
|
- **More days on the "Today" card** (#84): *Days on the "Today" card* lists the appointments of up to seven days, each later day under its own heading.
|
||||||
|
|
||||||
|
- **Outside wall colour per floor** (thanks @LDSign, #110): in the solid wall view a floor can have an outside colour of its own (*Wall colour outside (this floor)* in the floor's settings), for a plinth or a garage that is not the colour of the storeys above.
|
||||||
|
|
||||||
|
- **Calibrate a robot map from its rooms** (#109): when the robot's map names its rooms, as the Dreame integration does, the dock has a button *Calibrate from the rooms*. It matches them to the rooms with the same names on the plan, so the robot no longer has to be parked 1.5 m from its dock and tapped. With three or more matching rooms a mirrored map is recognised by itself.
|
||||||
|
|
||||||
|
- **A view of its own for Outside** (thanks @eskahone, #83): under *Settings → Outside: hide devices* the button *Use this view for Outside* stores the camera of the editor's 3D preview. Opening Outside then flies to the garden instead of staying on the house view; closing it goes back.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **A tidier 3D view on phones:** the switches under the 3D view (walls, floors, roof, heat map, room names, weather) now sit behind one *☰ Switches* button that opens them as a menu above the bar. The house stays in view instead of a row of buttons across the bottom; a tap beside the menu closes it again.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Live cards cut off on phones:** a card near the edge of the view now slides back in, its thread still pointing to where it belongs.
|
||||||
|
- **Room colours on other floors** (thanks @LDSign, #110): a room with its own wall colour no longer paints the walls of the floors above or below that lie in the same spot of the plan.
|
||||||
|
|
||||||
|
- **Dreame robot maps** (thanks @lina-alexrt, #109): the map camera of the Dreame integration names the dock `charger_position` instead of `charger`. NextFloor now reads both, so the robot's real position can be calibrated and shown on the plan. Without a `path` on the camera no trail is drawn.
|
||||||
|
|
||||||
|
## [0.26.4]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Invert the rain sensor** (thanks @tfischer84, #107): a checkbox under the rain sensor in the settings for sensors that read off (or 0) when it rains.
|
||||||
|
- **Plan check: look first, ignore what you do not want** (#103): the line "devices not in the plan yet" opens a list of the devices behind it, with *Ignore* for each one (internal KNX devices, say) or for all. Ignored devices are no longer listed; one button brings them back.
|
||||||
|
- **Smart speakers link to a media player** (#104): a smart speaker, multiroom or hi-fi speaker picks the only free media player of its room by itself, so the quick menu offers volume, play and pause. Linking it by hand in the furniture form works as before.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Pieces lying on others can be selected** (thanks @tfischer84, #105): in the plan, what stands higher (a speaker on a desk, a lamp on a shelf) is drawn on top and is the one a click hits.
|
||||||
|
|
||||||
|
## [0.26.3]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **The editor is fast again with many entities** (thanks @alex1255, #101): the list *Outside: hide devices* in the editor's settings worked out the devices of the Outside panel once for every entity of Home Assistant, on every update. With a few thousand entities that kept the browser busy and made clicks and turning the view sluggish. It is now worked out once.
|
||||||
|
|
||||||
|
## [0.26.2]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Bluetooth locating (new, experimental):** find out which room a Bluetooth tag, watch or phone is in, learned by walking. Under *Settings → Bluetooth locating* in the editor you pick a tag, walk through each room with it for 30 seconds and record the room. NextFloor compares how strongly the Bluetooth scanners Home Assistant already has (ESPHome Bluetooth proxies, Shelly devices with Bluetooth scanning on, the server's adapter) hear the tag with those recordings. Every tag gets a sensor whose state is the room name, usable in automations and as a person's room sensor under *Presence*. Phones and watches work through Home Assistant's *Private BLE Device*. It needs at least two scanners, more is better. The recordings stay in the plan and are left out of shared plans.
|
||||||
|
- **See-through outdoor areas** (thanks @thelichtler-cloud, #95): every outdoor area has *Opacity (%)* in its form, from 100 (solid) down to 10, saved with the plan. A driveway or lawn above the cellar no longer hides it in the stacked view; the outline stays.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **A new README:** a shorter, picture-led front page with the three ideas in one minute, a gallery that links into the documentation, the features grouped by what you do, a two-minute install and a table of where to read what.
|
||||||
|
|
||||||
|
## [0.26.1]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **A documentation site**, in English and German, at [therealmrbk.github.io/NextFloor/docs](https://therealmrbk.github.io/NextFloor/docs/en/): 26 pages from the quick start to the full list of card options, with search (Ctrl+K), a dark and a light look, a table of contents, copyable code and a full-size view of every picture. The sources are Markdown in `docs/content`, built by `tools/docs`, and CI checks every link and anchor.
|
||||||
|
- The README points into the documentation and lists where to read what.
|
||||||
|
|
||||||
|
## [0.26.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Eight more languages for the core screens:** Danish, Finnish, Hungarian, Norwegian (Bokmål), Romanian, Slovak, Slovenian and Turkish for the 3D view, the room panel and the card's texts (about 150 each). Everything else still shows in English in those languages until someone adds it; the files are plain JSON in `frontend/lang/`, and a pull request that completes one is very welcome.
|
||||||
|
- **Card templates:** *Card templates* in the editor's settings set a dashboard card up once, with the card's own settings dialog and a name (say `kitchen_tablet`). On a dashboard card you then choose the template in its settings (or `template: kitchen_tablet`); the card's own options win. A change in the editor reaches every card that uses the template. *Reload screens with this template* and *Reload all screens* (also the action `nextfloor.reload_screens`, with an optional `template`) make the open tablets load their page again a few seconds apart, for example after an update.
|
||||||
|
- **3D print export:** a *3D print (STL)* button in the 3D view's settings saves the house as an STL file (walls, floors, furniture and outdoor areas of every floor) at 1:100, one metre becoming 10 mm. Windows, lights and the roof are not in it.
|
||||||
|
- **Right click goes one step back** (the view's settings, or the card option `right_back: true`, off by default): a short right click in the 3D view closes the room or goes from the floor back to the house, like a double tap on empty space; dragging with the right button still pans.
|
||||||
|
- **Two decoration packs, free:** *Winter & Christmas* (Christmas tree, Advent wreath, window star, candle arch, light-up reindeer, snowman, fairy lights) and *Halloween* (pumpkin, ghost, gravestone, witch's cauldron). The glowing parts follow a light or switch you link; to show a decoration only in its season, set *Only show while …* on the piece. That makes 43 furniture packs.
|
||||||
|
- **Tilt furniture:** a piece of furniture has *Tilt front/back* and *Tilt sideways* (degrees) in its form, for a leaning ladder, a tilted picture or a roof-sloped shelf. (Owned 3D models are not tilted.)
|
||||||
|
- **A card for chosen rooms:** the dashboard card's settings list the rooms (*Only these rooms*, YAML `rooms: [id, …]`); the card then shows just those rooms with their furniture, devices, doors and windows, and cannot leave them, for example for a tablet in the kitchen. Nothing ticked: the whole plan as before.
|
||||||
|
- **Gates in fences:** a fence's form has *+ Gate in the fence*: a gap in one side with gate posts and a garden gate, a double gate or a sliding gate. With a motor or switch (cover, switch, input_boolean, lock) and/or a contact the gate opens in 3D: garden and double gates swing inwards, a sliding gate runs along the fence. (Tapping the gate in 3D to switch it is not there yet.)
|
||||||
|
- **Sun arc and compass:** the editor's settings have *Sun arc and compass*: today's path of the sun as an arc over the plot, with a ring on the ground, the compass points (north in red) and a bead where the sun stands now. It uses your home's location in Home Assistant and follows the time-of-day slider.
|
||||||
|
- **Sloping free-standing walls:** a wall drawn with the wall tool can fall from one end to the other (*◢ Sloping* in its form, with a height at each end).
|
||||||
|
- **Overhang per roof side:** a roof section's form has *Overhang per side*: the eaves and both ends of the ridge each get their own overhang; unset sides stay automatic (none where the roof meets the house).
|
||||||
|
- **Floor plan only:** a *Floor plan only* button in the view's settings (and a card option `plain: true`) leaves the furniture out of the 3D view and draws walls, doors, windows and stairs; devices and their pins stay.
|
||||||
|
- **Import of an Apple room scan** (an iPhone or iPad with LiDAR, scanned with an app that exports the RoomPlan JSON): walls become the room, doors and windows sit on their walls with width and sill, and sofa, bed, table, chair and a few more objects become furniture. Choose the file under *Backup → Import*; the plan format page now also describes furniture, free walls, outdoor areas and devices for AI drawn plans.
|
||||||
|
- **A default room for people** (thanks @ToniB1984, #71): in the *Presence* section every person has a *Default room*. While they are home and no room sensor names a room, they stand there; it also works without any room sensor. Besides persons, any other entity that is on or home (an input_boolean helper, a device tracker, a binary sensor) can be added there for the same.
|
||||||
|
- **Hide devices in Outside** (thanks @eskahone, #83): the house settings have an *Outside: hide devices* list; the devices on it stay in the plan but no longer show in the Outside panel.
|
||||||
|
- **Reverse the direction of an awning or curtain** (thanks @Spawnkiller1, #100): a curtain, roller screen, awning or gate linked to a cover has a *Reverse the direction* checkbox, for the ones that move the opposite way in the plan than in reality.
|
||||||
|
|
||||||
|
## [0.25.4]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **People in their rooms** (tested thoroughly by @thelichtler-cloud, #71): the house settings have a *Presence* section again. Per `person`, pick a room sensor (ESPresense, Bermuda, a template sensor …) whose state names the room or its area; while the person is home and the sensor names a room, their picture (or initials) stands in that room, two people side by side, and moves along when they change rooms. The house view counts the people per floor. The feature existed but was switched off until it had been tested.
|
||||||
|
- **Size of the sound rings per speaker** (thanks @thelichtler-cloud, #94): a speaker or TV linked to a media player, and a media player marker, have a *Sound rings (%)* field. A small speaker such as an Echo Dot can get small rings, and 0 switches them off while the cover picture and the glow stay.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Pets stood still for good while anything else moved** (thanks @thelichtler-cloud for the exact diagnosis, #97): a resting pet only counted its rest down while the view was otherwise idle, so with energy flows, sound rings or weather running it walked once and then stayed put. Pets now keep their own clock and walk on every few seconds.
|
||||||
|
- **Store plugins on Home Assistant opened over plain http** (thanks @MarioFey1979, #78): a browser on `http://` has no built-in checksum function, so NextFloor imported the plugin straight from GitHub, which serves it as plain text, and the browser refused it (the Cameras plugin loaded nowhere and no camera appeared in the lists). The file is now checked with NextFloor's own SHA-256 and loaded from memory, as over https.
|
||||||
|
- **A plugin added as `/local/www/…` never loaded** (thanks @MarioFey1979, #78): Home Assistant serves its `www` folder as `/local/`, so a path with `www` in it pointed nowhere and the plugin's devices (cameras, say) were missing from every list. Such a path now loads from `/local/…`, and a new one is stored that way.
|
||||||
|
- **Zigzag in a straight interior wall** (thanks @Dragi2k, #65): one straight wall that runs past several rooms (bathroom, store room and hall along the bedroom, say) was drawn in pieces, and a piece next to an outer wall sat flush on one side while its neighbours sat centred, so the top of the wall jumped back and forth. The whole straight wall is now aligned as one.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **The editor and the card's settings load faster**: they now use the texts the main bundle already has instead of bringing their own copy, so the editor download is about 200 KB smaller and the card's settings shrink from 236 KB to 31 KB.
|
||||||
|
|
||||||
|
## [0.25.3]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Close gaps flattened a wall that changes its thickness** (thanks @Dragi2k for the plan, #65): when one room faced two walls of another room at different distances (a wall that is thicker over part of its length), all of them were pulled onto one line, so the step disappeared and the room changed its shape. Each room now keeps its step: the nearer wall closes its gap, the thicker part stays as drawn.
|
||||||
|
|
||||||
|
## [0.25.2]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Outside on a small tablet** (thanks @eskahone, #83): with Outside open, the Today card (calendar) lay over its panel and caught the taps, so Outside could not be closed again. The Today card now steps aside while a room or Outside is open, as it already did for rooms.
|
||||||
|
|
||||||
|
## [0.25.1]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Czech** (thanks @MiraK-2000, #76): the whole interface, the setup and the announcement action in Czech. That makes eleven languages.
|
||||||
|
- A room's temperature, humidity or CO₂ can be read from several sensors that are averaged: pick one in the room's climate settings, then add another one below it (#80).
|
||||||
|
- A favourite in the star menu can be limited to one floor (dropdown beside it in the house settings); it then shows only while that floor is open (#73).
|
||||||
|
- A lamp can be set to "switch only in the room panel" (no brightness, colour temperature or colour sliders), and the name given to a placed device now also shows in the room panel (#73).
|
||||||
|
- The house settings choose which facts the room panel shows in its header: sun hours, comfort, airing hint, fuse-box circuits (#73).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **A blind in front of the garage door** (thanks @eskahone, #85): a garage door linked to a cover drew a roller blind with its box in front of it, and the blind moved with the door. The cover now moves only the garage door itself.
|
||||||
|
- A wide window or sliding door with two blinds: a tap on its right half now opens the second blind; before, every tap went to the first one (#79).
|
||||||
|
- The plan check no longer offers devices as missing that a window, door or piece of furniture already picks up automatically through its area (a KNX blind, say) (#81).
|
||||||
|
- A plan with floors but no room no longer says "no floor plan yet": the 3D page now says that walls alone are not enough and that a room is drawn with *Rectangle* or *Free form*.
|
||||||
|
|
||||||
|
## [0.25.0]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Close gaps no longer puts corners into straight walls** (thanks @Dragi2k, #65): a wall that consists of several edges in a row (for example with a point in the middle of it) is now moved as one wall. Before, each part moved to its own neighbour, so a corner appeared in the wall that was not there before.
|
||||||
|
- **Clean view on a tablet** (thanks @Melles96, #75): the eye button that brings the controls back now sits at the top edge, so a tablet's taskbar or gesture bar can no longer cover it. *Esc* brings the controls back as well.
|
||||||
|
- **Phones held upright** (thanks @Duell10111, #70): the floor pictures step aside (the floor tabs above do their job), and the row of view switches along the bottom is one row that scrolls sideways, with a fade at its edge, instead of a column that spilled over the floor cards and the star.
|
||||||
|
- **Editor side bar covered** (thanks @marcelgschwendtner, #67): a row of tools wider than the plan no longer pushes the plan over the side bar; the row scrolls inside its pill.
|
||||||
|
- **Second blind on a door** (thanks @tfischer84, #79): a sliding door can now have a second blind for its right half, as a window can.
|
||||||
|
- **Clock on the card** (thanks @HA-Luz, #68): the clock now keeps ticking; it only moved when the view was reloaded.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **A glass wall that follows a curved wall as one pane** (thanks @Sugsss, #66): a curved wall is stored as a chain of short straight edges, and a glass wall could only be as wide as one of them, so glazing an arc meant one pane per edge with a mullion at every bend. A glass wall placed on a curved wall now runs on from edge to edge as a single pane, with jambs only at its two ends, and stays one pane when it is moved, lengthened or deleted. It is stored as an ordinary opening per edge, sharing a `front` id, so the plan, the printed plan, the sun hours and the walls themselves need no special case.
|
||||||
|
- **Glass walls without mullions**: a glass wall divided into panes of about 0.9 m by itself, with no way to say otherwise. Its form now has a *Panes* field: `0` gives one single pane across the whole wall, for the large glazing modern houses have, and any other number sets how many panes the mullions make. Left empty, a plan keeps exactly the spacing it had.
|
||||||
|
- **Sanitary pack VIGOUR derby** (thanks @huepfer13, #63): a wall-hung WC, a urinal, a 60 cm washbasin, a paper towel dispenser and a soap dispenser in the sizes of the VIGOUR derby series. That makes 41 furniture packs.
|
||||||
|
- **A robot vacuum's own trail on the plan** (thanks @Sugsss, #77): a `robot_vacuum` on the plan drove lanes the view invented inside the room it reports. When the robot's integration puts its map on a camera — `vacuum_position`, `charger` and `path` as attributes, which NarwalIntegration's map card does — the view shows the truth instead: the robot stands where it says it is, facing where it faces, and the floor keeps the pad it has really driven, while the dock is drawn where the robot reports it. The robot's grid is tied to the plan by two places known in both (`settings.vacuum_map`); `mirror` covers a map whose y axis runs along plan −z, which two places alone cannot tell apart from a turn. The camera is found by its attributes, so nothing has to be chosen; the calibration is one tap — select the robot's dock, let it drive away, tap it on the plan — and a plan without one keeps the lanes it had. Ten minutes after the robot docks the pad fades out — the timeline keeps a finished clean, the floor does not. The attribute names are the vacuum map card's, so the Xiaomi map extractors, the Roborock integration, NarwalIntegration and any other integration that publishes them fit — including units in millimetres, since the two places set the scale. The manual and the Anleitung describe the calibration.
|
||||||
|
|
||||||
|
## [0.24.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **NextFloor is in the official HACS store.** Install it by searching for *NextFloor* in HACS, no custom repository needed any more. If you installed it as a custom repository, nothing changes: your installation, plan and settings stay as they are and updates keep coming through HACS. A one-time notification in Home Assistant tells you so, in your language. The README, the manual and the Anleitung now describe the store install. Thank you to the HACS team for the review.
|
||||||
|
- **Choose what a double tap on a room switches** (thanks @mymoll, #62): settings → *Double tap on a room*: the lamps in the plan and every light of the room's area (as before), only the lamps in the plan, or nothing. Smart plugs that Home Assistant reports as lights (Hue plugs) are no longer switched by accident when they are not placed as a lamp. The card can override it with `room_double_tap: auto | area | plan | off`.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Shared plans and share views kept data of your home** (thanks to the HACS review): the copy for sharing removed the entity links but kept the settings as they were, so the map position of your home, favourites, own buttons and warnings, calendars, status sensors, the fuse box, announcement phrases and plugin paths travelled with the file, and so did picture rules of screens, light moods, own tap actions, room panel entity lists and Home Assistant areas. A shared copy now keeps only the look of the house (walls, roof, north, units, start view) plus its rooms, furniture and doors, and every field that names an entity, area or device of your Home Assistant is cleared on top of that, so a field added later cannot slip through. Your own plan and the normal backup are not changed. Files you shared earlier still hold the old data; share them again if that matters.
|
||||||
|
|
||||||
|
## [0.23.1]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Doors in a lowered room** (thanks @ayque): the door leaf, frame, threshold and handle now start on the room's own lower floor instead of the floor level, so there is no gap under the door any more; the edge lines of the opening follow too.
|
||||||
|
|
||||||
|
## [0.23.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Chinese setup and docs** (thanks @Sugsss): the config flow, the announcement action and the floor sensors in Simplified Chinese, plus a Chinese README and guide.
|
||||||
|
- **IFC import**: *Backup → Import* also takes an `.ifc` model from a BIM program (Revit, ArchiCAD, Allplan, Vectorworks …) – its storeys become floors at their elevation, its spaces rooms with their names and footprints, in the model's unit turned into metres. NextFloor draws the walls from the rooms.
|
||||||
|
- **Someone there?** The room panel says whether its motion, occupancy or presence sensors see someone now (*🚶 someone here*), or when they last did (*🚶 last seen 12 min ago*).
|
||||||
|
- **Power of sockets and switch plates**: a socket or switch whose button is a smart plug or a measuring switch now counts its power – in the room's power and the heat map *Power*, in the room panel, and in the power flow – from the power sensor on that button's device.
|
||||||
|
|
||||||
|
## [0.22.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **A room on its own level**: *Floor level* in the room form puts a room's floor lower or higher than its floor (a sunken entrance at −0.39 m, a split level). Its floor, the bottom of its walls, its doors and windows, the furniture and device pins in it move with it, the step to the rooms around it shows, and its living area counts from its own floor; the ceiling stays where it is. Thanks to @ayque ([#57](https://github.com/therealMRBK/NextFloor/issues/57)).
|
||||||
|
- **Simplified Chinese**: the whole interface in Simplified Chinese (中文), fetched when Home Assistant runs in Chinese. Thanks to @Sugsss ([#59](https://github.com/therealMRBK/NextFloor/pull/59)).
|
||||||
|
- **Rooms open to the floor above**: a room's *Ceiling height* may now be higher than its floor – a living room open up to the floor above or under the roof, a gallery. Its walls and windows rise with it, ceiling lights hang from the high ceiling, and the floor above stays open over it; that floor's editor shows the area hatched. Thanks to @Xtiger123X ([#55](https://github.com/therealMRBK/NextFloor/issues/55)).
|
||||||
|
- **Furniture studio in the editor**: *🛠️ Build your own piece* at the top of the furniture library builds a cabinet (any width, doors, drawers, handles, plinth or legs), a shelf, a lamp (floor, table, pendant, wall) or a device with a display, in centimetres and with a front view that follows every change. It goes straight into the plan and into the pack *Own furniture*; *Change in the studio* on a placed piece changes it again, everywhere it stands.
|
||||||
|
- **A meter per floor**: *Floor meter (power)* in the floor form takes a power sensor for that floor alone (a sub-meter, a flat). Its value shows on the floor label in the house view, and in the floor's own view the house card adds a row with it and its share of the house's use.
|
||||||
|
- **Plan check**: *✓ Check the plan* at the top of the editor's side panel lists, floor by floor, what is missing or off – rooms without a Home Assistant area (with the area of the same name to link in one tap), areas without a room, devices of a room not in the plan yet, rooms lying on top of each other, doors and windows off their wall, pins or furniture pointing to entities Home Assistant no longer knows, and **standby eaters** – devices that are off but still draw more than 3 W, with what that costs over a year. Each line has a button that shows the place or makes the fix; undo works as always.
|
||||||
|
- **Sensors from the plan**: NextFloor now adds sensors to Home Assistant – *Open windows and doors* and *Lights on*, for the whole house and for every floor (e.g. `sensor.nextfloor_ground_floor_open_windows_and_doors`). They count what the plan links (contacts, garage doors, device pins and lamps), list the entities that are open or on in their `entities` attribute, and follow the plan when floors are added or renamed – ready for automations ("nothing open when the alarm goes on") and voice.
|
||||||
|
- **Everything off, with undo**: the room panel has *⏻ Everything off* while two or more things are on – lights, switches, fans and media (playing speakers pause, TVs switch off). In a floor's view the bar on top has the same for the whole floor (*⏻* with the number of devices). For ten seconds *↶ Undo* brings everything back as it was, lights with their brightness and colour.
|
||||||
|
- **Living area**: every room shows its living area in the editor, counted like the German Wohnflächenverordnung – the floor inside the walls, in full from 2 m clear height, half between 1 and 2 m under a slope, nothing below. The floor form adds it up for the floor and the house. Garages, cellars and utility rooms are left out by their name; *Counts as living area* in the room form decides it by hand.
|
||||||
|
- **The plan on paper**: *🖨️ Print plan / PDF* in the floor form opens every floor as a clean black-on-white drawing at 1:100 – walls, doors with their swing, windows, garage doors, room names with their areas, the outer measurements and a metre bar – and a table of all areas at the end. The browser's print dialog prints it or saves it as PDF.
|
||||||
|
- **Quality by itself**: with the quality on *Auto*, the 3D view now watches how fast the tablet draws while something moves. When it keeps drawing too slowly it uses fewer pixels, a quarter step at a time, and the simple look when even that is not enough; with plenty of room left the pixels come back slowly. *Low* and *High* stay as chosen.
|
||||||
|
- **Plan versions**: *📌 Save this state …* under *Backup → Restore points* keeps the plan under a name ("before the renovation"); named states stay when the automatic restore points go, and can be deleted again. *Compare* on any point lists, floor by floor, what differs from the plan as it is now – rooms added, removed, renamed or reshaped (with the change in m²), doors and windows, furniture moved, devices placed or removed.
|
||||||
|
- **Easy to read**: *Aa Easy to read* in the view options (and `readable: true` for the card) gives stronger contrast and larger text – the bars and the room panel a size larger, the pins and floor labels in 3D in bigger letters, Home Assistant's quiet greys in the full text colour. Made for wall tablets across the room and for anyone who reads better that way.
|
||||||
|
- **First steps**: a new plan starts with a short tour of four cards – drawing rooms, doors and windows, furniture and devices, looking and checking – naming the buttons as the editor shows them; it can be skipped and does not come back. The round *?* in the corner of the plan (or the *?* key) opens the sheet of the editor's keys.
|
||||||
|
- **Power per room**: the heat map has a new mode *Power* that colours every room by what its devices draw now – the power sensors of its device pins and furniture added up, each counted once, the house's own meters left out (from blue at nothing over green and yellow to red at 3 kW). The room panel shows the same next to temperature and humidity (*⚡ 340 W*), and below it what the room used today and this month, from the statistics of those sensors, with the month's cost at the house's tariff (*⚡ today 0.46 kWh · month 3.34 kWh · 0.97 €*).
|
||||||
|
- **Notes in the plan**: a right-click (or long press) in the editor has *✎ Note here* – a note pinned to that spot ("bleed the radiator", "fuse 12: cooker"), with an optional day it is due. In 3D it stands as a yellow pin on its floor, orange from the day it is due, and a tap shows its whole text; the search finds notes by their text.
|
||||||
|
- **Sun in the rooms**: the heat map has a mode *Sun* that colours every room by the hours of sun it gets today through its outside windows – from the plan, its compass and the sun's path at the home's place (neighbours, trees and the roof's overhang are not counted). The room panel shows the same, with the directions its windows look to (*☀ 5.5 h of sun today (S, W)*); a tap on *☀ Sun over the year* adds a bar for every month.
|
||||||
|
- **Share a view**: *🔗 Share a view* under *Backup* saves the house as a small HTML file that opens in any browser without Home Assistant – it shows the plan in 3D through NextFloor's online demo, with the furniture packs it uses and without any devices or entities, like a template. To show the house to family or a planner.
|
||||||
|
- **Shade hint**: when the sun stands on a room's outside windows, the room is 24 °C or warmer and those windows' blinds are open, the room panel says so (*☀ Sun on 2 windows at 25.3 °C – lower the blinds?*) and *Lower* closes them in one tap.
|
||||||
|
- **Clean this room**: a room's form has *Cleaning* – the script or button that sends the robot vacuum there (the room cleaning of your robot's integration). The room panel then shows *🧹 Clean*.
|
||||||
|
- **Fuse box**: the house settings have a *Fuse box* – circuits by name ("F12 kitchen") with the rooms they feed. The room panel names a room's circuits (*🔌 F12*), and the search finds a circuit and opens its room.
|
||||||
|
- **Heating with the window open**: when one of a room's windows or doors stands open (its contact or tilt sensor) while the room's thermostat heats, the room panel says so (*🪟 1 window open while the heating runs*) and *Heating off* switches it off – or to its lowest temperature where it has no off.
|
||||||
|
- **Low batteries**: the batteries of the plan's devices – device pins, the contacts, locks and blinds of doors and windows, linked furniture – from the battery sensor on their device or their own battery attribute. Below 20 % they are in the plan check (*🪫 Battery low: kitchen window (12 %)*) and in their room's panel.
|
||||||
|
- **Lights on, nobody there**: when a room's motion, occupancy and presence sensors have seen nobody for ten minutes while lights are on, the room panel says so and *Lights off* switches them off.
|
||||||
|
- **Comfort score**: every room with climate sensors gets a score from 0 to 100 – the temperature in its band (20–23 °C, 22–26 °C in summer), humidity between 40 and 60 %, CO₂ up to 800 ppm, where one bad value always shows. As the heat map mode *Comfort* and in the room panel (*😊 Comfort 85*).
|
||||||
|
- **Open for …**: the room panel shows how long the room's windows and doors stand open (*🪟 open for 12 min*), the one open longest – handy for airing.
|
||||||
|
- **Measurements in the plan**: *📏 Measurements* in the editor's bar labels every room edge with its length; the switch is remembered on the browser.
|
||||||
|
- **Temperatures on the floor label**: a floor's label in the house view shows its coolest and warmest room (*19–22 °C*).
|
||||||
|
- **Door not locked at night**: *Warn at night when a door is not locked* in the settings names the plan's door locks that stand unlocked between 10 pm and 6 am, as a quiet note in the warning bar.
|
||||||
|
- **A power sensor for lamps**: lamps now have the *Power sensor* field too, like every other electric piece – for a light behind a measuring switch or a smart plug. Its watts show on the lamp's pin and count in the power flow and the room's power. Thanks to @Robsonator ([#56](https://github.com/therealMRBK/NextFloor/discussions/56)).
|
||||||
|
- **Stairs: the landing where you want it, and a mount height**: L and U stairs have *Risers up to the landing* – the flights can differ (8 up to the landing, 11 after it), the form says how high the landing lies. Stairs now have the *Mount height* like other furniture, so the upper flight can start on a landing. Thanks to @ayque ([#58](https://github.com/therealMRBK/NextFloor/issues/58)).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Floor pictures on a low card**: on a stage lower than 520 px (a dashboard card of 420 px) the floor pictures are smaller and stop above the star, the search and the buttons at the bottom left instead of sliding under them.
|
||||||
|
|
||||||
|
## [0.21.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Turned roof sections**: a roof section has a *Turn (°)* in its form and turns about its middle – a wing at an angle, a roof over a house that does not stand square to the plan. Its slopes, ridge, gables, solar fields and the ceilings under it follow. Thanks to @XingLii ([#53](https://github.com/therealMRBK/NextFloor/issues/53)).
|
||||||
|
- **DXF import**: *Backup → Import* also takes a `.dxf` drawing from a CAD program – closed polylines become rooms, lines and open polylines free walls, in the drawing's unit turned into metres.
|
||||||
|
- **A tap on an own warning**: opens the entity's details by default, or – as chosen per warning – switches the entity or jumps to its room. Thanks to @HA-Luz ([#52](https://github.com/therealMRBK/NextFloor/discussions/52)).
|
||||||
|
|
||||||
|
## [0.20.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Half-hips of any height**: a half-hip end of a roof section has a slider for how high up the gable its hip starts – from a large hip down low to only the tip.
|
||||||
|
- **Areas within a room**: a room can take more Home Assistant areas as its parts (*+ Area within the room*) – a reading corner, a shelf, the kitchenette of a living room – whose devices and sensors then belong to the room: in its panel, the climate, the lights and the warnings.
|
||||||
|
- **Pets where they really are**: a pet from the packs can follow a room sensor (Bermuda, ESPresense or any sensor naming a room, with a tag on its collar) – it appears in the room the sensor names and roams it there.
|
||||||
|
- **Light designer**: set a room's lamps as you like and press *+ Save mood* in its panel – the mood is kept with the plan, a tap on ✨ sets it again, and *→* carries it over to another room's lamps (the first lamp takes the first setting …).
|
||||||
|
- **Layers**: a floor can be marked as a *Layer* – all the trees, the decoration, the garden furniture – and the 3D view shows an eye for it at the top that shows or hides it with its pins, remembered on each device.
|
||||||
|
- **Lamps under the roof slope**: a ceiling lamp, fan or hanging item in an attic room gets *📐 Up to the roof slope* in its form, which hangs it from the underside of the roof right above it; its height stays adjustable.
|
||||||
|
- **Walls**: a split wall can have its own thickness on each part (a thick outer wall next to a thin glass front), and the room form shows a rectangular room's inside size from wall face to wall face.
|
||||||
|
- **Solar racks**: a field on a flat roof can stand on **east-west racks** – every second row turned, the pairs back to back, low and close – and a field on a pitched roof can stand on a rack that tilts it further than the roof (the upper edge on brackets).
|
||||||
|
- **L- and U-shaped sofas without a pack**: the built-in sofa has a *Shape* – straight, L (mirror it for the other side) or U – with a chaise at one or both ends; choosing one makes a small sofa large enough for it.
|
||||||
|
- **Own warnings**: *House → Own warnings* turns any entity into a line in the warning bar while it is in a state – "Water tank empty" from the robot vacuum, "Dishwasher done", "Salt low" below 20 (several states with commas, `<20` or `>80` for numbers), for the whole house or one room, with a colour of your choice for the stripe on the left. They look like the warning for a contact that stops answering. Thanks to @HA-Luz ([#52](https://github.com/therealMRBK/NextFloor/discussions/52)).
|
||||||
|
- **Which sensor set the alarm off**: when an alarm panel is triggered, the banner names the door, window or motion sensor that set it off (Alarmo tells it, otherwise the one that changed just before), and only its room pulses red instead of the whole house.
|
||||||
|
- **Outdoor areas like rooms**: a garden, terrace or pool can be linked to a Home Assistant area – its devices and sensors join the Outside panel, and a pin on the area opens it. A pool, pond or bed can show its water temperature and pump on that pin ("24.5 °C · pump on").
|
||||||
|
- **Robot mowers mow their lawn**: a robot mower or its dock from the *Garden 2* pack linked to a `lawn_mower` drives lanes over its lawn in 3D while it mows (around the beds, ponds and terraces on it), and drives home when it returns.
|
||||||
|
- **Wi-Fi map**: the map selector has a new **Wi-Fi** mode – every access point, router or mesh node from the packs linked to its device spreads its reach as a disc over the floor (through the walls), blue while it has room, amber when it is busy, red when it is down; its pin tells how many devices it carries, and the legend sums up the access points, their devices and which network devices of the plan are offline.
|
||||||
|
- **Room climate**: the heat map has a new **Mould** mode – the risk at each room's coldest wall from its temperature and humidity – and the temperature map uses a summer scale from May to September (rooms count as hot later). Rooms without a sensor of their own take the temperature and humidity of their thermostat. The room panel shows the room's temperature over the last 24 hours as a small curve, and both the panel and the *Values* map tell when to air a room (too much CO₂, too damp, risk of mould).
|
||||||
|
- **Underfloor heating**: a room can name its floor heating's thermostat, valve or switch, and its floor glows warm in 3D while it heats.
|
||||||
|
- **Heat pump**: a heat pump from the packs linked to any entity of its device shows a card with what it does (heating, hot water, cooling, defrosting), flow and return, the outside temperature, the power it draws, the heat it delivers and its COP as a ring – and with the energy flow on, its heat runs into the house in orange.
|
||||||
|
- **Your 3D printer, live**: link a 3D printer from the packs to any entity of your printer's device (Bambu Lab, OctoPrint, Moonraker/Klipper or PrusaLink), and while it prints a card floats above it with the model's picture, the progress, the time left and "done at", the layer, nozzle and bed temperatures and the filament colours of the AMS – and the print grows on the bed in 3D in the colour of its filament.
|
||||||
|
- **"Today" on the wall tablet**: choose calendars in *House → Calendars for "Today"*, and a card top right in the 3D view lists the day's appointments (all-day ones first, past ones dimmed) together with the waste bins collected today or tomorrow. A tap on its title folds it; the card option `today: false` hides it on a dashboard card.
|
||||||
|
- **Move a pin by hand**: when devices stand close together and their pins cover each other, *Move the pin* in the device's or furniture's form pushes the pin aside or up (in metres) while the device stays where it is.
|
||||||
|
- **Small tablets and phones**: a 🔍 zoom in the view options (card option `zoom`) brings the fitted views closer so the house looks larger on a small tablet; *🎥 Keep camera* (card option `keep_camera`) keeps the camera's side, height and distance when you switch floors; the room panel takes a little more of the width on small landscape tablets; and on a phone the editor's tools are one dropdown instead of a row of eleven buttons.
|
||||||
|
- **Favourites first**: the star menu can stand open from the start and a size larger (*★ Menu open* in the view options, card option `central_open`) for a wall tablet that mostly runs scenes; own buttons light up while their entity is on (the one they open or switch, or one you name); and the room panel lists the room's scenes at the top.
|
||||||
|
- **Speakers and TVs get their own quick menu**: a tap on one opens play/pause, back and next, the volume, its sources (inputs, apps, Spotify Connect …) and the stations and playlists of *House → Presets*. A preset can now be kept to some speakers – the kitchen radio station on the kitchen speaker only.
|
||||||
|
- **The car tells more**: a car plugged in at a wallbox nearby hangs on its charging cable in 3D (with the energy flow on), and the power runs along it while it charges. Its card says how far it is from home while it is away, when it leaves (a departure time it reports, or one set on the spot), and warns which doors, hatches, windows or the charge port stand open.
|
||||||
|
- **More of the energy picture**: the house card now shows the last seven days as bars (sun and use per day, from Home Assistant's long-term statistics), gas and water meters (*Energy → Balance*) appear in the energy bar and on the card, the card stays above the open floor in the floor views, and a home battery shows its charge on its own front – a bar that fills, green when full, yellow, red when nearly empty.
|
||||||
|
- **Venetian blinds, inside blinds, two blinds per window and Somfy "My"**: a window's blind can be a roller shutter outside (as before), a venetian blind whose slats turn in 3D with the cover's tilt, or a roller blind inside behind the glass. A wide window takes a second blind for its right half. A favourite position shows as **My** in the blind's quick menu – a blind with positions moves there, a Somfy RTS motor without feedback goes to its own My.
|
||||||
|
- **Every electric piece works alike**: any electric piece of furniture with a switch or power sensor shows its draw beside its state on its pin ("On · 1.2 kW"), and its status lights and display light up while it runs – a coffee machine, a compressor, a 3D printer – like the washer and dishwasher always did.
|
||||||
|
- **Lamps with several bulbs**: a lamp's form takes up to four more lights of the same fixture – a night light, an ambient ring, an uplight. While the main light is off, the lamp glows in 3D with the next light that is on, a little dimmer, and its pin says which one.
|
||||||
|
- **Picture frames with your own photos**: the new *Pictures & frames* pack (frames in four formats and six colours, canvas, poster, table frame, digital photo frame, picture ledge) shows a photo you upload in the frame's form, a picture address (/local/…) or the current picture of an image or camera entity – a photo of the day changes on the wall by itself. A white mat of any width, and the photo fills the frame or shows whole.
|
||||||
|
- **Show a piece only while …**: every piece of furniture can wait for a helper, a calendar, the sun or any sensor before it appears in 3D – the Christmas tree only while *input_boolean.christmas* is on, the paddling pool only in summer, a tent while a calendar says "camping". Several states separated by commas, or the other way round; the editor always shows the piece.
|
||||||
|
- **13 new furniture packs with 124 pieces**: *Season & decoration* (a Christmas tree whose fairy lights follow its light, Advent wreath, window star, candle arch, light-up reindeer, outdoor string lights, pumpkins, Easter tree, snowman, presents), *Smart home 2* (siren, Wi-Fi access points, smoke, CO, presence and water leak sensors, air quality monitor, dehumidifier, cube lamp, video doorbell), *Building services 2* (water tank, oil tank and oil boiler, water softener, buffer tank, cistern, ventilation unit, indoor heat pump), *Wellness* (sauna, barrel sauna, infrared cabin, hot tub, plunge pool, ice bath, steam shower, lounger – the heated ones link to a climate entity and show its temperature), *Garden 2* (water feature with light, pond with pump, robot mower and its dock, sandbox, beach chair, wood pile, bird house, raised bed, garden shower), *Kitchen 2* (bean-to-cup and espresso machines, kettle, toaster, stand mixer, cooking food processor, air fryer, microwave, wine fridge, sparkling water maker, slim dishwasher), *Vehicles 2* (motorbike, scooter, camper van, trailer, e-bike, cargo bike, quad, boat on a trailer, each in six colours), *Outdoor kitchen & terrace*, *Workshop 2*, *Japandi & Scandi*, *Loft & industrial*, *Indoor greenery* (plants that show their soil moisture) and *Music & studio*. The library has two new shelves for them: *Music & studio* and *Season & decoration*.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **A tap on a speaker or TV opens its quick menu** (play, skip, volume, sources, presets) instead of Home Assistant's details; *Details …* in the menu still opens them.
|
||||||
|
- **Scenes come first in the room panel**, above the lights.
|
||||||
|
- **Every electric piece shows its power beside its state** on its pin.
|
||||||
|
|
||||||
|
## [0.17.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Duplicate a floor**: the floor form copies the open floor on top of the house, with its rooms, walls, doors and windows, and on request its furniture, device pins and outdoor areas. The copy is unlinked from Home Assistant (areas, floor, furniture entities), so it can be set up for the new storey; energy devices stay on the original floor.
|
||||||
|
- **Move furniture to another floor**: the furniture form moves an item to the same spot on another floor.
|
||||||
|
- **Curved walls**: the ◠ Arc button on a wall of a room (in the room's wall list) or on a free wall bends it into an arc: type how far its middle bulges, outwards or into the room, and press *Bend*. A room sharing the wall bends along, doors and windows move with it and stay whole, and everything else (3D, solid walls, cut view, wall heights) treats the arc like any wall. Undo takes the arc back.
|
||||||
|
- **The house throws its shadow**: with north set, the house casts its shadow on the plot from the sun's real position, long in the morning and evening and paler behind clouds. It follows the "Sunlight and shadows" setting (formerly "Sunlight through the windows") and is off on the Tablet level.
|
||||||
|
- **Time of day**: switch on *☀ Time of day* in the view options (⚙), and a ☀ switch under the 3D view opens a slider over the hours of today, in Home Assistant's time zone. Sun patches, the shadow, the sky, the sun or moon and the *Auto* look follow the chosen hour once the slider is let go; tapping the switch again goes back to now.
|
||||||
|
- **Night sky and weather on the ground**: with the weather on, stars come out on a clear night; snow lies white around the house while it snows, and the ground turns dark and wet in the rain.
|
||||||
|
- **Stairs with a shape**: the new **Stairs** tool in the editor's toolbar draws a stair where you drag (it runs along the long side), and the stair from the library has a shape as well: straight, quarter turn with winders, L with a landing, half turn with winders, U with a landing or spiral, turning to the left or right, built solid, on stringers, on one spine or as floating steps, with or without risers and with a railing on either or both sides. The number of risers comes from the floor height and can be set by hand; the form shows rise, going and step measure and warns when the stair would be uncomfortable. The plan draws every tread with the walking line. Older stairs keep their look until you press **Set the shape**.
|
||||||
|
- **Stairs going down**: a stair can lead down from its floor, for example into a cellar that is not drawn. It opens its own floor and is drawn dashed in the plan.
|
||||||
|
- **Openings that fit the stair**: a shaped stair opens the floor above only where its steps lack 2.2 m of headroom, following its shape, instead of the whole rectangle. The stair's **Floor opening** choice opens the whole stair instead (an open stairwell) or nothing (a hatch or closed stairwell). Older stairs and the stairs of the *Stairs & railings* pack open their footprint as before.
|
||||||
|
- **LED strips that rise along a slope**: an LED strip's form has *Rise along its length (°)*, so a strip can climb up a sloped ceiling or a gable wall from the eaves towards the ridge, or follow a stair. Its low end stays at the mount height (or its high end under the ceiling), and its light and glow follow the strip. Thanks to @jan74berlin ([#36](https://github.com/therealMRBK/NextFloor/issues/36)).
|
||||||
|
- **Cable routes for the energy flow**: the energy tool's new *Cable routes* section draws where a cable really runs, from a solar field on the carport to the inverter and battery in the cellar, along walls and through ceilings across floors. The flow follows the route instead of an arc through the house, a battery's route is walked either way as it charges or discharges, and *Show as cable* draws it as a visible cable. Connections without a route keep their arc. Thanks to @galionsfigur ([#49](https://github.com/therealMRBK/NextFloor/issues/49)).
|
||||||
|
- **Outside, next to the floors**: a **🌳 Outside** chip beside the floors opens the house view with its own panel, like a room's, for every device outside the rooms: the irrigation valves, garden lights and sensors at a glance. A device on the roof or above a room that belongs outside (a weather station) gets *Belongs to Outside* in its form, so it no longer counts for the room below. The dashboard card shows the chip with its room buttons. Thanks to @jan74berlin ([#39](https://github.com/therealMRBK/NextFloor/issues/39)).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **New stairs are shaped stairs**: a stair placed from now on opens the floor above only where its steps lack headroom, so the opening is smaller than the whole rectangle as before. Choose *Floor opening → Over the whole stair* in its form for the old opening; stairs already in the plan keep theirs.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Cameras of an NVR are easy to find in the device list**: with the *Cameras* plugin, a camera that shares its device with the NVR's motion, person and vehicle sensors (ONVIF) now leads that device's row instead of hiding behind "more" after the sensors. Thanks to @toshi24 ([#50](https://github.com/therealMRBK/NextFloor/discussions/50)).
|
||||||
|
- **The clock top left no longer covers the sensors at the top**: with *Top left* chosen, the clock stands above the own sensors and the energy bar, which move down below it. Thanks to @toshi24 ([#35](https://github.com/therealMRBK/NextFloor/issues/35)).
|
||||||
|
- **Sensors a plugin handles can be placed**: the editor's device lists show every entity a plugin takes on, whatever its device class (a 3D printer's enum print-state sensor from Moonraker), and it leads its device's row. Entities no plugin handles are filtered as before. Thanks to @Luca-Bachini-Barr ([#51](https://github.com/therealMRBK/NextFloor/issues/51)).
|
||||||
|
|
||||||
|
## [0.16.1]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Wall buttons in the plan**: `event.*` entities (Homematic, Hue or Zigbee wall buttons and remotes) can be placed like any device. Their marker shows when the button was last pressed, and a tap opens its details. Thanks to @jan74berlin ([#35](https://github.com/therealMRBK/NextFloor/issues/35)).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **The room form warns when a room's ceiling lies above its floor height** (it can come from an import or a floor height lowered later): walls, windows and doors stop at the floor height, so a window above it was squeezed. Thanks to @jan74berlin ([#37](https://github.com/therealMRBK/NextFloor/issues/37)).
|
||||||
|
- **The switches at the bottom of the 3D view take less room**: on a smaller window, a zoomed browser or a dashboard column they are drawn smaller, and in the panel the new ▾ button folds them into one "Switches" button (remembered per device). Thanks to @jan74berlin ([#38](https://github.com/therealMRBK/NextFloor/issues/38)).
|
||||||
|
- **Garden devices set to "Always show" are visible from every view**: a device placed outside every room (irrigation valves, outdoor lights, a pool pump) whose marker is set to "Always show" now also shows in the house view ("All floors") and while another floor is opened, wherever its floor is drawn. Other markers keep to their floor as before. Thanks to @jan74berlin ([#33](https://github.com/therealMRBK/NextFloor/issues/33)).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Sweet Home 3D import no longer doubles walls**: a wall that runs along a room for only part of its length was taken over whole as a free wall, so it stood twice along that room (windows in it could face the wrong way). Now only the stretches beyond the rooms become free walls. Re-import the plan to get the clean walls. Thanks to @alexhass ([#40](https://github.com/therealMRBK/NextFloor/issues/40)).
|
||||||
|
- **The roof sits on its walls**: at rest in the house view it hovered 13 cm above them, and while zooming in the walls under it showed through. It now rests exactly on its height and keeps hiding what is below until it has mostly faded. Thanks to @LDSign ([#41](https://github.com/therealMRBK/NextFloor/issues/41)).
|
||||||
|
- **A roof section stays on the floor under it**: on a slope, a flat garage roof could ride with a higher floor beside it ("Pulled apart" lifted it off the garage). A section now belongs to the floor whose rooms lie under it. Thanks to @LDSign ([#42](https://github.com/therealMRBK/NextFloor/issues/42)).
|
||||||
|
- **Device names under markers are readable again**: the caption of a device with its own name ("Show the name under the marker in 3D") was dark text on a dark plate in some themes; it is now light text on the dark plate in every theme. Thanks to @jan74berlin ([#34](https://github.com/therealMRBK/NextFloor/issues/34)).
|
||||||
|
- **TVs that only report "on"** (Samsung, LG on live TV, and others) show their channel, input and logo on the screen in the plan, and appear in the live media card, instead of staying blank. Thanks to @Luca-Bachini-Barr ([#31](https://github.com/therealMRBK/NextFloor/issues/31)).
|
||||||
|
- **Heaters from furniture packs glow while they heat**, as the built-in radiator does: link a towel radiator (or any pack heater) to a thermostat and it glows orange while that thermostat heats; a thermostat or A/C unit with a display glows on its display. Thanks to @Luca-Bachini-Barr ([#32](https://github.com/therealMRBK/NextFloor/issues/32)).
|
||||||
|
|
||||||
|
## [0.16.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Furniture builder** ([open it](https://therealmrbk.github.io/NextFloor/builder/)): build your own furniture in the browser from boxes, cylinders, tapers and round bodies, in centimetres, beside a 3D view that draws it exactly as NextFloor does. Start from a template (cabinet, table, shelf, floor lamp, sofa), tap parts in 3D to select them, set colours that follow the look, lamps and screens. The builder checks the pack as NextFloor's import does, keeps it in the browser, saves it as a pack file, and shares it in the community store with one button.
|
||||||
|
- **Community furniture** (Extensions → Furniture packs): furniture others built with the builder and shared, checked by the store and by NextFloor's import, installed with one tap; a newer release of an installed pack shows as an update.
|
||||||
|
- **Announcements, free for everyone**: *"Dinner is ready!"* – and the room that should hear it, hears it.
|
||||||
|
- **In the room panel**, a **📢 Announcement** section for rooms with a speaker: tap a sentence or type your own. Own sentences under *Editor → Settings*.
|
||||||
|
- **Each room speaks through its own speaker**: chosen in the room's form, else one placed in the room, else a voice satellite, an Echo or a speaker of its area (never a TV or a speaker that is off). Voice satellites chime, Echos make a real announcement (Alexa Devices or Alexa Media Player), speakers that can (Sonos and others) lower their music and play on after, every other speaker uses Home Assistant's text-to-speech.
|
||||||
|
- **Quiet time per room** (a nursery from 20:00): announcements to several rooms leave it out, one meant only for it still gets through.
|
||||||
|
- **Every open NextFloor screen** (panel or card) shows the message big over the house, plays a soft chime and speaks it. A screen can get a name (⚙ → 📢) to be addressed alone, or stay silent. Card options `announcements` and `screen_name`.
|
||||||
|
- **The action `nextfloor.announce`** for automations (message, rooms, floor, screens, on_speakers, on_screens, tts_entity); it answers which speaker said it and which rooms were left out.
|
||||||
|
- **Own sensors at the top of the 3D view** (Editor → Settings, up to 12): the outside temperature, the alarm, the air quality – each with its name and value at the top left, in an opened room too; a tap opens its details. Card option `sensor_bar`.
|
||||||
|
- **Markers only while active**: a device's marker can show *Only while active* (a motion sensor while it detects, a contact while open, a device while on), and *Editor → Settings* can show every motion, occupancy and presence sensor only while it detects something.
|
||||||
|
- **Irrigation**: a lawn sprinkler (garden pack) linked to a valve or a switch throws water in arcs around it while it runs – six jets that turn slowly, as far as its *Reach of the water* (default 3 m). The irrigation valve box links to a valve too.
|
||||||
|
- **Valves** (`valve.*`, irrigation or the main water) work like switches everywhere: they show open or closed, count as on while open, and a tap opens or closes them.
|
||||||
|
- **How opaque the glass walls are**: a slider under ⚙ (per screen) and the card option `glass_walls` set the walls you look through into the rooms from almost invisible (0 %) to opaque (100 %); 20 % is the faint glass as before.
|
||||||
|
- **Fridge and freezer temperatures**: a fridge (also a pack's fridge or freezer) takes a thermometer for the fridge and one for the freezer compartment. Its pin shows both ("4.3 °C · −18.2 °C") and lights up as a warning above 8 °C in the fridge or −12 °C in the freezer; sensors in °F work too.
|
||||||
|
- **Lift-and-slide doors and sliding windows**: a new kind *Lift-and-slide door*, and every window can now open *sliding*. The pane at the hinge side slides in front of the fixed one when its contact reports open; with two leaves the two middle panes slide outwards, each on its own contact. The plan draws the panes on their two tracks.
|
||||||
|
- **Top-hung windows**: a window can open *top-hung* – its bottom swings out of the wall when its contact (or a tilt sensor) reports open.
|
||||||
|
- **Opening angle for doors**: every door has an *Opening angle* (default, 15° to 180°). With a contact the leaf opens that far as soon as it reports open; without one it stands that far open instead of half open. A door that is only assumed to stand open no longer glows as open. *Default* keeps everything as it was.
|
||||||
|
- **Warning for contacts that stop answering** (off by default, Editor → Settings): when a door or window contact has been unavailable for 10 minutes (an empty battery, out of radio reach), a note in the warning bar names it, because the window then looks shut in 3D although nobody knows. It is a quiet note: the room does not pulse and the view does not jump to it. A restart of Home Assistant does not warn.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **A glass wall placed from the toolbar is a glass wall**: dropping the *Glass wall* kind made a plain terrace window; it now keeps its look (doors still pick room or front door by their wall).
|
||||||
|
|
||||||
|
## 0.15.1
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Furniture with an own tap action keeps showing its state** by @Mika2108 ([#30](https://github.com/therealMRBK/NextFloor/pull/30)): an item linked to an entity (a meter with its power, a lamp, a washing machine, a light switch, a bin) keeps its usual marker, glow and energy flow when *Tapping the item* is set; only a tap on the item or its marker runs the action, a long press still opens the details. Example: the meter shows the grid power and a tap opens the energy dashboard. Items without a marker of their own still get the tap marker.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Plugin devices show their own icon in the editor** by @Mika2108 ([#28](https://github.com/therealMRBK/NextFloor/pull/28)): the plan, the device's form and the room's device list use the icon picked in the plan, else the plugin's Material Design icon, else the kind's symbol, as the 3D view does. Cameras no longer show as clocks.
|
||||||
|
- **A garage remote keeps its buttons in the room panel** by @Mika2108 ([#29](https://github.com/therealMRBK/NextFloor/pull/29)): a cover that only sends commands and never reports its position is no longer greyed out there, as in the quick menu since 0.14.0. *Open all* / *Close all* now leave out covers set to ask first, so a garage door no longer moves along without the confirmation, and they are hidden when no cover is left.
|
||||||
|
|
||||||
|
## [0.15.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Wall-mounted air conditioner** (#23): the *Utility & building services* pack has a split air conditioner, an indoor unit for the wall and an outdoor unit. The indoor unit links to a climate entity like the wall thermostat.
|
||||||
|
- **Switch devices only in the opened room** by @Mika2108 (#26): card option *Switch devices only in the opened room* (`tap_in_room: true`). In the house and floor views a tap opens the floor or room, even on a device or its marker, so a tap meant for a room no longer switches a lamp by accident. In the opened room nothing changes; a long press still opens the menu or details everywhere.
|
||||||
|
- **Choose the markers outside the opened room** by @Mika2108 (#26): card option `markers_outside` with one chip per kind (lights, blinds, heating, media, switches, fans, locks, contacts and detectors, sensors, furniture with an action, other). In the opened room the usual marker setting applies.
|
||||||
|
- **Own tap action for furniture** by @Mika2108 (#26): *Tapping the item* in the furniture form runs one of the own-button actions (open a path, an entity's details, a service, a browser_mod popup) instead of the usual tap, with a marker above the item.
|
||||||
|
|
||||||
|
- **Cameras and alarm panels as a plugin** (#27): the new *Cameras* plugin in the plugin store (*Extensions → Plugins → Open plugin store*) puts security cameras back into the plan. A camera shows its field of view as a wedge on the floor that stops at walls and turns red while a motion, person, vehicle or animal sensor of the same device detects something. A tap on the camera or its wedge opens Home Assistant's own live player in a small window in the corner (or HA's dialog). Mount, field of view, reach, tilt and detections are set in the camera's form, and a handle in the plan turns it. Alarm panels get a shield with their state, and a tap opens the keypad.
|
||||||
|
- **More for plugins**: a device extension can now add fields to the device's form (`settings`), draw a wedge on the floor (`floorWedge`), handle taps and open a small window in the corner of the 3D view (`tap`, `showWindow`), and name further entities to watch (`watch`). Devices a plugin takes on are drawn in the editor's plan too. See [docs/plugins.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/plugins.md).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Hide any entity of a room** (#24): in a room's device list, the further entities of a device (behind *more*) can now be hidden from the room and have their state hidden too, like the device's main entity.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Editing doors and windows froze the plan** (#25): when the form of a selected item could not be drawn, the whole editor stopped updating. A new door only showed up after a second click, the door form did not open and a dragged door stayed put. The plan now keeps working, and the side bar shows what went wrong (with a way back) so it can be reported.
|
||||||
|
- An entity whose name is a number (set in YAML) no longer breaks the entity lists in the editor.
|
||||||
|
|
||||||
|
## [0.14.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Less rain and snow on a card** by @Mika2108 (#18): the card option *Amount of rain and snow* (`weather_density`, 15 to 100 %) thins out rain, hail and snow, so a wall tablet still shows the house in heavy weather. Clouds, fog and lightning stay as the weather says.
|
||||||
|
- **New furniture library**: the built-in models and all packs stand together, sorted by what they are (seating, beds, kitchen, bathroom, TV & audio, pets …) instead of pack by pack. Every card shows a picture, the size and where it comes from; a model in several sizes (a base unit from 30 to 120 cm, a bed from 90 to 200) is one card with size chips. With a room selected the library shows what fits it (*Fits Kitchen*, its main kind open and on top), *Show all rooms* lifts that. Chips narrow it to ⚡ linkable, 💡 lit or 🌳 outdoor items, ★ favourites and recently used items stand at the top. Pictures are drawn once and kept in the browser; weak tablets show the cards without pictures.
|
||||||
|
- **Resizing keeps what should stay**: a pack item made wider, deeper or taller keeps its legs, arms, plates and handles at their real size and distance from the edge, and only the middle grows: a sofa stretched to 3.6 m keeps its 20 cm arms, a taller table gets longer legs under the same plate. Pack authors can switch it off per item with `"stretch": true`.
|
||||||
|
- **Smart locks on doors**: a door takes a smart lock (door form → *Smart lock*). A tap on the door in 3D locks or unlocks it, always asking first; while it stands unlocked, the door's free edge glows in the accent colour.
|
||||||
|
- **Light switches and sockets**: the *Smart home & tech* pack has light switches and sockets with 1 to 4 buttons in one frame, and an outdoor socket with a lid. Each button gets its own entity; it glows while that is on, a light switch in its light's colour, a socket green and brighter the more it draws. A tap switches it; with several buttons a small menu asks which. The same entity may sit on several switches.
|
||||||
|
- **Curtains, screens, awnings and gates that move**: furniture with moving parts follows a cover entity (*Moves with* in its form): awnings in three widths reach out over the terrace, a curtain gathers to both sides, an inside roller blind and the roll-down projection screen roll up, a sliding gate slides away, the motorised curtain gathers to its side. They travel at motor speed, and a tap opens the cover's menu (up, stop, down). Pack authors mark parts with `move` (`down`, `left`, `right`, `out`, `slide_left`, `slide_right`) and the item with `cover`.
|
||||||
|
- **Look *Auto***: the day look while the sun is up, neon after sunset (from `sun.sun`), in the panel and as card option `theme: auto`.
|
||||||
|
- **Clock in the view**: a large clock with the date in a corner of the 3D view (panel: 🕒 next to the markers; card option `clock: top_left | top_right | bottom_left | bottom_right`).
|
||||||
|
- **3D lock** for wall tablets: the 🔒 button next to the eye stops turning, zooming and panning by hand on this device; taps, long presses and swipes on devices still work. Cards can hide the button (`lock_button: false`).
|
||||||
|
- **Own background**: *Editor → Settings → Own background* puts the house in front of a colour or a picture of your own (`/local/…` or https), dimmed as much as you like, instead of the look's sky.
|
||||||
|
- **Light wells**: an outer window whose sill lies below the ground (a cellar window) gets a concrete light well with a grating at ground level by itself; *Light well in front* in the window's form switches it off.
|
||||||
|
- **Different end at each end of a roof**: gable, hip and half-hip sections can take their own shape at the start and at the end of the ridge (a hip at one end, an upright gable at the other).
|
||||||
|
- **Sill and board per window**: automatic, none, inside only or outside only.
|
||||||
|
- **Import from Sweet Home 3D**: *Backup → Import* also takes a `.sh3d` file (Sweet Home 3D 5.3 and newer): levels become floors, rooms become rooms (moved onto the walls' centre lines, so neighbours share one wall), doors and windows go into the walls they stand in, and walls without a room become free walls. Its furniture stays behind; before taking it over NextFloor says what it found.
|
||||||
|
- **Household**: waste bins (residual, organic, paper, recycling; 120 and 240 l) and mailboxes in the garden pack. A bin shows its next pickup from a sensor (days, a date, "today"/"tomorrow" or Waste Collection Schedule) and glows the day before and on the day; a mailbox glows while there is post; a plant (the built-in one and the pack plants) shows its soil moisture and glows when it is thirsty. Their pins come up while something is due. Washers, dryers and dishwashers show the time they have left when their device has a remaining-time sensor.
|
||||||
|
- **Pets that roam**: a cat, a dog and a rabbit in the pets pack walk around their room in 3D, round the furniture, and sit for a while between their walks. While they all sit nothing is drawn, and on the *Tablet* level they rest with the other decorations.
|
||||||
|
- **Day curve on the house card**: the energy card over the roof shows the last 24 hours, solar as a filled curve and consumption as a line, worked out from the history of exactly the sensors the card reads (refreshed every 10 minutes).
|
||||||
|
- **Feet and inches**: *Editor → Settings → Show lengths in* shows the lengths and areas of the plan, the forms and the wall view in feet and inches (to the half inch) and square feet; inputs stay in metres.
|
||||||
|
- **Valleys for L- and T-shaped houses**: a wing roof that butts against the eave of a bigger roof at a right angle now runs into that roof's slope like a cross gable, so the two roofs meet in valleys instead of the wing ending in a gable wall at the eave.
|
||||||
|
- **Sloped walls**: a third wall view next to *Tall walls* and *Cut*: the walls are cut on a slope, half height on the side facing the camera and full height at the back, like a doll's house; the slope turns with the camera.
|
||||||
|
- **Solid walls with colours**: the new switch *Solid* shows opaque walls in real colours instead of glass. *Editor → Settings* sets the wall colour outside and inside, and each room can have its own inside colour. In an open room the walls in front of the camera are lowered. Works in the dashboard card too (`solid_walls: true`, `walls: slope`).
|
||||||
|
- **Seven more languages**: NextFloor now speaks French (thanks to Mika2108), Spanish, Italian, Dutch, Polish, Portuguese and Swedish besides German and English, following the language of your Home Assistant user, furniture names included. Each language loads only when it is needed.
|
||||||
|
- **Plan format and AI import**: [docs/plan-format.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/plan-format.md) describes the plan file, with a ready prompt that lets an AI turn a picture of your floor plan into a plan for *Backup → Import*.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **A garage door follows its contact when the cover cannot tell** by @Mika2108 (#21): a remote without feedback (`assumed_state`, always `unknown`) no longer shows the door open while its contact says closed.
|
||||||
|
- **Quick menu for covers without feedback** by @Mika2108 (#21): such a cover keeps its open, close and stop buttons; the centre button stays off while the state is unknown.
|
||||||
|
- **Entities that a plugin gives a kind** by @Mika2108 (#21) are offered in the editor's area lists, *without area* and *other areas*.
|
||||||
|
- **Walking keys by their place on the keyboard** by @Mika2108 (#21): W A S D walk under the same fingers on QWERTY, QWERTZ and AZERTY (Z Q S D).
|
||||||
|
- **Doors and windows of an imported plan can be selected again**: a plan written by hand or by an AI without ids (or with repeated ones) gets an id for every room, door, window, piece of furniture and outdoor area, so they can be picked and changed (e.g. into a garage door). Missing sizes, the plan version and the settings are filled in instead of refusing the file.
|
||||||
|
|
||||||
|
## [0.13.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Import furniture packs again**: *Extensions → Furniture packs* imports your own packs as files or as JSON pasted straight into a text field, lists the packs you imported and removes them. The format is in [docs/packs.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/packs.md).
|
||||||
|
- **Climate devices in furniture packs** by @carmona15 (#14): a pack item marked `climate: true` (a wall-mounted A/C, a heat pump) links to a Home Assistant climate entity, found automatically in the room's area like a radiator's thermostat, and can have a power sensor. How to mark an item: [docs/packs.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/packs.md).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Wall thermostat** (#17) now links to a climate entity instead of asking for a TV. Climate items from packs are also offered under *Show as furniture* for a climate entity, next to the radiator.
|
||||||
|
|
||||||
|
## [0.12.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Plugin store**: *Extensions → Plugins → Open plugin store* lists reviewed community plugins from [NextFloor-Plugins](https://github.com/therealMRBK/NextFloor-Plugins) and installs them with one click. Authors submit a plugin with a pull request, which is reviewed by hand. Every entry points at a file pinned to one commit and carries its SHA-256; NextFloor checks the hash before the plugin runs and offers newer versions as an update.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Solar fields on a mansard roof** (#13) now lie on the roof instead of sinking into it. Each side offers two roof faces to choose from: the steep lower slope and the flatter upper slope above the break. Fields placed on a mansard before keep their spot on the lower slope; move a field that should sit higher onto the upper face.
|
||||||
|
|
||||||
|
## [0.11.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Ceiling height per room** (#12): a room can have its own ceiling height (room form → *Ceiling height*), e.g. a 2.12 m bathroom on a 4 m floor. Ceiling lights, ceiling fans, LED strips under the ceiling, ceiling devices and placed ceiling lights hang from it, and the room's walls are that high (a wall shared with a room without its own ceiling keeps the floor height; between two rooms with their own ceilings it takes the higher one). Heights set by hand on a wall still win.
|
||||||
|
- **Ceiling height at one spot** (#12): ceiling lights and other hanging items have a *Ceiling here* field for a sloping ceiling or a single high spot (a light at 4 m).
|
||||||
|
- **Ceiling fans** (#11): a new *Ceiling fan* in the lights section. Link its light kit like any lamp and its fan entity (found on the light's device or in the room). In 3D the blades turn as fast as the fan runs; the fan's pin shows its speed, a tap switches it, swiping up or down changes the speed and a long press opens the quick menu. Its height is how far it hangs from the ceiling, so a fan on a downrod hangs lower.
|
||||||
|
|
||||||
|
## [0.10.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Plugins:** NextFloor can now be extended without changing its code. A plugin is a JavaScript file you add on the **Extensions** page (from `/config/www`, HACS or HTTPS). Plugins can add their own light animations (they show up in a light's effect settings), show entities NextFloor does not know (a robot vacuum, a lawn mower) with their own icon and text, and add small cards to a room's panel. A broken plugin never breaks the house view; its errors show next to it on the Extensions page. How to write one: [docs/plugins.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/plugins.md).
|
||||||
|
- **Sub-meters (advanced energy mode)** by @TheRealSimon42 (#8): a meter can hang off another meter, e.g. one sub-meter per flat behind the house's main meter; solar plants and batteries can hang off a sub-meter, and the house card shows the common rest. Off by default.
|
||||||
|
- **Configurable light effects** by @TazztheMonster (#9): map a light's effect names to rainbow, pulse, flicker or a static look, or turn animations off for one lamp without changing anything in Home Assistant.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The README credits NeonPlan 3D by Mastershort, the project NextFloor started from.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Light effects are no longer all shown as a rainbow: plans without a mapping and unknown effects keep the colour and brightness from Home Assistant, pulse and flicker keep the base colour, and lights that are off or unavailable do not animate.
|
||||||
|
|
||||||
|
## [0.9.1]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **A pool cuts itself out of the areas around it:** a pool drawn inside a terrace (or a lawn) now leaves a hole there on its own, so the terrace runs around the pool and not over it. Any other area can still do the same with **Cut out of surrounding areas**. The order the areas were drawn in no longer matters: before, only areas drawn *before* the cutting one got the hole. The hole carries no light of the area around it either. Asked for in discussion #6.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **A folded room panel no longer hangs in the picture:** on a wide window or in landscape the folded panel stayed at the top right and covered the view. It now drops to the bottom edge, above the switches (and to the bottom of the card), so it is out of the way. Reported in discussion #3.
|
||||||
|
|
||||||
|
## [0.9.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Sloping walls:** every wall in the room's wall list has a new button **Sloping**. It gives the wall a height at its start and another at its end, and the top runs straight between them: a lean-to room, a wall that follows a sloping ceiling, clerestory windows high on the tall side. Both heights may be above the floor height. Windows and doors on such a wall stay under its top, so a window near the high end can be taller than one near the low end. A corner added to a sloping wall splits the slope at the height it has there. Asked for in discussion #4.
|
||||||
|
- **Outdoor areas can have any shape:** the selected lawn, terrace, pool, fence and so on now shows a **+** in the middle of every edge, like a room. Drag it to add a corner; the corner buttons in the form (**1 ×**, **2 ×** …) take a corner away again. Asked for in discussion #6.
|
||||||
|
- **Flat roofs can be reshaped the same way:** the **+** on the edges of a flat or parapet roof turns the rectangle into a free shape, and its corners can be added, dragged and removed. (Pitched roofs stay rectangles over their ridge; L- and T-shaped houses are still built from several sections.) Asked for in discussion #6.
|
||||||
|
- **Turn a solar field on a flat roof:** the solar form has **Rotation** with quick **↺ 90°** and **↻ 90°** buttons. The field turns about its middle, its modules and frames turn with it, and it is kept on the roof. Asked for in discussion #5.
|
||||||
|
- **Fold the room panel away:** the room panel has a new **−** button next to the ✕. It hides the devices and keeps the room in view, which is what you want on a phone; a tap on the arrow opens it again. The panel starts open for every room. Asked for in discussion #3.
|
||||||
|
|
||||||
|
## [0.8.3]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Real map showed "Access blocked" (403) instead of the map:** Home Assistant asks the browser to send no Referer to other sites, and OpenStreetMap's tile servers refuse requests without one. NextFloor now loads every map tile with an explicit referrer policy (only your Home Assistant's address, not the full page address), in the plan and in 3D. The tiles are kept in the browser while the map is on.
|
||||||
|
|
||||||
|
## [0.8.2]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Room buttons on the dashboard card:** a new switch *Room buttons* in the card editor puts a row of buttons, one per room, along the top of the card. A tap opens the room (switching to its floor first when needed), a second tap closes it. In the house view the rooms of all floors show, grouped by floor. Asked for in discussion #2.
|
||||||
|
|
||||||
|
## [0.8.1]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Blue light frame around a TV that is on, even with *Glow behind the TV* at 0:** the glow frame that fades out around the screen of a TV that is on ignored the setting. With 0 it is now gone completely, and values below 100 make it weaker. (0.8.0 only removed the bright outline of the TV's body.)
|
||||||
|
|
||||||
|
## [0.8.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Twelve new furniture packs with 417 models, all built from scratch:** Living room (70), Kitchen (66), Bedroom (41), Bathroom (38), Garden & patio (33), Home cinema & hi-fi (36), Smart home & tech (30), Office & gaming (26), Pets (24), Kids' room (18), Utility & building services (18) and Fitness (17).
|
||||||
|
- **Existing packs grew:** Vehicles now has cars of every class, vans, a pickup, a campervan, a motorhome and a caravan (34); Stairs & railings has floating and winder stairs and a corner railing (13); Architecture & fit-out has steel columns, ceiling beams, niches, a light cove, a window seat and more (21); Garage & workshop has a tool wall, shelving, a mower, wallbox holder and more (22).
|
||||||
|
- Every model is visible in the demo's showcase.
|
||||||
|
- **Compass control:** under Settings a dial shows where north lies, with **Swap north ↔ south** (180°) and quarter turns. Turning the compass never moves the drawing, the roof faces or the solar fields; sunlight, wind and the compass directions of roof faces follow it. So a plan drawn the wrong way round is fixed in one tap, without placing the solar fields again.
|
||||||
|
- **Real map under the plan (off by default):** a dimmed OpenStreetMap (or your own tile address) lies under the plan in the editor and under the house in 3D, turned by the compass. Start at Home Assistant's location, set the visibility and detail level, and move the map with arrow buttons until the house sits on its plot. Nothing is loaded while it is off.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **TV without glow still had a blue frame:** with *Glow behind the TV* set to 0 the TV's own bright blue outline stayed. It now takes the plain furniture outline, so a TV set to no glow is not lit at all.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Guide rewritten:** `docs/manual.md` and `docs/anleitung.md` are new, organised by what you do (install, draw, furnish, connect, use) instead of by feature list, and match the current features.
|
||||||
|
- **Demo of the development version:** the online demo now has a second page under `/dev/` that always shows the latest state of the `dev` branch (marked "DEV"); the normal demo keeps showing the released version.
|
||||||
|
- **Cameras are gone:** the camera wall, flying into a camera's live picture, the motion trail, detection pins, the field-of-view wedge and the camera device kind were removed. Placed `camera.*` entities are no longer shown.
|
||||||
|
- **Extensions tab:** it now only holds the upload of your own 3D models and the project links. The feature list and the furniture pack list are gone, and so is the hint box in the furniture library.
|
||||||
|
|
||||||
|
## [0.7.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Three new free furniture packs**, all built from scratch in NextFloor's own part format:
|
||||||
|
- **Treppen & Geländer (10):** straight, L-shaped, U-shaped, spiral and space-saving staircases, landing, outdoor steps and railings in metal, glass and wood. The staircases cut their opening into the floor above.
|
||||||
|
- **Architektur & Ausbau (10):** round and square columns, ceiling beam, chimney breast, glass partition, sliding wall, raised platform, half wall, shelving divider and pilaster.
|
||||||
|
- **Garage & Werkstatt (9):** workbench, tool cabinet and trolley, storage rack, stack of tyres, drill press, compressor, bicycle stand and paint cabinet.
|
||||||
|
- All three appear in the demo's model showcase.
|
||||||
|
|
||||||
|
## [0.6.3]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Model showcase in the online demo:** every model of NextFloor, the basic ones and those of all packs, can be looked at live in a room of their own, ten at a time, with the names listed in the order they stand. Open the demo and choose "All models" (bottom right), or use `?showcase`.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Languages:** NextFloor now comes in German and English only; Home Assistant instances in any other language show English. The 14 further language files were removed.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- The online demo no longer fails to deploy on a release (it deploys when the demo changes on `main`).
|
||||||
|
- A formatting slip in the Python code that made the checks fail.
|
||||||
|
|
||||||
|
## [0.6.2]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Glow behind the TV:** a TV, monitor or TV board has a new setting "Glow behind the TV (%)" in the editor. 0 switches the blue ambilight off (handy with LED strips on the TV), 100 is the usual strength, up to 150.
|
||||||
|
|
||||||
|
## [0.6.1]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Camera wall:** the pictures are now tiles of a sensible size (at most 560 px wide, as many per row as fit, centred) instead of one picture stretched over the whole screen when there is a single camera. Tiles lift slightly when you point at them.
|
||||||
|
|
||||||
|
## [0.6.0]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Upload 3D models in the app:** on the Extensions page every item that takes a model has an "Add a model" button. Choose the `.glb`, turn the front towards you, tick the body paint (guessed for you), pick the level of detail, check the preview and store it on your Home Assistant. NextFloor does the work of `tools/prepare-model.mjs` itself: it merges the parts, makes the model lighter, writes plain glTF without textures and marks the paint. Files that are compressed (Draco, Meshopt) are refused with a hint. You can replace and remove models there too.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The editor, the side panel, the dashboard card and parts of the 3D view were reorganised internally into smaller, tested modules. Behaviour and look are unchanged.
|
||||||
|
- The README is shorter, with a feature table and a screenshot gallery.
|
||||||
|
|
||||||
|
## [0.5.0]
|
||||||
|
|
||||||
|
- **Twelve Tesla models:** Model 3 (to 2023, 2024 and Performance), Model S and S Plaid, Model X, Model Y (2020 to 2024, 2025 Standard, Premium and Performance, and Model Y L) and the Cybertruck are separate items, each ready for its own 3D model, in the paint colours Tesla offers. Without a model file on your Home Assistant they show the simple shape.
|
||||||
|
- `tools/prepare-model.mjs` can leave out see-through fade layers and light beams (`--drop-materials`) and finds the front of the car by its charge port (`--rear`).
|
||||||
|
|
||||||
|
## [0.4.0]
|
||||||
|
|
||||||
|
- **Paint colours for vehicles:** every Tesla has the paint colours Tesla offers (Pearl White, Solid Black, Deep Blue, Ultra Red, Quicksilver and more; the Cybertruck its steel and wraps). Pick the colour in the editor, also for a car in a parking spot.
|
||||||
|
- **Your own 3D models:** put a model you own (`.glb`) on your Home Assistant and NextFloor draws it in place of the simple shape, with the paint colour you picked. The Tesla Model Y is the first item that takes one. NextFloor ships no model files; see [docs/models.md](docs/models.md) for how to prepare and add yours.
|
||||||
|
|
||||||
|
## [0.3.0]
|
||||||
|
|
||||||
|
- **IKEA sizes:** a new furniture pack with 20 popular pieces in their published outer dimensions: bookcases, cube shelves, beds, chests of drawers, wardrobes, sofas, an armchair, a desk, tables and more. They are our own simple models of the sizes, not IKEA's designs or files.
|
||||||
|
|
||||||
|
## [0.2.0]
|
||||||
|
|
||||||
|
- **Tesla models in 3D:** Model S, 3, X, Y, Cybertruck, Roadster and Semi in the vehicles pack, with their real outer dimensions. Put one on a parking spot and the car card follows it.
|
||||||
|
- **Smooth bodies for packs:** a new part shape, `sweep`, stretches a rounded skin over cross sections along the length. The Teslas are built with it; the format is described in [docs/packs.md](docs/packs.md).
|
||||||
|
|
||||||
|
## [0.1.0]
|
||||||
|
|
||||||
|
The first release.
|
||||||
|
|
||||||
|
- Draw your home right inside Home Assistant: floors, rooms, walls, doors, windows, stairs, outdoor areas and a roof, with a 3D view next to the plan.
|
||||||
|
- Control it in 3D: lamps glow in their colours, blinds and doors follow their state, a room panel lists everything of the area.
|
||||||
|
- Ten built-in furniture packs (about 100 items) plus your own packs as plain JSON ([docs/packs.md](docs/packs.md)).
|
||||||
|
- Six live features: weather at the house, energy flow, TV screens, sound, car and cameras (camera wall, detection pins, motion trail).
|
||||||
|
- A dashboard card with a visual editor, three looks, kiosk mode for wall tablets, warnings for smoke, gas, water and open windows in the rain.
|
||||||
|
- English and German in the box, fourteen more languages fetched on demand.
|
||||||
|
- Free and open source, no account, no cloud: NextFloor does not talk to the internet.
|
||||||
|
|
||||||
|
[Unreleased]: https://github.com/therealMRBK/NextFloor/compare/v0.26.6...main
|
||||||
|
[0.26.6]: https://github.com/therealMRBK/NextFloor/compare/v0.26.5...v0.26.6
|
||||||
|
[0.26.5]: https://github.com/therealMRBK/NextFloor/compare/v0.26.4...v0.26.5
|
||||||
|
[0.25.4]: https://github.com/therealMRBK/NextFloor/compare/v0.25.3...v0.25.4
|
||||||
|
[0.25.3]: https://github.com/therealMRBK/NextFloor/compare/v0.25.2...v0.25.3
|
||||||
|
[0.25.2]: https://github.com/therealMRBK/NextFloor/compare/v0.25.1...v0.25.2
|
||||||
|
[0.25.1]: https://github.com/therealMRBK/NextFloor/compare/v0.25.0...v0.25.1
|
||||||
|
[0.25.0]: https://github.com/therealMRBK/NextFloor/compare/v0.24.0...v0.25.0
|
||||||
|
[0.24.0]: https://github.com/therealMRBK/NextFloor/compare/v0.23.1...v0.24.0
|
||||||
|
[0.23.1]: https://github.com/therealMRBK/NextFloor/compare/v0.23.0...v0.23.1
|
||||||
|
[0.23.0]: https://github.com/therealMRBK/NextFloor/compare/v0.22.0...v0.23.0
|
||||||
|
[0.22.0]: https://github.com/therealMRBK/NextFloor/compare/v0.21.0...v0.22.0
|
||||||
|
[0.21.0]: https://github.com/therealMRBK/NextFloor/compare/v0.20.0...v0.21.0
|
||||||
|
[0.20.0]: https://github.com/therealMRBK/NextFloor/compare/v0.17.0...v0.20.0
|
||||||
|
[0.17.0]: https://github.com/therealMRBK/NextFloor/compare/v0.16.1...v0.17.0
|
||||||
|
[0.16.1]: https://github.com/therealMRBK/NextFloor/compare/v0.16.0...v0.16.1
|
||||||
|
[0.16.0]: https://github.com/therealMRBK/NextFloor/compare/v0.15.0...v0.16.0
|
||||||
|
[0.15.0]: https://github.com/therealMRBK/NextFloor/compare/v0.14.0...v0.15.0
|
||||||
|
[0.14.0]: https://github.com/therealMRBK/NextFloor/compare/v0.13.0...v0.14.0
|
||||||
|
[0.13.0]: https://github.com/therealMRBK/NextFloor/compare/v0.12.0...v0.13.0
|
||||||
|
[0.12.0]: https://github.com/therealMRBK/NextFloor/compare/v0.11.0...v0.12.0
|
||||||
|
[0.11.0]: https://github.com/therealMRBK/NextFloor/compare/v0.10.0...v0.11.0
|
||||||
|
[0.10.0]: https://github.com/therealMRBK/NextFloor/compare/v0.9.1...v0.10.0
|
||||||
|
[0.9.1]: https://github.com/therealMRBK/NextFloor/compare/v0.9.0...v0.9.1
|
||||||
|
[0.9.0]: https://github.com/therealMRBK/NextFloor/compare/v0.8.3...v0.9.0
|
||||||
|
[0.8.3]: https://github.com/therealMRBK/NextFloor/compare/v0.8.2...v0.8.3
|
||||||
|
[0.8.2]: https://github.com/therealMRBK/NextFloor/compare/v0.8.1...v0.8.2
|
||||||
|
[0.8.1]: https://github.com/therealMRBK/NextFloor/compare/v0.8.0...v0.8.1
|
||||||
|
[0.8.0]: https://github.com/therealMRBK/NextFloor/compare/v0.7.0...v0.8.0
|
||||||
|
[0.7.0]: https://github.com/therealMRBK/NextFloor/compare/v0.6.3...v0.7.0
|
||||||
|
[0.6.3]: https://github.com/therealMRBK/NextFloor/compare/v0.6.2...v0.6.3
|
||||||
|
[0.6.2]: https://github.com/therealMRBK/NextFloor/compare/v0.6.1...v0.6.2
|
||||||
|
[0.6.1]: https://github.com/therealMRBK/NextFloor/compare/v0.6.0...v0.6.1
|
||||||
|
[0.6.0]: https://github.com/therealMRBK/NextFloor/compare/v0.5.0...v0.6.0
|
||||||
|
[0.5.0]: https://github.com/therealMRBK/NextFloor/compare/v0.4.0...v0.5.0
|
||||||
|
[0.4.0]: https://github.com/therealMRBK/NextFloor/compare/v0.3.0...v0.4.0
|
||||||
|
[0.3.0]: https://github.com/therealMRBK/NextFloor/compare/v0.2.0...v0.3.0
|
||||||
|
[0.2.0]: https://github.com/therealMRBK/NextFloor/compare/v0.1.0...v0.2.0
|
||||||
|
[0.1.0]: https://github.com/therealMRBK/NextFloor/releases/tag/v0.1.0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# NextFloor – notes for Claude
|
||||||
|
|
||||||
|
- Spec and phase plan: `docs/plan.md` (German). Talk to the user in German; code, identifiers and comments in English.
|
||||||
|
- Domain `nextfloor`, repo `therealMRBK/NextFloor`, minimum Home Assistant 2025.1.
|
||||||
|
- Frontend lives in `frontend/` (Lit 3 + TypeScript, no decorators; three.js in a separate lazily loaded bundle).
|
||||||
|
Bundles are committed to `custom_components/nextfloor/frontend/`, and CI fails when they are stale, so run `npm run build` before committing.
|
||||||
|
- Checks: `npm test`, `npm run typecheck`, `npm run build` (size budgets), `ruff check` / `ruff format`.
|
||||||
|
HA integration tests only run in the Linux CI.
|
||||||
|
- Visual self-check: `npm run screenshot` renders `preview/index.html` (invented demo data, mock hass) into `preview/screenshots/`.
|
||||||
|
- Deploy to the user's HA: `npm run deploy` (target in the untracked `deploy.local.json`). Never commit real floor plans, IPs or device names.
|
||||||
|
- **Branches:** work happens on `dev` (CI runs there too). `main` is what HACS users receive, so it only moves about once a day or after a bigger batch of features: merge `dev` into `main` (fast-forward), bump `manifest.json`, write the changelog section and cut the GitHub release then, not per commit. Never push single small changes straight to `main`.
|
||||||
|
- After each phase: commit and push to `dev`, check CI, and tell the user in German what is new and how to test it. Only a release (merge to `main`) is published.
|
||||||
|
|
||||||
|
- **Changelog:** every change that reaches users goes into `CHANGELOG.md` in the same commit, under the version it ships in, sorted into **Added**, **Changed** and **Fixed** (bump `manifest.json` when a release is cut). Say what the user notices, not what the code did. Use the same text for the GitHub release notes.
|
||||||
|
- **README is shown inside HACS too, which does not resolve relative paths:** keep every image and link in `README.md` absolute (`raw.githubusercontent.com/therealMRBK/NextFloor/main/…` for images, `github.com/therealMRBK/NextFloor/blob/main/…` for files).
|
||||||
|
|
||||||
|
- **Token economy:** when a symbol or string is known, use a targeted `grep -rn` (graphify only for "where does X live" questions); `graphify update .` after code changes. No broad exploration when the scope is clear: read only the lines you need. While developing, run only the affected test file (`npx tsx --test src/<file>.test.ts`); the full gate (typecheck, tests, build, ruff, HA tests) runs once before each commit, with its output filtered to pass/fail lines. Do not spawn subagents for work that fits in a few commands. Do not take screenshots unless the change is visual and the check can answer a concrete question.
|
||||||
|
- **Quality rules (as in good open-source projects):** commits as Conventional Commits (`feat:`, `fix:`, `docs:`, `build:`, `test:`); larger features on a branch with a pull request, small fixes straight to `dev`; version numbers as in `CONTRIBUTING.md` → *Version numbers* (decided with the user 2026-11-08): `0.MINOR.PATCH.HOTFIX` — a fourth part only for a fix of a reported bug on top of the current release (hotfix branch from the tag, PR into `main`, then merge `main` back into `dev`), patch for the usual collected release, minor for a topic release or anything users must act on; the gate also runs `mypy custom_components/nextfloor`; `main` is protected (CI must be green, no force-push); a release is cut only with the user's go and needs tag = manifest version (the release workflow checks it and attaches `nextfloor.zip`); security reports go through the private advisory, never a public issue.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Code of conduct
|
||||||
|
|
||||||
|
This project follows the [Contributor Covenant 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
|
||||||
|
|
||||||
|
In short: be kind and patient, assume good faith, keep criticism about the work and not the person, and no harassment of any kind. Issues, pull requests and discussions that break this can be edited, locked or removed.
|
||||||
|
|
||||||
|
To report a problem, contact the maintainer through a private message on GitHub (@therealMRBK). Reports are handled confidentially.
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
Thanks for looking. NextFloor is free and open source out of conviction, and every contribution keeps it that way: whatever you add belongs to everyone, under the MIT licence. It is a small project and is built with AI assistance (see the README), so contributions are welcome the same way: written by you, with a tool, or both. Please just say in the pull request if an AI wrote a good part of it, and make sure you have understood and run what you send.
|
||||||
|
|
||||||
|
## Before a pull request
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
npm run typecheck
|
||||||
|
npm test
|
||||||
|
npm run build # the built bundles are committed; CI fails when they are stale
|
||||||
|
cd ..
|
||||||
|
ruff check . && ruff format --check .
|
||||||
|
pytest -q # the Home Assistant side
|
||||||
|
```
|
||||||
|
|
||||||
|
- Keep a change small and say what it is for. A screenshot helps for anything you can see (`npm run screenshot` renders the preview).
|
||||||
|
- New furniture or vehicles: the built-in packs come from `tools/build_packs.py`; the format of your own packs is in [docs/packs.md](docs/packs.md). Please only use sizes and shapes you made yourself, never another project's files or a brand's own 3D models.
|
||||||
|
- 3D models you own (for example a car): they stay on your own Home Assistant and never go into this repository, see [docs/models.md](docs/models.md).
|
||||||
|
|
||||||
|
## How changes flow
|
||||||
|
|
||||||
|
- Work happens on `dev`; `main` is what HACS users receive and only moves with a release. Larger features are developed on a branch and merged through a pull request, so CI runs before the merge.
|
||||||
|
- Commit messages: a short summary in the style `feat: …`, `fix: …`, `docs: …`, `build: …`, `test: …` (Conventional Commits), with the issue number when there is one.
|
||||||
|
- Every user-visible change goes into `CHANGELOG.md` under **Unreleased** in the same commit.
|
||||||
|
- A release: `manifest.json` version, the changelog section, a tag `v<version>` on `main` and a GitHub release with the changelog text. The release workflow then attaches `nextfloor.zip`, which HACS installs.
|
||||||
|
|
||||||
|
## Version numbers
|
||||||
|
|
||||||
|
Versions read `0.MINOR.PATCH` or `0.MINOR.PATCH.HOTFIX`. The number tells what an update brings:
|
||||||
|
|
||||||
|
| Part | Example | When |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| **Hotfix** | 0.26.5 → 0.26.5.1 | A bug reported in an issue that breaks something in the current release. The hotfix holds that fix only, nothing else from `dev`. |
|
||||||
|
| **Patch** | 0.26.5.x → 0.26.6 | The usual release: fixes and small additions collected on `dev`, nothing anyone has to change. The hotfix part is dropped again. |
|
||||||
|
| **Minor** | 0.26.x → 0.27.0 | A planned release around one big topic, or anything users have to act on: a storage migration, a removed or renamed option, changed card YAML. Rule of thumb: if someone has to do or relearn something after the update, it is a minor. |
|
||||||
|
| **Major** | 1.0.0 | Once, when storage format, card YAML and plugin API are stable and documented, and no known bug loses data or crashes. |
|
||||||
|
|
||||||
|
- A wish or an improvement is never a hotfix, even when it comes as an issue: it ships with the next patch.
|
||||||
|
- **A hotfix:** branch `hotfix/<version>` from the release tag, the fix and its changelog section `## [<version>]`, a pull request into `main`, then the release. Afterwards `main` is merged into `dev`, so the next release is a fast-forward again. The fix lands on `dev` as well and is part of the next patch.
|
||||||
|
- Before a minor, a pre-release `0.27.0-beta.1` can go out on GitHub for those who switched on betas.
|
||||||
|
- Counted on their own, not with the app version: the plugin API (`apiVersion`) only climbs when plugins would break, and a change of the stored plan format always means a minor.
|
||||||
|
- Home Assistant and HACS accept and sort the four-part numbers (0.26.5 < 0.26.5.1 < 0.26.5.10 < 0.26.6).
|
||||||
|
- Security problems go through [private reporting](SECURITY.md), not a public issue.
|
||||||
|
|
||||||
|
## Translations
|
||||||
|
|
||||||
|
German and English are built in. Further languages are files in `frontend/lang/<code>.json` (keys as in `frontend/src/i18n.ts`), fetched only when Home Assistant runs in that language; a key a file lacks shows in English. They are community-maintained: new texts land in German and English first. Pack items and paint colours are named under `pack:<pack>:<item>`, `packname:<pack>` and `color:<colour>`. The integration's own texts are in `custom_components/nextfloor/translations/`.
|
||||||
|
|
||||||
|
## Ideas and bugs
|
||||||
|
|
||||||
|
[Discussions](https://github.com/therealMRBK/NextFloor/discussions) for ideas and questions, [issues](https://github.com/therealMRBK/NextFloor/issues/new/choose) for bugs. For a bug, the version, your Home Assistant version and what you expected help most.
|
||||||
File renamed without changes.
@@ -1,701 +1,230 @@
|
|||||||
# NextFloor für IP-Symcon 9.0
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/custom_components/nextfloor/brand/icon@2x.png" width="110" alt="NextFloor logo"></p>
|
||||||
|
|
||||||
Dieses Verzeichnis ist eine vollständige IP-Symcon-Bibliothek. NextFloor lässt sich
|
<h1 align="center">NextFloor</h1>
|
||||||
über den Designer und die Kachel-Visualisierung verwenden:
|
|
||||||
|
|
||||||
- **Designer:** Die Instanzkonfiguration öffnet den Designer per geschütztem WebHook in einem
|
<p align="center"><b>Draw your home once. Watch it live in 3D.</b><br>
|
||||||
Browser-Tab. Auch die installierte Pro-Konsole öffnet diesen Link im Standardbrowser.
|
Lamps light their room, blinds move, doors open, the TV shows what plays, rain falls outside.<br>
|
||||||
IPSViews interner Designer-Tab ist speziell in Symcons Konsole integriert; die öffentliche
|
A free 3D floor plan for Home Assistant. No cloud, no account. Made for wall tablets.</p>
|
||||||
Modulschnittstelle von Symcon 9.0 bietet diesen Tab nicht für eigene Web-Oberflächen an.
|
|
||||||
- **Kachel-Visualisierung:** Die NextFloor-Instanz kann direkt in der Tile-Visualisierung als
|
|
||||||
HTML-SDK-Kachel abgelegt werden. Sie zeigt die 3D-Ansicht samt Bedienung.
|
|
||||||
|
|
||||||
## Für Module Control bereitstellen
|
<p align="center">
|
||||||
|
<a href="https://my.home-assistant.io/redirect/hacs_repository/?owner=therealMRBK&repository=NextFloor&category=integration"><img src="https://my.home-assistant.io/badges/hacs_repository.svg" alt="Open in HACS"></a>
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/docs/en/"><img src="https://img.shields.io/badge/%F0%9F%93%9A-Documentation-1f6feb?style=for-the-badge" alt="Documentation"></a>
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/"><img src="https://img.shields.io/badge/%E2%96%B6-Online%20demo-00b4d8?style=for-the-badge" alt="Online demo"></a>
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/preview/index.html?showcase&lang=en"><img src="https://img.shields.io/badge/%E2%96%A6-All%20models-8a63d2?style=for-the-badge" alt="All models"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
In **Kerninstanzen → Modules** wird dieses Repository verwendet:
|
<p align="center">
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/releases"><img src="https://img.shields.io/github/v/release/therealMRBK/NextFloor?style=flat-square" alt="Release"></a>
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/actions"><img src="https://img.shields.io/github/actions/workflow/status/therealMRBK/NextFloor/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>
|
||||||
|
<a href="https://hacs.xyz"><img src="https://img.shields.io/badge/HACS-official%20store-41bdf5?style=flat-square" alt="In the official HACS store"></a>
|
||||||
|
<a href="#-free-forever"><img src="https://img.shields.io/badge/price-free%20forever-2ea44f?style=flat-square" alt="Free forever"></a>
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/blob/main/LICENSE"><img src="https://img.shields.io/badge/licence-MIT-blue?style=flat-square" alt="MIT"></a>
|
||||||
|
<a href="#-made-with-ai"><img src="https://img.shields.io/badge/built%20with-AI%20assistance-8a63d2?style=flat-square" alt="Built with AI"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
`https://git.portal.se-cloud.de/Hannes/NextFloor.git`
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/demo-live.gif" alt="NextFloor in a real house: the house turns, the ground floor opens, a room panel with its lights and blinds slides in" width="900"></p>
|
||||||
|
|
||||||
Im Zahnrad des Eintrags den Branch **`symcon`** wählen und auf Aktualisierungen prüfen.
|
<p align="center">
|
||||||
`main` enthält die Quellen für die Entwicklung, `symcon` die installierbare Bibliothek.
|
<a href="https://therealmrbk.github.io/NextFloor/docs/en/"><b>📚 Documentation</b></a> ·
|
||||||
Nach der Aktualisierung auf **0.4.3 / Build 41** die Konsole neu laden. Unter
|
<a href="https://therealmrbk.github.io/NextFloor/docs/en/quickstart/">Quick start</a> ·
|
||||||
**Instanz hinzufügen → Hersteller NextFloor** erscheint **„NextFloor Designer und 3D-Kachel“**.
|
<a href="https://therealmrbk.github.io/NextFloor/docs/en/cards/">Card options</a> ·
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/docs/en/plugins/">Plugins</a> ·
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/docs/en/faq/">FAQ</a> ·
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/docs/de/">Deutsch</a> ·
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/blob/main/README.zh-CN.md">简体中文</a> ·
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/tutorial/">🎬 Setup video</a> ·
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/blob/main/ROADMAP.md">Roadmap</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
## Hierarchie und Etagen
|
---
|
||||||
|
|
||||||
Im Editor oben **Hierarchie** öffnen. Bei einem bisherigen Plan dort auf
|
## ✨ In one minute
|
||||||
**Hierarchie einrichten** klicken.
|
|
||||||
Bestehende Stockwerke werden einem ersten Ort, einer Niederlassung und einem Gebäude
|
|
||||||
zugeordnet; ihre IDs, Geometrie, Datenpunkte und Benutzerfreigaben bleiben erhalten.
|
|
||||||
Im separaten Dialog Orte, Niederlassungen und Gebäude benennen und weitere anlegen.
|
|
||||||
Die drei Listen zeigen jeweils die Einträge der ausgewählten übergeordneten Ebene.
|
|
||||||
Beispiel: **Urbach / Zentrale / RAS19 / EG / IT**.
|
|
||||||
|
|
||||||
- Oben im Editor unter **Ansicht** einen **Ort**, eine **Niederlassung** oder ein
|
| | | |
|
||||||
**Gebäude** auswählen. Ort und Niederlassung zeigen eine Gesamtübersicht ihrer
|
|---|---|---|
|
||||||
untergeordneten Pläne, auch in der 3D-Hälfte. Die Knöpfe darunter öffnen die nächste
|
| **✏️ Draw it** | **💡 Watch it live** | **🧩 Make it yours** |
|
||||||
Ebene. Eine Gesamtübersicht wählt keine Etage automatisch zur Bearbeitung aus.
|
| Floors, rooms, curved walls, doors, windows, stairs, roofs and gardens, with the 3D model growing beside the plan. Or import a room scan, a CAD drawing or a Sweet Home 3D plan. | Tap a lamp and the real light switches. Blinds travel, doors open, the TV shows the running app, solar power flows along your real cables, rain falls. | 43 free furniture packs with about 800 models, a furniture studio and a browser builder, a dashboard card with templates, and a reviewed plugin store. |
|
||||||
Bei Auswahl eines Gebäudes erscheinen darunter nur seine Etagen und sein Außenplan.
|
|
||||||
**+ Etage** legt ein Stockwerk in genau diesem Gebäude an, mit eigener Höhenfolge.
|
|
||||||
Ein Gebäudewechsel ändert keine Zuordnung und erzeugt keine Etage. Ein leeres
|
|
||||||
Gebäude bleibt auch nach einem Neuladen der Daten ausgewählt und leer.
|
|
||||||
- Die rechte Leiste bleibt für Etagen-, Raum- und Geräteeigenschaften verfügbar.
|
|
||||||
Im ausgewählten Raum über **Bereich (Symcon)** die vorhandene Bereichskategorie
|
|
||||||
verknüpfen; Räume derselben Kategorie werden in der Raumliste zusammengefasst.
|
|
||||||
Der Raum gehört über seine Etage zum Gebäude. Die Auswahl verändert weder den
|
|
||||||
Symcon-Objektbaum noch den Raumnamen; dafür gibt es **Bereichsnamen übernehmen**.
|
|
||||||
- Zum Verschieben zuerst die betreffende Etage öffnen und oben
|
|
||||||
**Ausgewählte Etage verschieben…** wählen. Der Dialog nennt ihren vollständigen
|
|
||||||
Pfad. Erst die Schaltfläche **Etage „…“ verschieben** übernimmt das Zielgebäude;
|
|
||||||
eine bloße Zielauswahl oder das Schließen des Dialogs ändert nichts.
|
|
||||||
- Für einen einzelnen Raum rechts **Raum verschieben…** öffnen. Zielgebäude und
|
|
||||||
Zieletage auswählen, bei Bedarf die vorgeschlagene Position X/Z anpassen und erst
|
|
||||||
dann **Raum „…“ verschieben** drücken. Raumdaten, Datenpunktverknüpfungen,
|
|
||||||
Türen/Fenster, enthaltene Möbel, platzierte Geräte und Notizen ziehen mit um.
|
|
||||||
Der Dialog meldet Konflikte mit bereits vorhandenen Gerätekennungen. Vorhandene
|
|
||||||
Benutzerfreigaben folgen eindeutig identifizierbaren Räumen und Geräten, auch
|
|
||||||
beim Rückgängigmachen; Ansicht bleibt Ansicht und Bedienung bleibt Bedienung.
|
|
||||||
- Pro **Ort**, **Niederlassung** und **Gebäude** im Hierarchiedialog über
|
|
||||||
**Außenplan anlegen** einen eigenen Außenplan erstellen und im Editor wie
|
|
||||||
gewohnt Außenflächen, Geräte und Möbel platzieren.
|
|
||||||
Jeder Außenplan gehört direkt zur jeweiligen Ebene und erscheint dort auch in
|
|
||||||
der linken Navigation mit einer passenden Vorschau. Das Außen-Popup berücksichtigt
|
|
||||||
auch bisher auf untergeordneten Gebäudestockwerken platzierte Außen-Datenpunkte,
|
|
||||||
ohne Werte benachbarter Niederlassungen oder Gebäude einzumischen.
|
|
||||||
- Die linke Navigation in Designer und Kachel folgt der Topologie. Die kleinen
|
|
||||||
Pfadknöpfe führen zu den übergeordneten Ebenen zurück. Die Vorschaubilder zeigen
|
|
||||||
nur die Stockwerke des Eintrags; Raumvorschauen werden auf den Raum zugeschnitten.
|
|
||||||
- Die obere Raumleiste erscheint erst bei Auswahl eines Stockwerks. In Orts-,
|
|
||||||
Niederlassungs-, Gebäude- und Außenansichten bleibt sie ausgeblendet.
|
|
||||||
- Die rechte Verbrauchsübersicht folgt derselben Auswahl: **Ort → Niederlassungen**,
|
|
||||||
**Niederlassung → Gebäude**, **Gebäude → Stockwerke**, **Stockwerk → Bereiche**.
|
|
||||||
Oben stehen jeweils die Leistungen und Verbräuche der ausgewählten Gruppe.
|
|
||||||
Einträge öffnen die entsprechende Ebene. Eigene Außenpläne mit Zählern erscheinen
|
|
||||||
separat unter ihrem jeweiligen Besitzer. Alle fünf Medien, eigene Stockwerkszähler,
|
|
||||||
getrennte Verbrauchszeiträume, Trendknöpfe und „Err:“-Teilsummen bleiben erhalten.
|
|
||||||
- Stockwerksstapel und automatische Dächer werden pro Gebäude dargestellt.
|
|
||||||
Planpositionen bleiben unverändert. Bei Bedarf ein Gebäude über **Verschieben**
|
|
||||||
mit **Alle Stockwerke dieses Gebäudes mitnehmen** im gemeinsamen Grundriss anordnen.
|
|
||||||
|
|
||||||
Auch die Freigabe-Auswahl in der Symcon-Benutzerverwaltung zeigt die vollständigen
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-house.jpg" width="900" alt="A house in the 3D view, floors apart, rooms lit"></p>
|
||||||
Pfade. Die Rechte bleiben an die bisherigen Stockwerks-, Raum- und Geräte-IDs gebunden.
|
|
||||||
Leere Gruppen können entfernt werden; Gruppen mit untergeordneten Einträgen sind geschützt.
|
|
||||||
Pläne ohne eingerichtete Topologie behalten ihre bisherige Navigation.
|
|
||||||
|
|
||||||
### Für die Entwicklung
|
## 🖼️ What it looks like
|
||||||
|
|
||||||
IP-Symcon erwartet `library.json` im Wurzelverzeichnis eines Repositories. Das eigentliche
|
<table>
|
||||||
Projekt behält dieses Modul deshalb unter `symcon/`; aus einem Fork wird daraus ein reiner
|
<tr>
|
||||||
`symcon`-Branch. Auf dem Entwicklungsbranch bauen, prüfen und die Änderungen committen,
|
<td align="center" width="50%"><a href="https://therealmrbk.github.io/NextFloor/docs/en/draw/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/editor.jpg" alt="The plan editor with the 3D view beside it"></a><br><sub><b>The editor.</b> Draw while the house grows beside you.</sub></td>
|
||||||
bevor der Installationsbranch veröffentlicht wird (`git subtree` übernimmt nur Commits):
|
<td align="center" width="50%"><a href="https://therealmrbk.github.io/NextFloor/docs/en/view3d/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-room.jpg" alt="A room in 3D with its lamps and the room panel"></a><br><sub><b>A room.</b> Every device of the room in one panel.</sub></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://therealmrbk.github.io/NextFloor/docs/en/climate-energy/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-energy.jpg" alt="The energy flow from the solar field through the house"></a><br><sub><b>Energy.</b> Power flows along the cables you drew.</sub></td>
|
||||||
|
<td align="center"><a href="https://therealmrbk.github.io/NextFloor/docs/en/climate-energy/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-heat.jpg" alt="A heat map of the house by temperature"></a><br><sub><b>Climate.</b> Temperature, humidity, CO₂, mould and sun by room.</sub></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://therealmrbk.github.io/NextFloor/docs/en/live/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-weather-rain.jpg" alt="Rain falling on the house"></a><br><sub><b>Weather.</b> Rain, snow, fog, lightning, sun and moon.</sub></td>
|
||||||
|
<td align="center"><a href="https://therealmrbk.github.io/NextFloor/docs/en/furnish/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/new-furniture.jpg" alt="Furniture from several packs in a room"></a><br><sub><b>Furniture.</b> About 800 models, and your own.</sub></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://therealmrbk.github.io/NextFloor/docs/en/tablet/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/tablet.jpg" alt="NextFloor on a wall tablet"></a><br><sub><b>The wall tablet.</b> Kiosk mode, night dimming, announcements.</sub></td>
|
||||||
|
<td align="center"><a href="https://therealmrbk.github.io/NextFloor/docs/en/cards/"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/card.jpg" alt="The NextFloor card on a dashboard"></a><br><sub><b>The card.</b> On any dashboard, with a visual editor.</sub></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
```powershell
|
Looks: <a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-blueprint.jpg"><b>Blueprint</b></a> · <a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-day.jpg"><b>Day</b></a> · <a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-cut.jpg"><b>Cut-away walls</b></a> · <a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-stacked.jpg"><b>Stacked floors</b></a> · <a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/vehicles-tesla.jpg"><b>Vehicles</b></a> · <a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/furniture-ikea.jpg"><b>IKEA sizes</b></a>
|
||||||
cd C:\Pfad\zu\NextFloor
|
|
||||||
cd frontend
|
## 🚀 Install in two minutes
|
||||||
npm run build
|
|
||||||
cd ..
|
NextFloor is in the **official HACS store**.
|
||||||
node --test symcon/tests/package.test.mjs
|
|
||||||
git add symcon frontend custom_components/nextfloor/frontend CHANGELOG.md
|
1. Open **HACS**, search for **NextFloor** and press **Download** (or use the HACS button above).
|
||||||
git commit -m "feat: add Symcon object tree picker"
|
2. **Restart Home Assistant.**
|
||||||
git subtree push --prefix=symcon origin symcon
|
3. Add the integration: [](https://my.home-assistant.io/redirect/config_flow_start/?domain=nextfloor), or *Settings → Devices & services → Add integration → NextFloor*.
|
||||||
|
4. Open **NextFloor** in the sidebar, switch to **Editor** and draw your first floor. The [quick start](https://therealmrbk.github.io/NextFloor/docs/en/quickstart/) takes you through the first room and lamp.
|
||||||
|
|
||||||
|
**Manual install:** copy `custom_components/nextfloor` into `config/custom_components/` and restart. Needs Home Assistant 2025.1 or newer. **Installed earlier as a custom repository?** Nothing to change: your plan and settings stay, and updates keep coming through HACS. More in the [installation guide](https://therealmrbk.github.io/NextFloor/docs/en/install/).
|
||||||
|
|
||||||
|
## 🧭 What it does
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary><b>Draw and plan</b></summary>
|
||||||
|
|
||||||
|
- **Plan editor:** floors, rooms, curved and sloping walls, doors, windows, shaped stairs, outdoor areas with fences and gates, roofs with overhang per side. Rooms open to the floor above, turned roof sections, wall thickness per part.
|
||||||
|
- **Import:** iPhone room scans (Apple RoomPlan), Sweet Home 3D, DXF and IFC, or a plan an AI draws from a picture of your floor plan.
|
||||||
|
- **Plan check:** one list of what is missing or off, with a fix in one tap, including standby eaters and their yearly cost.
|
||||||
|
- **Areas and paper:** living area per room, floor and house, counted like the German *Wohnflächenverordnung*; the plan at 1:100 to print or save as PDF.
|
||||||
|
- **Versions and notes:** named states of the plan ("before the renovation"), compared with the plan now; notes pinned to a spot, with a due day.
|
||||||
|
- **3D print:** save the house as an STL file at 1:100.
|
||||||
|
|
||||||
|
→ [Draw the house](https://therealmrbk.github.io/NextFloor/docs/en/draw/) · [Plan tools](https://therealmrbk.github.io/NextFloor/docs/en/plan-tools/)
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary><b>Furnish and connect</b></summary>
|
||||||
|
|
||||||
|
- **Furniture:** 40 basic models and 43 packs with about 800 more: season and decoration, wellness, music, loft, Japandi, workshop, vehicles, picture frames with your own photos, L- and U-sofas, IKEA sizes.
|
||||||
|
- **Build your own:** the furniture studio in the editor, and the [browser builder](https://therealmrbk.github.io/NextFloor/builder/) that shares to a community store.
|
||||||
|
- **Devices:** lamps with several bulbs, light programs, blinds (roller, venetian, inside, Somfy *My*), smart locks, gates, TVs with ambilight, speakers, a 3D printer, a heat pump, the car, pets, robot vacuums and mowers.
|
||||||
|
- **People:** a room sensor or a default room per person, shown in their rooms and counted per floor.
|
||||||
|
|
||||||
|
→ [Furnish](https://therealmrbk.github.io/NextFloor/docs/en/furnish/) · [Connect devices](https://therealmrbk.github.io/NextFloor/docs/en/devices/) · [Furniture packs](https://therealmrbk.github.io/NextFloor/docs/en/packs/)
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary><b>Live in 3D</b></summary>
|
||||||
|
|
||||||
|
- **Control:** tap to switch, swipe to dim, long press for colours, a room panel with scenes and moods, a central menu, search.
|
||||||
|
- **Weather and sun:** rain, snow, hail, fog, lightning, sun and moon, real shadows, a time-of-day slider, the sun's arc over the property.
|
||||||
|
- **Walk and time travel:** walk through the house at eye level, or replay the last day or week.
|
||||||
|
- **Warnings:** smoke, gas, water, the alarm with the sensor that set it off, windows open in the rain, and your own warnings.
|
||||||
|
- **Announcements:** *"Dinner is ready!"* in the room that should hear it, through its speaker and on every open screen.
|
||||||
|
|
||||||
|
→ [The 3D view](https://therealmrbk.github.io/NextFloor/docs/en/view3d/) · [Live features](https://therealmrbk.github.io/NextFloor/docs/en/live/) · [Announcements](https://therealmrbk.github.io/NextFloor/docs/en/announcements/)
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary><b>Climate, sun and energy</b></summary>
|
||||||
|
|
||||||
|
- **Heat maps:** temperature (summer and winter scale), humidity, CO₂, mould risk and a comfort score, Wi-Fi reach, hours of sun and power draw per room.
|
||||||
|
- **Room hints:** airing, low batteries, lights left on in empty rooms, shade when the sun heats a room, a window open while the heating runs.
|
||||||
|
- **Energy:** solar fields (also east-west racks), power flow along real cable routes, battery charge, gas and water meters, a meter per floor, the last 24 hours and seven days.
|
||||||
|
|
||||||
|
→ [Climate and energy](https://therealmrbk.github.io/NextFloor/docs/en/climate-energy/) · [Outside, roof and energy](https://therealmrbk.github.io/NextFloor/docs/en/outside/)
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary><b>Dashboard, tablet and automations</b></summary>
|
||||||
|
|
||||||
|
- **The card:** `custom:nextfloor-card` with a visual editor, card templates, a card for chosen rooms, floor-plan-only mode.
|
||||||
|
- **Wall tablet:** kiosk mode with night dimming, an easy-to-read mode, and quality that steps down by itself on slow tablets.
|
||||||
|
- **Automations:** *Open windows and doors* and *Lights on* as sensors for the house and every floor, plus the actions `nextfloor.announce` and `nextfloor.reload_screens`.
|
||||||
|
- **Look:** colours, font and corner radius from your Home Assistant theme; looks *Neon*, *Blueprint* and *Day*. Nineteen languages.
|
||||||
|
|
||||||
|
→ [The dashboard card](https://therealmrbk.github.io/NextFloor/docs/en/cards/) · [Wall tablet](https://therealmrbk.github.io/NextFloor/docs/en/tablet/) · [Services and sensors](https://therealmrbk.github.io/NextFloor/docs/en/automations/)
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## 🧩 The dashboard card
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
type: custom:nextfloor-card
|
||||||
|
floor: ground # optional: start floor
|
||||||
|
theme: neon # neon | blueprint | day
|
||||||
|
room_buttons: true # a row of room buttons
|
||||||
|
template: kitchen # optional: a card template set up once in the editor
|
||||||
```
|
```
|
||||||
|
|
||||||
Danach in IP-Symcon unter **Kerninstanzen → Modules** den Git-Link des Forks hinzufügen und
|
The visual editor sets every option without YAML. The [complete list of card options](https://therealmrbk.github.io/NextFloor/docs/en/cards/) has them all, with their defaults.
|
||||||
im Zahnrad des Eintrags den Branch `symcon` wählen. Anschließend steht **NextFloor** bei
|
|
||||||
„Instanz hinzufügen“ zur Verfügung.
|
|
||||||
|
|
||||||
### Status von Heizkreisen und Frischwasserstationen
|
## 📚 Documentation
|
||||||
|
|
||||||
Im Editor lässt sich je Heizkreis und je FriWa-Station unter **Status (optional)** eine
|
The full documentation is at **[therealmrbk.github.io/NextFloor/docs](https://therealmrbk.github.io/NextFloor/docs/en/)**: search, a dark and a light look, and every page in English and German.
|
||||||
Variable aus dem Symcon-Objektbaum auswählen. **Anlagenstatus (optional)** ergänzt einen
|
|
||||||
gemeinsamen Status für das gesamte Gerät. Integer-Variablen zeigen den in Symcon
|
|
||||||
hinterlegten Aliastext; Namen und Pfade begrenzen die Auswahl nicht. Die Statuswerte
|
|
||||||
erscheinen in der schwebenden 3D-Kachel und im Detailfenster, bei Kaskaden je Station.
|
|
||||||
Nicht verknüpfte Statuszeilen bleiben ausgeblendet. Die Anzeige ist schreibgeschützt.
|
|
||||||
|
|
||||||
Die Dateien unter `NextFloor/assets/` und `NextFloor/packs/` werden durch
|
| I want to … | Read |
|
||||||
`frontend` mit `npm run build` erzeugt beziehungsweise kopiert und gehören daher in den Branch.
|
|---|---|
|
||||||
Der Build prüft anschließend die Modulmetadaten und die installierbare Verzeichnisstruktur.
|
| install and draw my first room | [Install](https://therealmrbk.github.io/NextFloor/docs/en/install/) · [Quick start](https://therealmrbk.github.io/NextFloor/docs/en/quickstart/) · [How it works](https://therealmrbk.github.io/NextFloor/docs/en/concepts/) |
|
||||||
Dieselbe Prüfung lässt sich separat mit `node symcon/tests/validate-package.mjs` ausführen.
|
| draw the house, furnish it, connect devices | [Draw](https://therealmrbk.github.io/NextFloor/docs/en/draw/) · [Furnish](https://therealmrbk.github.io/NextFloor/docs/en/furnish/) · [Connect devices](https://therealmrbk.github.io/NextFloor/docs/en/devices/) |
|
||||||
|
| use weather, energy, climate and announcements | [The 3D view](https://therealmrbk.github.io/NextFloor/docs/en/view3d/) · [Live features](https://therealmrbk.github.io/NextFloor/docs/en/live/) · [Climate and energy](https://therealmrbk.github.io/NextFloor/docs/en/climate-energy/) |
|
||||||
|
| put it on a dashboard or a wall tablet | [The dashboard card](https://therealmrbk.github.io/NextFloor/docs/en/cards/) · [Wall tablet](https://therealmrbk.github.io/NextFloor/docs/en/tablet/) |
|
||||||
|
| automate, extend, build my own | [Services and sensors](https://therealmrbk.github.io/NextFloor/docs/en/automations/) · [Plugins](https://therealmrbk.github.io/NextFloor/docs/en/plugins/) · [Furniture packs](https://therealmrbk.github.io/NextFloor/docs/en/packs/) · [Plan format](https://therealmrbk.github.io/NextFloor/docs/en/plan-format/) |
|
||||||
|
| fix something | [FAQ and troubleshooting](https://therealmrbk.github.io/NextFloor/docs/en/faq/) |
|
||||||
|
|
||||||
## Anmeldung und Benutzerrechte ab 0.3.0
|
The Markdown sources are in [`docs/content`](https://github.com/therealMRBK/NextFloor/tree/main/docs/content). A pull request that improves a page is welcome.
|
||||||
|
|
||||||
1. In der NextFloor-Instanz **Benutzer und Zugriffsrechte** öffnen.
|
## 💚 Free forever
|
||||||
2. Unter **Benutzer auswählen → Neuen Benutzer anlegen** Namen und Passwort setzen.
|
|
||||||
3. Rolle und Freigaben auswählen, dann **Benutzer speichern**. Diese Aktionen
|
|
||||||
werden sofort gespeichert; das Passwortfeld wird danach geleert.
|
|
||||||
4. **Anmeldeseite öffnen** aufrufen und die Adresse als Lesezeichen verwenden.
|
|
||||||
Sie ist dauerhaft und enthält kein Zugangs-Token. Die Adresse steht außerdem
|
|
||||||
im Formular: `/hook/nextfloor/<Instanz-ID>/` an der Symcon-Serveradresse.
|
|
||||||
|
|
||||||
Das Passwortfeld steht direkt unter dem Benutzernamen. Beim Benutzerwechsel werden
|
NextFloor is free, and it stays free: not "free to try", not "free with a paid Pro", not "free until the next version". **Free, for everyone, forever.**
|
||||||
Rolle, Schalter und alle drei Freigabetabellen mit den gespeicherten Werten dieses
|
|
||||||
Benutzers neu befüllt; das Passwortfeld wird geleert. Die Auswahl **Neuen Benutzer
|
|
||||||
anlegen** leert die Tabellen. Änderungen werden erst mit **Benutzer speichern**
|
|
||||||
übernommen; ein Wechsel verwirft noch nicht gespeicherte Eingaben. Seit 0.3.2 werden
|
|
||||||
die nativen Formularlisten zeilenweise übertragen, auch wenn sie leer sind oder
|
|
||||||
gerade keine Zeile ausgewählt ist.
|
|
||||||
|
|
||||||
Die Konten gehören zur jeweiligen NextFloor-Instanz. Die Benutzerverwaltung
|
- **Nothing to buy, ever.** No Pro version, no paid modules, no packs sold one by one, no supporter pass, no licence key, no shop. The weather, the energy flow, TV screens, the car, announcements, the heat pump and the 3D printer are simply part of NextFloor.
|
||||||
bleibt ausschließlich in der Symcon-Konfiguration. **Designer im Browser
|
- **New furniture all the time, for free.** 43 packs with about 800 models come with it, and new packs keep coming.
|
||||||
öffnen** ermöglicht dem Symcon-Administrator weiterhin den vollständigen Zugang,
|
- **Build and extend it yourself.** The [furniture builder](https://therealmrbk.github.io/NextFloor/builder/) shares to a community store; a [plugin system](https://therealmrbk.github.io/NextFloor/docs/en/plugins/) with a reviewed [plugin store](https://github.com/therealMRBK/NextFloor-Plugins) adds device kinds, light animations and room cards, from anyone.
|
||||||
auch wenn kein NextFloor-Admin mehr angemeldet ist oder alle Konten gesperrt sind.
|
- **Your data stays home.** No account, no cloud, no usage data.
|
||||||
Der dabei erzeugte Konsolen-Link gilt 90 Sekunden und kann einmal verwendet werden.
|
- **The promise is in the licence.** NextFloor is MIT licensed: anyone may read, change and share it. Nobody can take it away from you, not even me.
|
||||||
Als Lesezeichen wird stattdessen die dauerhafte Anmeldeseite verwendet.
|
|
||||||
|
|
||||||
| Einstellung | Zugriff |
|
I believe in open source: software that anyone may read, change and share, and that every home can use without paying a cent. That conviction is the reason NextFloor exists.
|
||||||
| --- | --- |
|
|
||||||
| Admin | Komplette Visualisierung, Bedienung und Editor |
|
|
||||||
| Benutzer ohne Freigaben | Komplettes Gebäude als Geometrie, keine Zustände oder Bedienung |
|
|
||||||
| Alle Zustände ansehen | Alle Daten dieser Visualisierung, ohne Bedienung |
|
|
||||||
| Alles ansehen und bedienen | Daten und Bedienung dieser Visualisierung, ohne Editor |
|
|
||||||
| Raumfreigabe „Nur ansehen“ | Zustände des ausgewählten Raums und seiner Geräte |
|
|
||||||
| Raumfreigabe „Ansehen und bedienen“ | Zusätzlich Bedienung dieser Geräte |
|
|
||||||
| Gerätefreigabe | Nur das gewählte Gerät und seine verknüpften Werte, ohne den ganzen Raum freizugeben |
|
|
||||||
|
|
||||||
Einzelfreigaben ergänzen die Grundrechte. So kann ein Benutzer alles ansehen,
|
## 🔒 Privacy
|
||||||
aber ausschließlich Büro 2 bedienen. „Alle“ bezieht sich auf die Visualisierung;
|
|
||||||
unverknüpfte Symcon-Variablen werden Benutzern nicht pauschal übertragen.
|
|
||||||
Ein Raum umfasst seine verknüpften Werte, die Geräte im Raum und die zugeordneten
|
|
||||||
Bereichskategorien einschließlich Unterkategorien. Freigaben für Geräte im Plan
|
|
||||||
verwenden deren feste Datenpunkt-Verknüpfungen. Automatisch zugeordnete Geräte
|
|
||||||
können über **Weitere Symcon-Geräte / Datenpunkte** ergänzt oder im Editor fest
|
|
||||||
verknüpft werden. Die Auswahl erfolgt aus dem Objektbaum; es müssen keine IDs
|
|
||||||
eingetippt werden. Eine hier ausgewählte Instanz oder Kategorie umfasst ihre
|
|
||||||
untergeordneten Datenpunkte. Ein ausgewählter Link gilt für sein Ziel.
|
|
||||||
|
|
||||||
Außerhalb freigegebener Räume bleiben die Gebäudegeometrie und Möbel sichtbar;
|
The plan, its pictures and the packs live in Home Assistant's `.storage`. NextFloor does not talk to the internet on its own. Only if you switch on the optional real map, your browser loads map tiles from the tile server (OpenStreetMap by default). Pictures and history come from your own Home Assistant.
|
||||||
ihre Live-Verknüpfungen werden entfernt. Einzeln freigegebene Geräte bleiben
|
|
||||||
im jeweiligen Raum erreichbar, ohne dessen Raumklima freizugeben. Die Prüfung
|
|
||||||
gilt auch für direkte API-Aufrufe, native Rollen-Aliase, Trends und Datenübertragungen.
|
|
||||||
Benutzer erhalten weder den kompletten Objektbaum noch Projekt-Historie,
|
|
||||||
Backups, Uploads oder Editor-Funktionen. Schaltbefehle mit nicht freigegebenen
|
|
||||||
Zielen werden vor der ersten Aktion abgewiesen. Passive Variablen ohne native
|
|
||||||
Schaltaktion bleiben für Benutzer schreibgeschützt.
|
|
||||||
|
|
||||||
**Passwort zurücksetzen**, Sperren, Löschen und **Benutzer abmelden** funktionieren
|
## 🤖 Made with AI
|
||||||
in der Konsole. Änderungen an Konto oder Rechten beenden dessen bisherige
|
|
||||||
Anmeldungen sofort. Passwörter werden gehasht gespeichert. Anmeldungen verwenden
|
|
||||||
HttpOnly-Cookies und CSRF-Schutz; es gibt keine wiederverwendbaren Admin-Token
|
|
||||||
im Viewer-Link oder in der Kachel. Der normale Zugang gilt bis zu zwölf Stunden
|
|
||||||
mit maximal zwei Stunden Inaktivität. **Angemeldet bleiben** gilt bis zu 30 Tage
|
|
||||||
mit maximal sieben Tagen Inaktivität. Ein Passwort-Reset oder eine Sperre hebt
|
|
||||||
auch diese Anmeldungen auf. Für den Zugriff über das Internet die HTTPS-Adresse
|
|
||||||
des Symcon-Servers bzw. des eigenen HTTPS-Proxys verwenden.
|
|
||||||
|
|
||||||
Nach dem Update erfordert die Kachel-Visualisierung eine Anmeldung. Vorherige
|
NextFloor was built entirely with AI assistance. The idea, the decisions and the testing in a real house come from a person; the design, the code, the tests and the documentation were written together with [Claude](https://www.anthropic.com/claude) (Anthropic) in [Claude Code](https://www.anthropic.com/claude-code). I would rather say so openly than let you guess.
|
||||||
Links mit `token=...` gelten nicht mehr als Admin-Zugang; der aktualisierte
|
|
||||||
Konsolen-Knopf und die neue Anmeldeseite bleiben verfügbar. Unsichere lokale
|
|
||||||
Browser-Entwürfe werden im Symcon-Zugang nicht zwischen Konten gespeichert.
|
|
||||||
|
|
||||||
## Änderungen in 0.3.0
|
What that means for you:
|
||||||
|
|
||||||
- Passwort-Anmeldung und vollständige Benutzerverwaltung mit Raum- und
|
- **It is tested, but young.** There are automated tests (frontend logic, the furniture packs, the Home Assistant side) and releases are looked at in a real browser and installed on a real Home Assistant, but it has far fewer users than most integrations. Expect rough edges and report them.
|
||||||
Gerätefreigaben in der Symcon-Konfiguration (siehe oben).
|
- **Back up before you trust it.** The plan lives in Home Assistant's `.storage`; the editor has a backup and restore of the whole plan.
|
||||||
- **Pflastersteine**, **Trittplatten** und **Natursteinweg** als weitere
|
- **Read the code if it matters to you.** It is MIT licensed and small enough to read. Pull requests are welcome, also ones written with AI, as long as you say so and have run the checks (see [CONTRIBUTING.md](https://github.com/therealMRBK/NextFloor/blob/main/CONTRIBUTING.md)).
|
||||||
Außenflächenarten: strukturierte Pflastersteine, einzelne Gartenplatten mit
|
|
||||||
grünen Zwischenräumen und unregelmäßige Natursteinplatten. Texturmaßstab und
|
|
||||||
Drehung sind wie bei den vorhandenen Arten pro Fläche einstellbar.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.30
|
## 💬 Ideas, questions and bugs
|
||||||
|
|
||||||
- Jede Außenfläche erhält **Texturmaßstab (%)** und **Texturdrehung (°)** direkt
|
[Discussions](https://github.com/therealMRBK/NextFloor/discussions) for ideas and questions, [Issues](https://github.com/therealMRBK/NextFloor/issues/new/choose) for bugs. Security problems go through [private reporting](https://github.com/therealMRBK/NextFloor/security/advisories/new).
|
||||||
unter der Auswahl der Flächenart. 100 % ist die bisherige Größe, 200 % macht
|
|
||||||
das Muster doppelt so groß und 50 % halb so groß. Der Bereich ist 5–2000 %;
|
|
||||||
Drehungen werden auf eine volle Umdrehung normalisiert (auch negative Eingaben
|
|
||||||
sind möglich).
|
|
||||||
- Die Einstellungen betreffen ausschließlich das Muster der ausgewählten Fläche,
|
|
||||||
gelten auch bei Gefälle und Transparenz und bleiben beim Speichern, Laden und
|
|
||||||
Duplizieren erhalten. Bestehende Flächen behalten 100 % / 0°.
|
|
||||||
- Eine Erklärung zu Maßstab und Drehung steht hinter dem Infosymbol.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.29
|
## 🛠️ Development
|
||||||
|
|
||||||
- **Außenflächen einrasten:** Beim Zeichnen, Verschieben und Bearbeiten der Ecken
|
<details>
|
||||||
rasten Flächen an benachbarten Außenflächen und Hauskanten ein. Ganze Flächen
|
<summary>Build, test, preview</summary>
|
||||||
behalten dabei ihre Form. Mit **Alt** lässt sich das Einrasten unterdrücken.
|
|
||||||
- **Neue Untergründe:** Straße, Gehweg, Schotterfläche, Fluss und Bach.
|
|
||||||
Fluss und Bach schneiden sich standardmäßig aus einer umgebenden Fläche aus;
|
|
||||||
Höhenversatz, Gefälle, Transparenz und die Option für Ausschnitte bleiben einstellbar.
|
|
||||||
- **3D-Texturen:** Gras, Pflaster/Platten, Asphalt, Schotter, Erde, Wasser, Hecken
|
|
||||||
und Holz bekommen passende, lokal erzeugte Texturen. Sie folgen dem Metermaß
|
|
||||||
der Szene statt beim Vergrößern einer Fläche zu verzerren, funktionieren auch
|
|
||||||
auf geneigten und transparenten Flächen und benötigen keine externen Bilder.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.28
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
npm test # pure logic
|
||||||
|
npm run typecheck
|
||||||
|
npm run build # writes the bundles to custom_components/nextfloor/frontend (committed)
|
||||||
|
npm run screenshot # renders preview/index.html (invented demo data) with a local Chrome or Chromium
|
||||||
|
```
|
||||||
|
|
||||||
- **Frischwasserstation und Kaskade:** Das 3D-Modell zeigt getrennte Primär-
|
- **Preview without Home Assistant:** open `preview/index.html` through any local web server.
|
||||||
und Trinkwasserkreise mit Plattenwärmetauscher. Vorlauf ist rot, Rücklauf
|
- **Deploy to a test instance:** create `deploy.local.json` with `{"target": "<config>/custom_components/nextfloor"}` and run `npm run deploy` in `frontend/`.
|
||||||
blau, Trinkwarmwasser orange, Kaltwasser grün und Zirkulation violett.
|
- **Python tests** run in CI with `pytest-homeassistant-custom-component`.
|
||||||
- Mit **+ Station hinzufügen** lassen sich bis zu 16 parallele Stationen
|
- **Documentation site:** `cd tools/docs && npm install && npm run build` (sources in `docs/content`, English and German).
|
||||||
anlegen. Jede erhält eigene Vorlauf-/Rücklauf-, Kaltwasser-/Warmwasser-
|
- **Furniture packs:** the built-in packs are generated by `tools/build_packs.py`. The format of your own packs is in the [documentation](https://therealmrbk.github.io/NextFloor/docs/en/packs/).
|
||||||
und Leistungsvariablen sowie separate Pumpen- und Kaskadenventil-Bindungen.
|
|
||||||
Die Datenpunkte werden ohne Namensfilter aus dem Symcon-Objektbaum gewählt.
|
|
||||||
Neue Stationen beginnen ohne Datenpunkt-Verknüpfungen. Die Breite wird beim
|
|
||||||
Hinzufügen und Entfernen passend angepasst.
|
|
||||||
- Die Kaskade hat gemeinsame Sammelleitungen und eine gemeinsame optionale
|
|
||||||
Zirkulationspumpe. Eine kompakte schwebende Kachel zeigt die Stationen;
|
|
||||||
ein Klick auf eine Station öffnet ihre Einzelwerte und nativen Bedienelemente.
|
|
||||||
Die vorhandene zoomabhängige Kachelanzeige bleibt wirksam.
|
|
||||||
- Unter **Pufferspeicher im Plan** kann ein Puffer desselben Stockwerks
|
|
||||||
zugeordnet werden. Zwei Primärleitungen verbinden die gemeinsame Kaskade
|
|
||||||
mit dem oberen und unteren Pufferanschluss. Die Trinkwasserseite bleibt
|
|
||||||
getrennt. Die Darstellung folgt Position, Drehung, Montagehöhe und Stockwerk;
|
|
||||||
beim Entfernen des Puffers verschwinden seine Verbindungsleitungen.
|
|
||||||
- Der Puffer zeigt eine Temperaturschichtung anhand seiner verknüpften Fühler.
|
|
||||||
Die Farben zwischen den Messhöhen werden interpoliert. Ohne Messwerte bleibt
|
|
||||||
die Oberfläche neutral. Vorhandene Einzelstationen behalten ihre Verknüpfungen.
|
|
||||||
Das Anlegen einer Kaskade löst keine Gerätebefehle aus.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.27
|
</details>
|
||||||
|
|
||||||
- Gerätekacheln werden abhängig von der tatsächlichen Zoomstufe ein- und
|
## 🙏 Credits
|
||||||
ausgeblendet. In der Fernansicht bleiben die Summen erhalten; Raumwerte,
|
|
||||||
Anlagen und einzelne Geräte erscheinen mit zunehmender Nähe.
|
|
||||||
- Geräte mit laufendem Verbrauch bzw. Einspeisung erscheinen früher als
|
|
||||||
0-W-Kacheln. Verknüpfte Nullwerte bleiben erhalten und werden in der
|
|
||||||
Nahansicht wieder sichtbar. Gebäudesummen und die obere Zählerleiste werden
|
|
||||||
durch diese Auswahl nicht verändert.
|
|
||||||
- Dichte Gerätegruppen bilden keine langen Kachelsäulen mehr. Details, für
|
|
||||||
die am Bildrand oder in einem engen Stapel kein Platz ist, bleiben zunächst
|
|
||||||
ausgeblendet. Heranzoomen und das Verschieben des Ausschnitts zeigen sie
|
|
||||||
wieder. Ein Übergangsbereich verhindert Flackern an den Zoomgrenzen.
|
|
||||||
- Die automatische Auswahl gilt auch für schmale Kacheln und Mobilgeräte.
|
|
||||||
Der vorhandene Schalter **Karten** steuert weiterhin alle schwebenden Karten.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.26
|
NextFloor started as a fork of [NeonPlan 3D](https://github.com/Mastershort/neonplan3d) by Mastershort (Torsten). The idea of a live 3D home right inside Home Assistant, and the groundwork NextFloor grew from, are his. NextFloor carries that idea on in its own direction: entirely free and open source, for everyone. Thank you, Torsten!
|
||||||
|
|
||||||
- Heiz-/Kühlkreise in 3D folgen jetzt der Anordnung eines realen Mischerkreises:
|
## Licence
|
||||||
Vorlauf und Rücklauf als getrennte Steigleitungen, beide Sammelleitungen unten,
|
|
||||||
das Ventil unter der Pumpe und die Temperaturfühler oberhalb der Pumpe.
|
|
||||||
Die Bauteile sitzen direkt auf den zugehörigen Leitungen.
|
|
||||||
- Ein **Mischer (Dreiwegeventil)** erhält eine Querverbindung vom Rücklauf.
|
|
||||||
Unter **Ventilbauart** kann stattdessen ein **Durchgangsventil (Zweiwege)**
|
|
||||||
ohne Beimischung gewählt werden. Vorschubpumpen bleiben ohne Ventil und ohne
|
|
||||||
künstliche Verbindung zwischen Vor- und Rücklauf.
|
|
||||||
- Die Pumpenfront zeigt gemeldeten Betrieb grün, Stillstand rot und fehlende
|
|
||||||
Rückmeldung grau. Der Rotor bewegt sich bei gemeldetem Betrieb, der
|
|
||||||
Ventilzeiger folgt der Stellung. Vorhandene Verknüpfungen, native Werte,
|
|
||||||
Bedienbereiche und die rein visuelle Ventilumkehrung bleiben erhalten.
|
|
||||||
- Falsch ausgerichtete Flächen liegender Zylinder sind korrigiert, damit
|
|
||||||
Pumpengehäuse, Fühler und andere runde Bauteile geschlossen dargestellt werden.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.25
|
MIT, see [LICENSE](https://github.com/therealMRBK/NextFloor/blob/main/LICENSE). NextFloor ships [three.js](https://threejs.org) (MIT), [Lit](https://lit.dev) (BSD-3-Clause); their notices are in [THIRD_PARTY_NOTICES.md](https://github.com/therealMRBK/NextFloor/blob/main/THIRD_PARTY_NOTICES.md).
|
||||||
|
|
||||||
- Ladestationen, einschließlich der Wallboxen aus den Möbelpaketen, erhalten
|
"Home Assistant" is a trademark of its owners; "Tesla" and the Tesla model names are trademarks of Tesla, Inc., and "IKEA" and its product names are trademarks of Inter IKEA Systems B.V.; they are used here only to name the sizes and models. NextFloor is an independent community project and not affiliated with or endorsed by Nabu Casa, Tesla or IKEA.
|
||||||
einen eigenen Abschnitt **Ladedaten** mit Objektbaum-Auswahl für SoC,
|
|
||||||
Startzeit, Endzeit, Ladezeit, geladene Energie und Verriegelungsstatus.
|
|
||||||
- Der Verriegelungsstatus verwendet eine Integer-Variable und zeigt deren
|
|
||||||
native Symcon-Aliase unverändert an. Die Felder filtern nach Datentyp,
|
|
||||||
ohne Einschränkungen durch Variablennamen, Pfad oder vermuteten Gerätetyp.
|
|
||||||
- Die verknüpften Daten erscheinen in der optionalen 3D-Kachel und im
|
|
||||||
Raummenü, auch ohne Leistungs- oder Schaltvariable. Unverknüpfte Zeilen
|
|
||||||
bleiben ausgeblendet, Nullwerte sichtbar. Archivierte Werte bieten Trends.
|
|
||||||
- Start und Ende übernehmen native Zeitprofile; alternativ können Unix-Zeit
|
|
||||||
in Sekunden/Millisekunden oder unveränderte Werte gewählt werden. Ladezeiten
|
|
||||||
unterstützen Sekunden, Minuten, Stunden und native Textanzeigen. Automatisch
|
|
||||||
nutzt vorhandene Einheiten und interpretiert einheitenlose Zahlen als Sekunden.
|
|
||||||
Die verknüpften Variablen werden ausschließlich gelesen.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.24
|
|
||||||
|
|
||||||
- Die rechte Stockwerksübersicht zeigt **Bereich → Raum → Gerät**, wenn ein
|
|
||||||
im Raum platziertes Gerät einen Leistungswert hat. Das gilt auch für Möbel
|
|
||||||
wie Wallboxen und für die Pumpen der Heiz-/Kühlkreisverteiler.
|
|
||||||
- Ohne eigenen Raumzähler dient der Raum nur als eingerückte Überschrift.
|
|
||||||
Der Leistungswert steht am Gerät; direkt verknüpfte Raumzähler bleiben am
|
|
||||||
Raum sichtbar. Gerätewerte werden nicht zusätzlich zu Bereichs-,
|
|
||||||
Stockwerks- oder Gebäudesummen addiert.
|
|
||||||
- Nullwerte, Live-Updates und Archivsymbole bleiben erhalten. Auch ohne
|
|
||||||
Bereichs- oder Stockwerkszähler lassen sich die Geräte in der Übersicht
|
|
||||||
anzeigen; fehlende übergeordnete Werte werden nicht erfunden.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.23
|
|
||||||
|
|
||||||
- **Heiz-/Kühlkreisverteiler:** Neues 3D-Bauteil in der Möbelbibliothek mit bis zu
|
|
||||||
32 frei benennbaren Kreisen. Heizkreise, Kühlkreise und umschaltbare Kreise
|
|
||||||
unterstützen jeweils optionale Pumpen, Ventile, Vorlauf-/Rücklauffühler und
|
|
||||||
Pumpenleistung. Einspeise- bzw. Vorschubpumpen sind eigene Kreise ohne Ventil.
|
|
||||||
Eine gemeinsame Vorschubpumpe mit mehreren ventilbestückten Kreisen ist damit
|
|
||||||
ebenfalls möglich. Umschaltbare Kreise verwenden einen explizit verknüpften
|
|
||||||
Boolean-/Integer-Wert und den konfigurierten Wert für Kühlbetrieb.
|
|
||||||
- **Pufferspeicher:** Neues 3D-Bauteil mit sieben Fühlerplätzen von oben nach
|
|
||||||
unten sowie separatem Vorlauf und Rücklauf. Es können bis zu 64 Plätze angelegt,
|
|
||||||
benannt, entfernt und frei in ihrer Höhe positioniert werden. Die Anzeige
|
|
||||||
sortiert die verknüpften Fühler nach ihrer Höhe; unzugewiesene Plätze bleiben
|
|
||||||
in der Werteliste ausgeblendet.
|
|
||||||
- **Frischwasserstation:** Neues 3D-Bauteil mit Vorlauf, Rücklauf,
|
|
||||||
Zirkulationstemperatur und Trinkwarmwasser. Lade- und Zirkulationspumpe lassen
|
|
||||||
sich getrennt verknüpfen und bedienen.
|
|
||||||
- Alle Datenpunkte werden aus dem echten Objektbaum ausgewählt, nach ihrem
|
|
||||||
nativen Datentyp und ohne Namens-/Pfadfilter. Pumpen und Ventile haben getrennte
|
|
||||||
Befehls- und Rückmeldevariablen. Eine zugewiesene Rückmeldung bestimmt die
|
|
||||||
3D-Anzeige auch dann, wenn sie nicht verfügbar ist; nur ohne Rückmeldung wird
|
|
||||||
der Sollwert verwendet. Ventilumkehrung gilt ausschließlich für die Darstellung.
|
|
||||||
Zahlen und Befehle behalten ihren nativen Wert und Wertebereich.
|
|
||||||
- Pumpenrotoren zeigen gemeldeten Betrieb, Ventilzeiger die gemeldete Position
|
|
||||||
und Speicherfühler ihre Temperaturfarbe. Optionale schwebende Karten und ein
|
|
||||||
Bedienfenster zeigen die Werte, geloggte Datenpunkte bieten Archivtrends.
|
|
||||||
Die Spreizung wird als **Vorlauf minus Rücklauf** in Kelvin angezeigt.
|
|
||||||
Nur Befehlsvariablen mit Symcon-Schaltaktion sind bedienbar; Rückmeldungen und
|
|
||||||
historische Ansichten bleiben reine Anzeigen. Die Zusatzoberfläche lädt erst,
|
|
||||||
wenn tatsächlich ein Hydraulikbauteil im Plan vorhanden ist.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.22
|
|
||||||
|
|
||||||
- **Bereiche statt mehrfacher Raumkopien:** Die rechte Übersicht eines Stockwerks
|
|
||||||
listet die verknüpften Symcon-Bereichskategorien mit ihren eigenen Namen und
|
|
||||||
Werten jeweils einmal auf. Mehrere Planräume mit demselben Bereich wiederholen
|
|
||||||
dessen Leistung und Verbrauch nicht mehr.
|
|
||||||
- **Eigene Raumzähler:** Im Raumeditor können unter diesem Punkt Leistung bzw.
|
|
||||||
Durchfluss und Energie bzw. Verbrauch für alle fünf Medien direkt aus dem
|
|
||||||
Objektbaum zugewiesen werden. Nur solche Räume erscheinen leicht eingerückt
|
|
||||||
unter ihrem Bereich, mit ausschließlich ihren eigenen zugewiesenen Werten.
|
|
||||||
Das Entfernen der letzten Zuweisung entfernt auch die Raumzeile. Raumzeilen
|
|
||||||
öffnen weiterhin das Raummenü; geloggte Werte bieten Archivtrends.
|
|
||||||
- Ein vorhandener Bereichszähler enthält die Raumwerte bereits. Sie werden
|
|
||||||
deshalb nicht zusätzlich auf die Bereichs- oder Stockwerkssumme addiert.
|
|
||||||
Fehlt eine passende Bereichsgröße, werden dafür die eigenen Raumzähler
|
|
||||||
summiert. Eigene Stockwerkszähler behalten Vorrang. Räume ohne Bereich stehen
|
|
||||||
mit eigenen Zählern unter „Nicht zugeordnet“.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.21
|
|
||||||
|
|
||||||
- **Keine Namensfilter bei der manuellen Variablenauswahl:** Maßgeblich ist der
|
|
||||||
native Datentyp, unabhängig von Namen, Pfad, Profil oder einer geratenen
|
|
||||||
Geräteklasse. Boolean-Werte aus „Garage“ und „Treppenhaus“ lassen sich
|
|
||||||
gleichermaßen als Licht/Schalter verknüpfen. Boolean-Lichter erhalten keinen
|
|
||||||
Helligkeitsregler. Vorhandene Verknüpfungen behalten ihre Referenzen.
|
|
||||||
- **Begründung im Datenpunktfenster:** Beim Anklicken eines unpassenden Objekts
|
|
||||||
erscheint eine kurze Meldung, etwa „Boolean statt Integer oder Float“,
|
|
||||||
„Instanz statt Variable“, „Schaltuhr bereits verknüpft“ oder ein Hinweis auf
|
|
||||||
noch nicht geladene Variablen. Eine abgelehnte Auswahl verändert die
|
|
||||||
bestehende Verknüpfung nicht; „Übernehmen“ bleibt dann deaktiviert.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.20
|
|
||||||
|
|
||||||
- **Leistungskacheln für Möbel:** Bei jedem Möbel mit Leistungszuordnung lässt
|
|
||||||
sich **Leistung als 3D-Kachel** einschalten, auch bei Wallboxen aus Möbelpaketen.
|
|
||||||
Der Leistungswert allein genügt; eine Schaltvariable ist nicht erforderlich.
|
|
||||||
Die kleine Kachel zeigt Namen und Leistung über dem Möbel, auch bei 0 W.
|
|
||||||
Fehlende Werte erscheinen als Strich und geloggte Variablen erhalten ein
|
|
||||||
Trendsymbol. Der Schalter **Karten** blendet die Kacheln gemeinsam ein oder aus.
|
|
||||||
- Native Integer- und Float-Variablen lassen sich unabhängig von einer erkannten
|
|
||||||
Geräteklasse im Objektbaum als Leistung verknüpfen. Die Markereinstellungen
|
|
||||||
erscheinen auch bei Paketleuchten, denen nur ein Leistungswert zugeordnet ist.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.19
|
|
||||||
|
|
||||||
- Der Schalter **Rechte Übersicht** oben blendet die Stockwerks- beziehungsweise
|
|
||||||
Raumübersicht vollständig ein oder aus. Die Summen oben bleiben sichtbar; beim
|
|
||||||
Ausblenden wird der Platz für die Leiste wieder freigegeben. Die Auswahl wird
|
|
||||||
im Browser gespeichert und beim nächsten Öffnen wiederhergestellt.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.18
|
|
||||||
|
|
||||||
- **Kompakteres Trend-Popup:** Kleine Zeitraum-, Zoom- und Aktualisierungsknöpfe
|
|
||||||
bilden eine schmale Leiste. Eigene Zeiten, Auflösung, Darstellung, Wertebereich
|
|
||||||
und CSV liegen hinter dem Zahnrad. Der Graph passt seine Höhe an das Fenster an
|
|
||||||
und erhält den größten Teil des Popups. Die Einstellungen überlagern ihn bei
|
|
||||||
Bedarf; sie verkleinern das Diagramm nicht.
|
|
||||||
- **Gebäude- und Stockwerksübersicht:** Bei „Alle Etagen“ stehen oben die
|
|
||||||
Leistungen und Verbräuche des Gesamtgebäudes, rechts eine dezente Kachel mit den
|
|
||||||
Stockwerken. Im geöffneten Stockwerk zeigt die Leiste dessen Summen und die
|
|
||||||
rechte Kachel die einzelnen Räume/Bereiche. Namen öffnen das jeweilige Stockwerk
|
|
||||||
oder den Raum. Die Kachel ist einklappbar und startet auf schmalen Ansichten
|
|
||||||
eingeklappt. Medien, Einheiten, Zeiträume, eigene Stockwerkszähler, Trends und
|
|
||||||
die Kennzeichnung unvollständiger Summen bleiben erhalten. Gemeinsam verknüpfte
|
|
||||||
Variablen werden im Gebäude nur einmal gezählt.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.17
|
|
||||||
|
|
||||||
- Das Trendsymbol ist kleiner und ohne Rahmen. In Raumklimakacheln sitzt es in
|
|
||||||
einer eigenen Spalte. Messwerte bleiben rechtsbündig untereinander ausgerichtet,
|
|
||||||
auch wenn nur einzelne Variablen geloggt werden; die Zeilen werden nicht höher.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.16
|
|
||||||
|
|
||||||
- **Archivtrends:** Bei geloggten Variablen erscheint neben Raumklima-, Geräte-,
|
|
||||||
Heizungs-, Wetter- und Zählerwerten ein kleines Diagrammsymbol. Es öffnet ein
|
|
||||||
Popup mit Zeitraumvorgaben, eigenen Von-/Bis-Zeiten, Auflösung (Rohdaten bis
|
|
||||||
Jahreswerte), Zoom und Zeitnavigation, Linien/Stufen/Balken/Tabelle, Min/Max,
|
|
||||||
frei einstellbarer Y-Achse, Live-Aktualisierung und CSV-Export. Diagramme werden
|
|
||||||
erst beim Öffnen geladen und funktionieren auch im Kachel-iframe.
|
|
||||||
- Es werden die originalen Archivdaten gelesen, einschließlich Boolean- und
|
|
||||||
String-Aufzeichnungen. Zähler zeigen bei Aggregation den Verbrauch des
|
|
||||||
Intervalls. Mehrere Quellen bleiben als einzelne Kurven erkennbar;
|
|
||||||
unterschiedliche Einheiten bekommen getrennte Diagramme. Begrenzte Abfragen,
|
|
||||||
leere Zeiträume und Archivfehler werden angezeigt. Das Logging wird nicht verändert.
|
|
||||||
Grundlage sind die offiziellen APIs
|
|
||||||
[AC_GetLoggedValues](https://www.symcon.de/de/service/dokumentation/modulreferenz/kern-instanzen/archive-control/ac-getloggedvalues/) und
|
|
||||||
[AC_GetAggregatedValues](https://www.symcon.de/de/service/dokumentation/modulreferenz/kern-instanzen/archive-control/ac-getaggregatedvalues/).
|
|
||||||
- Die Auswahl einer Bereichskategorie ändert den Raumnamen nicht mehr.
|
|
||||||
**Bereichsnamen übernehmen** kopiert auf Wunsch nur den Namen der letzten
|
|
||||||
Kategorie aus dem echten Objektbaum.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.15
|
|
||||||
|
|
||||||
- Fehlen einzelne Zählerwerte, wird die Summe der verfügbaren Werte mit **Err:**
|
|
||||||
davor angezeigt, zum Beispiel **Err: 1,5 kW**. Das gilt für Raum- und
|
|
||||||
Stockwerksübersichten sowie deren Leistungsanzeigen. Sind alle Quellen
|
|
||||||
ausgefallen, steht dort **Err: –**. Sobald wieder alle Werte verfügbar sind,
|
|
||||||
verschwindet die Kennzeichnung automatisch.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.14
|
|
||||||
|
|
||||||
- Verknüpfte Raum-Bereichskategorien werden einschließlich ausgeblendeter Objekte
|
|
||||||
nach Kategorien und Dummy-Modulen namens **Elektro/Strom, Wasser, Gas, Heizen
|
|
||||||
und Kühlen** durchsucht. Daraus werden **Leistung/Durchfluss** und
|
|
||||||
**Energie/Verbrauch** aus numerischen Variablen gelesen und im Raummenü angezeigt.
|
|
||||||
Passende Einheiten werden umgerechnet; verschiedene Einheiten und Tages-,
|
|
||||||
Monats-, Jahres- und Gesamtverbräuche bleiben getrennt. Ein übergeordneter
|
|
||||||
Zählerstand ersetzt seine Unterzähler; Variablenlinks zählen nicht doppelt.
|
|
||||||
- Der Knopf **Stockwerkszähler** in der 3D-Ansicht zeigt die Raumsummen je Medium.
|
|
||||||
Unter **Stockwerke → Stockwerkszähler** können für jedes Medium eigene
|
|
||||||
Leistungs-/Durchfluss- und Energie-/Verbrauchszähler aus dem Objektbaum gewählt
|
|
||||||
werden. Jeder eigene Zähler ersetzt nur die entsprechende Raumsumme. **×**
|
|
||||||
kehrt zur automatischen Summe zurück; bestehende Stockwerks-Leistungszähler
|
|
||||||
bleiben verknüpft. Unvollständige Teilsummen werden gekennzeichnet.
|
|
||||||
Die Stromleistung wird auch in Raum- und Stockwerksanzeigen genutzt.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.13
|
|
||||||
|
|
||||||
- Im Raum liegt **Fußbodenheizung** unter **Raumklima**. Dort lassen sich auch
|
|
||||||
**Zuluft-VSR, Abluft-VSR, Zulufttemperatur, Ablufttemperatur, NHR (Nachheizregister)**
|
|
||||||
und ein **Raumstatus** verknüpfen. Die Auswahl richtet sich nach dem nativen
|
|
||||||
Variablentyp, unabhängig vom bisher vermuteten Gerätetyp.
|
|
||||||
- Das Raummenü zeigt die gewählten Werte mit den Symcon-Einheiten und formatierten
|
|
||||||
Anzeigen. Der Alias der Integer-Variable **Raumstatus** ersetzt den berechneten
|
|
||||||
Komfortwert. Beschreibbare Heizungs- und Lüftungsvariablen werden über ihre native
|
|
||||||
Aktion bedient; reine Messwerte bleiben Anzeigen.
|
|
||||||
- Eine oder mehrere klassische **Symcon-Schaltuhren (Wochenplan-Ereignisse)** lassen
|
|
||||||
sich aus dem Objektbaum zuordnen. Das Raummenü zeigt Wochentage, Schaltpunkte und
|
|
||||||
Aktionsnamen sowie den nächsten Schaltpunkt. Aktivieren und Deaktivieren erhält
|
|
||||||
den vollständigen Wochenplan; Aktionsskripte bleiben auf dem Symcon-Server.
|
|
||||||
- Unter **Wettervariablen** werden Wetterzustand, Außentemperatur, Luftfeuchte,
|
|
||||||
Luftdruck, Wind, Böen, Windrichtung, Bewölkung, Niederschlag, Helligkeit, UV,
|
|
||||||
Sichtweite, Schnee, Nebel und Gewitter einzeln verknüpft. Der **Regensensor**
|
|
||||||
akzeptiert Boolean- und numerische Variablen auch bei abweichendem Gerätetyp.
|
|
||||||
Die Quellen steuern die Wetterdarstellung und Regenwarnung. Oben in der 3D-Ansicht
|
|
||||||
öffnet **Wetter** die aktuellen verknüpften Werte mit ihren nativen Einheiten.
|
|
||||||
- **Anwesenheit** verwendet beliebige Boolean-Variablen mit eigenem Personennamen:
|
|
||||||
true = anwesend, false = abwesend. Ein Raum für den 3D-Marker ist optional;
|
|
||||||
der Anwesenheitsstatus wird auch ohne Raum in der oberen Leiste angezeigt.
|
|
||||||
- Durchsagen, Lautsprecherauswahl, Ruhezeiten, Durchsagetexte und Bluetooth-Ortung
|
|
||||||
sind aus der Symcon-Oberfläche entfernt.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.12
|
|
||||||
|
|
||||||
- Der konfigurierte **Name der Visualisierung** erscheint oben links statt „NextFloor“,
|
|
||||||
außerdem im Browser-Titel und als Titel des Kachel-Iframes.
|
|
||||||
- Der WebHook wird bereits in `Create`, bei `KR_READY`, nach dem Kernelstart und bei
|
|
||||||
Modulaktualisierungen registriert. Eine laufende Nachregistrierung alle 30 Sekunden
|
|
||||||
stellt ihn auch nach einem späteren Zurücksetzen wieder her; bei Fehlern wird alle
|
|
||||||
5 Sekunden erneut versucht. URL, Zugangs-Token und Projektdaten bleiben erhalten.
|
|
||||||
- Der erklärende Text im Symcon-Konfigurationsformular wurde entfernt.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.11
|
|
||||||
|
|
||||||
- Die schwebenden Raumklimakarten werden in **Alle Etagen** ausgeblendet. Beim Öffnen
|
|
||||||
einer Etage oder eines Raums erscheinen die dort aktivierten Karten wieder.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.10
|
|
||||||
|
|
||||||
- **Raumnamen** schaltet oben in der 3D-Ansicht und in der Werkzeugleiste des Editors
|
|
||||||
die Namen in 3D ein oder aus. Beide Ansichten verwenden dieselbe, im Browser gespeicherte
|
|
||||||
Einstellung. Die Namen im 2D-Plan bleiben davon unberührt.
|
|
||||||
- Die HTML-SDK-Kachel hat den Schalter ebenfalls oben in ihrer 3D-Ansicht. Notizen,
|
|
||||||
Geräte und Messwertkarten bleiben beim Ausblenden der Raumnamen sichtbar.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.9
|
|
||||||
|
|
||||||
- **Behang in 3D umkehren** und **Lamellen in 3D umkehren** ändern ausschließlich die
|
|
||||||
Darstellung. Empfangene Werte, Prozentanzeigen, Regler und gesendete Steuerbefehle
|
|
||||||
bleiben unverändert: **0 bleibt 0**, auch bei aktiviertem Schalter.
|
|
||||||
- Dasselbe gilt beim zweiten Behang und für die Umkehrung des Positionssensors.
|
|
||||||
Bereits gespeicherte Umkehrungen gelten nach diesem Update nur für die Darstellung;
|
|
||||||
die Datenpunkte müssen nicht neu verknüpft werden. Ein Infosymbol erklärt die Optionen.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.8
|
|
||||||
|
|
||||||
- Lange Namen und Objektpfade in der Datenpunktauswahl werden mit Auslassungspunkten
|
|
||||||
gekürzt. Der vollständige Pfad bleibt per Mauszeiger sichtbar.
|
|
||||||
- Ein separater **×**-Knopf entfernt die Verknüpfung direkt, ohne den Objektbaum zu öffnen.
|
|
||||||
Beim Raumklima mit mehreren Sensoren bleiben die anderen verknüpften Werte erhalten.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.7
|
|
||||||
|
|
||||||
- Im Raumklima ist **Helligkeit** als weiterer Datenpunkt wählbar. Die Raumkarte zeigt ihn
|
|
||||||
mit einem Sonnensymbol in Lux; CO₂ verwendet ein Wolkensymbol.
|
|
||||||
- Unter **Zusätzliche Werte** fügt **+** beliebig weitere Datenpunkte an Geräte und
|
|
||||||
verknüpfte Möbel an. Jeder Wert hat eine eigene Auswahl aus dem Objektbaum, ein frei
|
|
||||||
eingebbares Symbol (Emoji/Zeichen) und eine optionale Bezeichnung. Mehrere Temperaturen
|
|
||||||
oder andere Werte erscheinen gemeinsam am Gerät und im Raumfenster; einzelne Werte
|
|
||||||
lassen sich wieder entfernen.
|
|
||||||
- Erklärende Hilfetexte im Designer sind hinter **ⓘ** zusammengefasst. Ein Klick öffnet
|
|
||||||
die jeweilige Erklärung als Popup, das per Schließen-Knopf oder Escape geschlossen wird.
|
|
||||||
|
|
||||||
- Der **Positions-Sensor (live)** einer Jalousie lässt sich unabhängig vom automatisch
|
|
||||||
vermuteten Gerätetyp aus dem Objektbaum auswählen. Integer und Float werden unterstützt;
|
|
||||||
Rückmeldungen in 0–100, 0–255 oder 0–1 werden anhand des Symcon-Wertebereichs eingelesen.
|
|
||||||
- **Wirksinn Behang umkehren** und **Wirksinn Lamellen umkehren** sind getrennt einstellbar,
|
|
||||||
auch bei einzeln platzierten Jalousien und beim zweiten Behang eines Fensters. Die Umkehrung
|
|
||||||
gilt für die Anzeige, 3D-Darstellung, Regler, Auf/Zu, Schnellmenü, Wischbedienung und
|
|
||||||
Gruppenbefehle. Der Positionssensor wird dabei ausschließlich gelesen.
|
|
||||||
- Die bisherige Option **Sensor zählt umgekehrt** korrigiert weiterhin nur eine abweichende
|
|
||||||
Richtung der Rückmeldung. Die neuen Wirksinn-Schalter drehen Anzeige und Bedienung zusammen.
|
|
||||||
- Die Raumklimakarten zeigen nur Symbole und Werte, ohne erneut den Raumnamen oder die
|
|
||||||
Messwert-Beschriftungen anzuzeigen. Nicht verknüpfte Messwerte erhalten keine Zeile;
|
|
||||||
eine vollständig unbestückte Karte wird nicht angezeigt. Verknüpfte, vorübergehend nicht
|
|
||||||
verfügbare Werte bleiben als „–“ erkennbar.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.6
|
|
||||||
|
|
||||||
- Pro Raum lässt sich unter **Raumklima → Raumklima als schwebende Karte** eine Glaskarte
|
|
||||||
mit Temperatur, Luftfeuchtigkeit und CO₂ einschalten. Sie hängt über dem jeweiligen Raum
|
|
||||||
und verwendet die dort ausgewählten Variablen, einschließlich mehrerer gemittelter Sensoren.
|
|
||||||
- Die Karte zeigt Celsius/Fahrenheit entsprechend der Anzeigeeinstellung, Feuchte in Prozent
|
|
||||||
und CO₂ in ppm. Fehlende Werte stehen als „–“ statt einer erfundenen Null dort.
|
|
||||||
- Der Schalter **Karten** bleibt auch ohne Energiezähler verfügbar. Karten funktionieren
|
|
||||||
in der Gesamtansicht, auf einzelnen Etagen und beim geöffneten Raum sowie in der HTML-SDK-Kachel.
|
|
||||||
- Die Variablenauswahl für Raumklima akzeptiert manuell jeden passenden numerischen
|
|
||||||
Symcon-Datenpunkt (Integer/Float), auch ohne erkannten Profilnamen oder vermuteten Gerätetyp.
|
|
||||||
„Feuchtigkeit“ und „CO₂“ werden erkannt; Namen übergeordneter Kategorien überschreiben
|
|
||||||
die Bedeutung des Messwerts nicht mehr.
|
|
||||||
|
|
||||||
Nach dem Update den Designer neu laden, den Raum auswählen und unter **Raumklima** die
|
|
||||||
Messwerte über den Objektbaum zuweisen. Dort **Raumklima als schwebende Karte** aktivieren.
|
|
||||||
In der 3D-Ansicht bei Bedarf **Karten** einschalten.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.5
|
|
||||||
|
|
||||||
- Numerische Variablen lassen sich im Objektbaum ausdrücklich als Licht-Dimmer oder
|
|
||||||
Behangposition auswählen, auch wenn der automatisch vermutete Gerätetyp nicht passt.
|
|
||||||
Integer und Float werden unterstützt; zusätzliche Rollen erzeugen keine doppelten
|
|
||||||
Objekte im Baum oder Geräte in automatisch gefüllten Raumlisten.
|
|
||||||
- Helligkeitsregler bleiben auch bei ausgeschaltetem Licht sichtbar. Echte Boolean-Schalter
|
|
||||||
erhalten keinen Dimmer. Die bewusste Einstellung „Im Raumfenster nur schalten“ bleibt wirksam.
|
|
||||||
- Wertebereiche und Schrittweiten kommen aus der aktuellen Symcon-Darstellung bzw. dem
|
|
||||||
Legacy-Profil. 0–255 und 0–1 werden bei Anzeige und Steuerbefehlen in Prozent umgerechnet.
|
|
||||||
- Im Fenster-/Jalousieformular sind **Position (Behang)** und **Lamellenposition** getrennt
|
|
||||||
über den Objektbaum verknüpfbar. Auch ein zweiter Behang kann eine eigene Lamellenvariable
|
|
||||||
erhalten. Die Auswahl steuert die richtigen Variablen im Raumfenster und im Schnellmenü;
|
|
||||||
die 3D-Lamellen folgen ihrer eigenen Position.
|
|
||||||
Auch einzeln platzierte Jalousie-Geräte bieten eine eigene Auswahl für die Lamellenposition.
|
|
||||||
- Ohne unterstützten Stoppbefehl wird kein Stoppknopf angeboten. Ein unbekannter Stoppbefehl
|
|
||||||
wird abgewiesen, statt versehentlich die Position zu verändern.
|
|
||||||
|
|
||||||
Nach dem Update den Designer neu laden. War der Dimmer bisher falsch zugeordnet, dessen
|
|
||||||
Datenpunkt im Licht-Feld erneut über den Objektbaum auswählen. Bei Jalousien die Position
|
|
||||||
im Feld **Position (Behang)** und den zweiten Datenpunkt unter **Lamellenposition** wählen.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.4
|
|
||||||
|
|
||||||
- Das Wandmenü in der rechten Raumleiste lässt sich über die Überschrift auf- und zuklappen.
|
|
||||||
- **Variablen neu laden** in der Titelleiste lädt den Objektbaum, Variablen und deren aktuelle
|
|
||||||
Darstellungen vollständig neu. Der Plan bleibt geöffnet. Während des Abrufs ist der Knopf
|
|
||||||
gesperrt; Erfolg oder Fehler werden angezeigt. Laufende Abfragen werden zuvor abgeschlossen.
|
|
||||||
- KNX-Temperaturen werden auch anhand der Einheit aus der aktuellen Symcon-9-Darstellung
|
|
||||||
erkannt, wenn kein altes Variablenprofil vorhanden ist. Numerische Temperaturwerte bleiben
|
|
||||||
für die Raumtemperatur auswählbar, auch wenn ein übergeordneter Objektname zuvor einen
|
|
||||||
Aktor-Datentyp vermuten ließ. Bestehende Verknüpfungen bleiben erhalten.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.3
|
|
||||||
|
|
||||||
- Große Objektbäume verursachen beim Laden nicht mehr „Output-Buffer exceeds Limit
|
|
||||||
(1048576 bytes)“. Große API-Antworten werden vollständig in kleinen Paketen übertragen;
|
|
||||||
keine einzelne JSON-Antwort überschreitet 256 KiB. Das gilt auch für Möbelpakete,
|
|
||||||
Bilder, Pläne und Backups, die über dieselbe API geladen werden.
|
|
||||||
- Ein Test mit 10.000 Variablen und Objekten überträgt rund 5,5 MB bei höchstens
|
|
||||||
rund 175 KB pro Antwort. Namen und Werte bleiben einschließlich Umlauten und Emojis erhalten.
|
|
||||||
- Die Übertragung verwendet eine unveränderliche Momentaufnahme in privaten temporären
|
|
||||||
Dateien statt des ebenfalls größenbegrenzten Modul-Buffers. Nach Abschluss werden diese
|
|
||||||
gelöscht; verwaiste Übertragungen verfallen nach zwei Minuten Inaktivität und werden
|
|
||||||
beim nächsten Zugriff aufgeräumt.
|
|
||||||
- Während einer laufenden Aktualisierung wird keine zweite gestartet. Fehlerhafte
|
|
||||||
oder leere Antworten werden verständlich gemeldet statt nur als „HTTP 200“.
|
|
||||||
|
|
||||||
Nach dem Update den Designer neu laden, damit die neue Übertragung auf beiden Seiten aktiv ist.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.2
|
|
||||||
|
|
||||||
- Die Datenpunktauswahl zeigt in der Hauptansicht die Objekte der Hauptkategorie.
|
|
||||||
Ausgeblendete Kategorien bleiben inklusive aller Unterkategorien und Variablen sichtbar
|
|
||||||
und werden als „ausgeblendet“ gekennzeichnet.
|
|
||||||
- I/O, Splitter, Kerninstanzen, Konfiguratoren, Discovery und Visualisierungen sind unter
|
|
||||||
einem anfangs zugeklappten virtuellen **„System“**-Ordner zusammengefasst. Die Zuordnung
|
|
||||||
richtet sich nach dem tatsächlichen Symcon-Modultyp, nicht nach dem Namen.
|
|
||||||
- Unterobjekte bleiben bei ihrer Systeminstanz. Suche, Vorauswahl und Bestätigung
|
|
||||||
funktionieren auch für Systemvariablen; die echten Symcon-Objekte werden nicht verschoben.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.1
|
|
||||||
|
|
||||||
- Fehlende interne WebHooks werden nach dem Symcon-Start, beim Übernehmen der
|
|
||||||
Instanzkonfiguration und beim Öffnen von Designer oder Kachel erneut registriert.
|
|
||||||
- Fehlgeschlagene Registrierungen erhalten einen Fehlerstatus und werden automatisch
|
|
||||||
erneut versucht. Die Instanz meldet dann nicht mehr fälschlich „bereit“.
|
|
||||||
- Der Button **„WebHook reparieren“** registriert den Hook direkt und zeigt das Ergebnis.
|
|
||||||
Die bestehende Instanz, der Grundriss und der Zugangsschlüssel bleiben dabei erhalten.
|
|
||||||
- Nach einem Update lädt der Designer seine neue JavaScript-Version statt einer
|
|
||||||
möglicherweise noch im Browser zwischengespeicherten Vorgängerversion.
|
|
||||||
|
|
||||||
### Update bei „Hook not found“
|
|
||||||
|
|
||||||
Das vollständige Modul auf 0.2.1 aktualisieren und die NextFloor-Instanzkonfiguration
|
|
||||||
neu öffnen. Einmal **„WebHook reparieren“**, anschließend **„Designer im Browser öffnen“**
|
|
||||||
anklicken. Der Eintrag gehört unter **WebHook Control → Hooks (Intern)**; ein eigener
|
|
||||||
PHP-Skript-Hook unter „Benutzerdefiniert“ ist nicht erforderlich. Die bestehende Instanz
|
|
||||||
nicht neu anlegen, da ihr Plan in ihren Attributen gespeichert ist.
|
|
||||||
|
|
||||||
## Änderungen in 0.2.0
|
|
||||||
|
|
||||||
- Die Datenpunktauswahl öffnet ein Popup mit dem vollständigen Symcon-Objektbaum.
|
|
||||||
Kategorien, Instanzen, Variablen, Skripte, Ereignisse, Medien und Links behalten
|
|
||||||
ihre Elternobjekte, Namen und Reihenfolge (Position, Typ, Name).
|
|
||||||
- Äste lassen sich auf- und zuklappen. Die Suche zeigt Fundstellen in ihrer Hierarchie;
|
|
||||||
beim erneuten Öffnen ist der bisherige Datenpunkt bereits aufgeklappt und markiert.
|
|
||||||
- Ein Klick markiert eine Variable, „Übernehmen“ bestätigt sie. Doppelklick übernimmt
|
|
||||||
direkt; „Abbrechen“ und Escape lassen die bisherige Zuordnung unverändert.
|
|
||||||
- Auch Variablenlinks sind auswählbar. Für das jeweilige Feld ungeeignete Objekte
|
|
||||||
bleiben zur Orientierung im Baum sichtbar und können nicht übernommen werden.
|
|
||||||
|
|
||||||
## Änderungen in 0.1.1
|
|
||||||
|
|
||||||
- NextFloor wird als Geräteinstanz (Modultyp 3) registriert und ist damit im Dialog
|
|
||||||
„Instanz hinzufügen“ auswählbar. Die HTML-SDK-Darstellung bleibt verfügbar.
|
|
||||||
- Die Dokumentations-URL in `module.json` und die Schema-URL des Formulars sind korrigiert.
|
|
||||||
- Designer und PHP-Backend verwenden dieselbe Symcon-Modulversion; es erscheint keine
|
|
||||||
falsche Aufforderung zum Neustart von Home Assistant.
|
|
||||||
- Die Paketprüfung erkennt fehlende Metadaten, falsche Modultypen und Verzeichnisstrukturen.
|
|
||||||
|
|
||||||
## Einrichtung
|
|
||||||
|
|
||||||
1. Eine **NextFloor**-Instanz anlegen.
|
|
||||||
2. In ihrer Konfiguration auf **„Designer im Browser öffnen“** klicken und den Grundriss
|
|
||||||
anlegen.
|
|
||||||
3. Für die Anzeige in der Tile-Visualisierung die Instanz wie jede andere Visualisierungs-
|
|
||||||
Instanz als Kachel hinzufügen.
|
|
||||||
|
|
||||||
Jede Instanz besitzt einen eigenen Plan, Bilder, Möbelpakete und Versionsverlauf.
|
|
||||||
|
|
||||||
## Objektbaum statt Objekt-ID
|
|
||||||
|
|
||||||
Alle Objekte werden beim Öffnen des Designers aus dem Symcon-Objektbaum gelesen. Ein Klick
|
|
||||||
auf ein Datenpunktfeld öffnet ein Popup mit diesem Baum. In jeder Auswahl erscheint zusätzlich
|
|
||||||
der vollständige Pfad, etwa `Haus / Erdgeschoss / Küche / Temperatur`.
|
|
||||||
Die Hauptansicht enthält die Objekte der Hauptkategorie einschließlich ausgeblendeter
|
|
||||||
Kategorien. Selten benötigte Systeminstanzen stehen im virtuellen Ordner **„System“**.
|
|
||||||
Die Suche durchsucht Name und Pfad; eine Objekt-ID wird weder angezeigt noch als Eingabe
|
|
||||||
akzeptiert. Kategorien stehen zusätzlich als Bereiche zur Raumzuordnung bereit.
|
|
||||||
|
|
||||||
Zur Darstellung werden Variablen anhand von Typ, Profil, Name und vorhandener Aktion als
|
|
||||||
Sensor, Kontakt, Schalter, Licht, Rollladen, Schloss oder Klima eingeordnet. Ist eine
|
|
||||||
Variablenaktion vorhanden, führt die 3D-Ansicht Änderungen über `RequestAction` aus;
|
|
||||||
ansonsten bleibt der jeweilige Wert als Anzeige verfügbar.
|
|
||||||
|
|
||||||
## Zugriff
|
|
||||||
|
|
||||||
Der Designer- und Kachel-Link enthält pro Instanz einen zufällig erzeugten Zugangsschlüssel.
|
|
||||||
Die Instanz setzt ihn zusätzlich als HttpOnly-Cookie für nachgeladene 3D- und Sprachdateien.
|
|
||||||
Über **„Neuen Designer-Zugang erzeugen“** lassen sich bestehende Links sofort ungültig machen.
|
|
||||||
Den generierten Link daher wie einen privaten WebFront-Link behandeln.
|
|
||||||
+209
@@ -0,0 +1,209 @@
|
|||||||
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/custom_components/nextfloor/brand/icon@2x.png" width="110" alt="NextFloor 标志"></p>
|
||||||
|
|
||||||
|
<h1 align="center">NextFloor</h1>
|
||||||
|
|
||||||
|
<p align="center"><b>在 Home Assistant 里画出你的家,实时看它活起来。</b><br>
|
||||||
|
灯会照亮所在的房间,卷帘会动,门会开,电视播什么就显示什么,屋外在下雨。<br>
|
||||||
|
没有云端,不用账号。为墙上平板而生。</p>
|
||||||
|
|
||||||
|
<p align="center"><b>💚 永久免费。每一个功能、每一个家具包、每一次更新——所有人都能用,而且一直如此。</b><br>
|
||||||
|
没有 Pro 版,没有付费插件,没有赞助通行证,没有许可证密钥,没有商店。</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://my.home-assistant.io/redirect/hacs_repository/?owner=therealMRBK&repository=NextFloor&category=integration"><img src="https://my.home-assistant.io/badges/hacs_repository.svg" alt="在 HACS 中打开"></a>
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/"><img src="https://img.shields.io/badge/%E2%96%B6-%E5%9C%A8%E7%BA%BF%E6%BC%94%E7%A4%BA-00b4d8?style=for-the-badge" alt="在线演示"></a>
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/preview/index.html?showcase&lang=en"><img src="https://img.shields.io/badge/%E2%96%A6-%E5%85%A8%E9%83%A8%E6%A8%A1%E5%9E%8B-8a63d2?style=for-the-badge" alt="全部模型"></a>
|
||||||
|
<a href="https://therealmrbk.github.io/NextFloor/dev/"><img src="https://img.shields.io/badge/%E2%9A%99-%E5%BC%80%E5%8F%91%E7%89%88%E6%BC%94%E7%A4%BA-ffb547?style=for-the-badge" alt="开发版演示"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/releases"><img src="https://img.shields.io/github/v/release/therealMRBK/NextFloor?style=flat-square" alt="版本"></a>
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/actions"><img src="https://img.shields.io/github/actions/workflow/status/therealMRBK/NextFloor/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>
|
||||||
|
<a href="https://hacs.xyz"><img src="https://img.shields.io/badge/HACS-%E5%AE%98%E6%96%B9%E5%95%86%E5%BA%97-41bdf5?style=flat-square" alt="HACS 官方商店"></a>
|
||||||
|
<a href="#-永久免费--一个承诺"><img src="https://img.shields.io/badge/%E4%BB%B7%E6%A0%BC-%E6%B0%B8%E4%B9%85%E5%85%8D%E8%B4%B9-2ea44f?style=flat-square" alt="永久免费"></a>
|
||||||
|
<a href="https://github.com/therealMRBK/NextFloor/blob/main/LICENSE"><img src="https://img.shields.io/badge/%E8%AE%B8%E5%8F%AF%E8%AF%81-MIT-blue?style=flat-square" alt="MIT"></a>
|
||||||
|
<a href="#-由-ai-协助构建"><img src="https://img.shields.io/badge/%E6%9E%84%E5%BB%BA%E6%96%B9%E5%BC%8F-AI%20%E5%8D%8F%E5%8A%A9-8a63d2?style=flat-square" alt="由 AI 协助构建"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/demo-live.gif" alt="真实住宅里的 NextFloor:房子旋转,一层展开,房间面板列出它的灯和设备"></p>
|
||||||
|
|
||||||
|
<p align="center">📖 <a href="https://github.com/therealMRBK/NextFloor/blob/main/README.md">English</a> · <b>简体中文</b></p>
|
||||||
|
|
||||||
|
<p align="center">🎬 <a href="https://therealmrbk.github.io/NextFloor/tutorial/">在浏览器里看安装视频,从空白页面开始(45 分钟,英语配音,中/英/德字幕)</a></p>
|
||||||
|
|
||||||
|
<p align="center">📖 <a href="https://github.com/therealMRBK/NextFloor/blob/main/docs/manual.zh-CN.md">中文手册</a> · <a href="https://github.com/therealMRBK/NextFloor/blob/main/docs/manual.md">英文手册</a> · <a href="https://github.com/therealMRBK/NextFloor/blob/main/docs/anleitung.md">Anleitung(德语)</a> · 🗺️ <a href="https://github.com/therealMRBK/NextFloor/blob/main/ROADMAP.md">路线图</a> · 📝 <a href="https://github.com/therealMRBK/NextFloor/blob/main/CHANGELOG.md">更新日志</a></p>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✨ 它能做什么
|
||||||
|
|
||||||
|
| | |
|
||||||
|
|---|---|
|
||||||
|
| ✏️ **平面图编辑器** | 楼层、房间、弧形墙、门窗、异形楼梯、室外区域和屋顶,都在 Home Assistant 里绘制,3D 视图就在平面图旁边。房间内的分区、图层、内侧尺寸、分段墙厚、**通到上层的挑高房间**、可转向的屋顶段、DXF 导入。 |
|
||||||
|
| ✓ **平面图检查** | 一张清单列出缺什么、哪里不对——房间没有区域、设备没放进去、房间重叠、门窗不在墙上、关联的实体已不存在——还有待机耗电设备及其年度电费,每项都能一键修复。新平面图有简短引导,按 `?` 看快捷键表。 |
|
||||||
|
| 📐 **面积与图纸** | 每个房间、每个楼层、整栋房子的居住面积,按德国《居住面积条例》计算;**1:100 的纸质平面图**,带尺寸和面积表,可直接打印或存为 PDF。 |
|
||||||
|
| 🕘 **版本与便签** | 给平面图起名存档(比如"装修前"),会一直保留,可与当前平面图对比;**便签可以钉在某个位置**,带到期日,在 3D 里显示为标记,搜索也能找到。 |
|
||||||
|
| 💡 **实时 3D** | 点击开关、滑动调光、长按换色。多灯泡灯具、卷帘(卷帘、百叶、内遮阳、Somfy *My*)、门窗都跟随对应实体;房间面板列出房间里的一切,场景排在最前。 |
|
||||||
|
| ✨ **灯光设计器** | 把房间的灯存成一个氛围,一键重现,还能套用到另一个房间。 |
|
||||||
|
| 🌡️ **房间气候** | 温度(夏季/冬季色阶)、湿度、CO₂、**发霉风险**和**舒适度评分**的热图,通风提示、低电量、空房间里忘关的灯、每个房间 24 小时温度曲线、会发亮的地暖。 |
|
||||||
|
| ☀️ **每个房间的阳光与用电** | 热图显示每个房间今天透过窗户获得的**日照小时**(依据平面图、朝向和太阳轨迹)和**当前用电功率**;房间面板里还有今日与本月的 kWh 和费用、全年日照、阳光晒热房间时的**遮阳提示**,以及供暖时开窗的提示。 |
|
||||||
|
| ⚡ **能源** | 光伏板阵(含东西向支架)、沿真实线缆路径的功率流动、储能电池电量、燃气与水表、每层独立电表,房屋卡片上显示最近 24 小时和**最近七天**。 |
|
||||||
|
| 🤖 **给自动化用的传感器** | *开着的门窗*和*开着的灯*作为 Home Assistant 传感器,有全屋和每层两种,实体列在属性里。按房间或按楼层**一键全关**,可撤销。 |
|
||||||
|
| 🔥 **热泵与 🖨️ 3D 打印机** | 实时卡片:出水/回水温度、热量与 COP;打印进度、剩余时间、层数、温度与耗材——打印件会在热床上长出来。 |
|
||||||
|
| 🚗 **汽车** | 电量、续航、充电时电流沿充电线从充电桩流向车、出发时间、离家距离、开着的门和后备箱、门锁与空调按钮。 |
|
||||||
|
| 📶 **Wi-Fi 地图** | 每个接入点在本层的覆盖范围、它带的设备,以及哪些网络设备离线。 |
|
||||||
|
| 📅 **今日** | 当天的日程和要收的垃圾桶,做成墙上平板的一张卡片。 |
|
||||||
|
| ⚠️ **告警** | 烟雾、燃气、漏水、报警器(并指出是哪个传感器触发的)、下雨时开着的窗、失联的门磁——还能为任意实体做**你自己的告警**。 |
|
||||||
|
| 📢 **播报** | *"开饭了!"* 只传给该听到的房间,通过它的音箱播,也会显示在每个打开的 NextFloor 屏幕上。 |
|
||||||
|
| 🏡 **家务与庭院** | 垃圾桶、信箱、缺水的植物、只在真实所在房间走动的宠物、扫地机和**割草机器人**按路线工作、喷灌、带水温和水泵的泳池、关联到 Home Assistant 区域的花园、每个房间的 *🧹 清洁*、每个房间对应的配电箱回路。 |
|
||||||
|
| 📺 **媒体** | 电视屏幕带封面和氛围灯;每个音箱和电视都有快捷菜单,含输入源、音量和每个音箱的预设。 |
|
||||||
|
| 🛋️ **家具** | 40 个基础模型和**41 个家具包、近 800 件家具**——季节与装饰、卫浴、音乐、Loft、日式、工坊、车辆、**可放自己照片的相框**——L 形和 U 形沙发、宜家尺寸、按原厂漆色渲染的特斯拉车型。任何家具都能设为"仅当某个辅助实体开启时显示"。 |
|
||||||
|
| 🚶 **漫游与时光回溯** | 以视线高度在屋里走动;回放最近几小时或几天。 |
|
||||||
|
| 🖥️ **为墙上平板准备** | 展示模式支持夜间调暗、星标菜单常开且更大、小屏幕的缩放与固定视角、慢速平板上**画质自动降级**、对比度更高字号更大的**易读模式**。 |
|
||||||
|
| 🎨 **跟随你的主题** | 颜色、字体、圆角都取自 Home Assistant;外观有 *Neon*、*Blueprint*、*Day*,以及实心刷漆墙面。 |
|
||||||
|
| 🧩 **卡片、插件、多语言** | `custom:nextfloor-card` 带可视化编辑器,插件系统带自己的商店,支持九种语言(含**简体中文**)。 |
|
||||||
|
| 🪑 **自己动手做** | **编辑器里的 🛠️ 家具工作室**(带门和抽屉的柜子、搁架、灯具、带屏幕的设备)、[家具构建器](https://therealmrbk.github.io/NextFloor/builder/)和社区商店、自己的 `.glb` 模型、Sweet Home 3D 与 DXF 导入、可被 AI 直接编写的平面图格式——还能把房屋**分享成一个视图文件**,在任何浏览器里打开。 |
|
||||||
|
|
||||||
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/new-0-22.jpg" width="900" alt="0.22 新增:编辑器里的家具工作室、按日照小时的热图与房间面板、平面图检查、带居住面积的纸质平面图"></p>
|
||||||
|
|
||||||
|
<p align="center"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/new-furniture.jpg" width="760" alt="放着自己照片的相框、L 形与 U 形沙发、带实时卡片正在打印的 3D 打印机,以及显示电量家用储能"></p>
|
||||||
|
|
||||||
|
## 💚 永久免费 —— 一个承诺
|
||||||
|
|
||||||
|
NextFloor 是免费的,而且会一直免费。不是"免费试用",不是"免费但 Pro 要钱",也不是"这一版免费":**对所有人、永远免费。** 每一个功能、每一个家具包、每一次更新,发布当天就属于所有人。
|
||||||
|
|
||||||
|
- **没有任何要买的东西。** 没有 Pro 版,没有付费模块,没有逐个售卖的家具包,没有能优先拿到功能的赞助通行证,没有许可证密钥,没有商店。所有东西——窗外天气、能量流动、电视与音箱、汽车、播报、家务与庭院、热泵和 3D 打印机——本来就是 NextFloor 的一部分。
|
||||||
|
- **家具一直在增加,而且免费。** 自带 41 个家具包、近 800 个模型,新家具包会随更新持续到来。
|
||||||
|
- **自己做家具。** [家具构建器](https://therealmrbk.github.io/NextFloor/builder/)在浏览器里运行:做完就能看到它和 NextFloor 里一模一样的样子,还能分享到社区商店,别人一键就能装上。
|
||||||
|
- **自己扩展。** 带审核[插件商店](https://github.com/therealMRBK/NextFloor-Plugins)的[插件系统](https://github.com/therealMRBK/NextFloor/blob/main/docs/plugins.md):新的设备类型、灯光动画、房间卡片——谁都可以做。
|
||||||
|
- **数据留在家里。** 没有账号,没有云端,不上传任何使用数据。
|
||||||
|
- **承诺写进了许可证。** NextFloor 采用 MIT 许可证:任何人都可以阅读、修改和分发。没有人能把它从你手里拿走——包括我。
|
||||||
|
|
||||||
|
我相信开源:任何人都能阅读、修改和分享的软件,每个家庭都能不花一分钱地用。这个信念就是 NextFloor 存在的原因。它起初是 NeonPlan 3D 的一个分支,后来走上自己的路,由这一个承诺支撑,由使用它的人一起塑造。
|
||||||
|
|
||||||
|
## 🖼️ 图集
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-room.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-room.jpg" alt="带面板的实时房间视图"></a><br><sub>带面板的实时房间视图</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/editor.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/editor.jpg" alt="平面图编辑器与旁边的 3D"></a><br><sub>平面图编辑器与旁边的 3D</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-stacked.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-stacked.jpg" alt="楼层叠放"></a><br><sub>楼层叠放</sub></td></tr>
|
||||||
|
<tr><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-energy.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-energy.jpg" alt="能量流动"></a><br><sub>能量流动</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-weather-rain.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-weather-rain.jpg" alt="窗外天气"></a><br><sub>窗外天气</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-media.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-media.jpg" alt="电视屏幕"></a><br><sub>电视屏幕</sub></td></tr>
|
||||||
|
<tr><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-heat.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-heat.jpg" alt="热图"></a><br><sub>热图</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-cut.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-cut.jpg" alt="剖切墙体"></a><br><sub>剖切墙体</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/tablet.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/tablet.jpg" alt="墙上平板"></a><br><sub>墙上平板</sub></td></tr>
|
||||||
|
<tr><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/editor-furniture.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/editor-furniture.jpg" alt="家具库"></a><br><sub>家具库</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/furniture-ikea.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/furniture-ikea.jpg" alt="宜家尺寸"></a><br><sub>宜家尺寸</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/vehicles-tesla.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/vehicles-tesla.jpg" alt="特斯拉车型"></a><br><sub>特斯拉车型</sub></td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-room.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-room.jpg" alt="Neon"></a><br><sub>Neon</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-blueprint.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-blueprint.jpg" alt="Blueprint"></a><br><sub>Blueprint</sub></td><td align="center" width="33%"><a href="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-day.jpg"><img src="https://raw.githubusercontent.com/therealMRBK/NextFloor/main/docs/images/view-day.jpg" alt="Day"></a><br><sub>Day</sub></td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
## 🚀 安装
|
||||||
|
|
||||||
|
**HACS**(推荐)
|
||||||
|
|
||||||
|
1. NextFloor 已进入 **HACS 官方商店**:打开 HACS,搜索 **NextFloor** 并下载(或点上面的 HACS 按钮)。
|
||||||
|
2. 重启 Home Assistant。
|
||||||
|
3. 添加集成:[](https://my.home-assistant.io/redirect/config_flow_start/?domain=nextfloor),或 *设置 → 设备与服务 → 添加集成 → NextFloor*。
|
||||||
|
4. 在侧边栏打开 **NextFloor**,切到**编辑器**,画出你的第一个楼层。
|
||||||
|
|
||||||
|
**之前是通过自定义仓库安装的?** 无需任何更改。NextFloor 现已进入 HACS 官方商店,你的安装、平面图和设置保持不变,更新仍通过 HACS 提供。HACS 刷新列表后会自动把它识别为普通仓库。
|
||||||
|
|
||||||
|
**手动安装:** 把 `custom_components/nextfloor` 复制到 `config/custom_components/` 并重启。需要 Home Assistant 2025.1 或更高版本。
|
||||||
|
|
||||||
|
## 🧩 仪表盘卡片
|
||||||
|
|
||||||
|
所有选项都在卡片的可视化编辑器里。YAML 里也一样:
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>全部选项</summary>
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
type: custom:nextfloor-card
|
||||||
|
floor: floor_ab12cd34 # 可选:只显示某一层(id 来自编辑器)
|
||||||
|
room: room_ab12cd34 # 可选:从这个房间开始
|
||||||
|
height: 420 # 可选:高度(像素)
|
||||||
|
fill: false # 可选:填满仪表盘标题以下的整屏,而不是固定高度
|
||||||
|
walls: auto # 可选:auto | cut
|
||||||
|
explode: true # 可选:在房屋视图里把楼层拉开
|
||||||
|
floor_stack: dim # 可选:打开某层时下面楼层的处理:dim | stacked | single
|
||||||
|
quality: auto # 可选:auto | low | high
|
||||||
|
theme: neon # 可选:neon | blueprint | day
|
||||||
|
accent: "#00e5ff" # 可选:Neon 外观的强调色
|
||||||
|
markers: important # 可选:none | important | all
|
||||||
|
heatmap: none # 可选:none | temperature | humidity | co2 | mould | values | wifi
|
||||||
|
room_panel: true # 可选:点击房间打开详情
|
||||||
|
room_names: true # 可选:3D 里显示房间名
|
||||||
|
controls: true # 可选:卡片里的开关,或 wall、floor、temperature、humidity、co2 的列表
|
||||||
|
floor_thumbs: true # 可选:用楼层缩略图切换楼层
|
||||||
|
fullscreen_button: false
|
||||||
|
stats: false # 可选:性能显示
|
||||||
|
alerts: true # 可选:烟雾、燃气、CO、漏水、报警器,以及下雨时开着的窗,会脉动提示
|
||||||
|
alert_jump: false # 可选:出现新告警时跳到对应房间
|
||||||
|
scenes: true # 可选:所选房间的场景与脚本按钮
|
||||||
|
energy: true # 可选:顶部显示能源数值
|
||||||
|
flows: true # 可选:功率流动线常开(true)或常关(false);留空则显示为开关
|
||||||
|
holograms: true # 可选:实时卡片(能量平衡、汽车、媒体)常开或常关;留空则显示为开关
|
||||||
|
weather: true # 可选:窗外天气
|
||||||
|
weather_entity: weather.home # 可选:用哪个天气实体(默认:按平面图里的设置)
|
||||||
|
idle_return: 0 # 可选:展示模式,无操作多少秒后回到起始视图
|
||||||
|
night: "off" # 可选:展示模式,夜间调暗:off | sun | "22:00-06:00"
|
||||||
|
idle_orbit: false # 可选:展示模式,空闲返回后镜头缓慢转动
|
||||||
|
central_open: false # 可选:星标菜单(收藏)默认展开,且字号更大
|
||||||
|
keep_camera: false # 可选:切换楼层时保持方位、高度和距离
|
||||||
|
readable: false # 可选:更高对比度和更大字号(墙上平板)
|
||||||
|
zoom: 1 # 可选:0.6 … 2.5,自适应视图的拉近程度
|
||||||
|
today: true # 可选:带日程和垃圾桶的「今日」卡片
|
||||||
|
sensor_bar: true # 可选:把你自己的传感器显示在顶部
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## 📦 使用自己的 3D 模型
|
||||||
|
|
||||||
|
有车辆模型(`.glb`)?在 NextFloor 面板里打开**扩展**,选择文件,把车头转向你,选好细节级别,保存到你的 Home Assistant。NextFloor 在浏览器里完成预处理,本身不带任何模型。详见 [docs/models.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/models.md)。
|
||||||
|
|
||||||
|
## 🔒 隐私
|
||||||
|
|
||||||
|
平面图、图片和家具包都存放在 Home Assistant 的 `.storage` 里。NextFloor 不会自行联网;只有当你打开可选的真实地图时,浏览器才会从瓦片服务器加载地图瓦片(默认是 OpenStreetMap)。图片和历史都来自你自己的 Home Assistant。
|
||||||
|
|
||||||
|
## 🤖 由 AI 协助构建
|
||||||
|
|
||||||
|
NextFloor 完全在 AI 协助下构建。想法、决策和在真实住宅里的测试来自一个人;设计、代码、测试和文档是与 [Claude](https://www.anthropic.com/claude)(Anthropic)在 [Claude Code](https://www.anthropic.com/claude-code) 里一起写出来的。我更愿意直接说出来,而不是让你去猜。
|
||||||
|
|
||||||
|
这对你意味着什么:
|
||||||
|
|
||||||
|
- **有测试,但还年轻。** 有自动化测试(前端逻辑、家具包、Home Assistant 后端),每个版本也会在真实浏览器里看、装到真实的 Home Assistant 上,但用户数远少于大多数集成。请预期会有粗糙的地方,并反馈给我们。
|
||||||
|
- **信任它之前先备份。** 平面图保存在 Home Assistant 的 `.storage` 里;编辑器里有整份平面图的备份与恢复。
|
||||||
|
- **在意的话就去读代码。** 它是 MIT 许可,体量小到可以通读。欢迎提交 PR,AI 写的也欢迎,只要说明并跑过检查(见 [CONTRIBUTING.md](https://github.com/therealMRBK/NextFloor/blob/main/CONTRIBUTING.md))。
|
||||||
|
|
||||||
|
## 🛠️ 开发
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>构建、测试、预览</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
npm test # 纯逻辑测试
|
||||||
|
npm run typecheck
|
||||||
|
npm run build # 把 bundle 写到 custom_components/nextfloor/frontend(需提交)
|
||||||
|
npm run screenshot # 用本地 Chrome 或 Chromium 渲染 preview/index.html(虚构的演示数据)
|
||||||
|
```
|
||||||
|
|
||||||
|
- **不装 Home Assistant 也能预览**:用任意本地 Web 服务器打开 `preview/index.html`。
|
||||||
|
- **部署到测试实例**:创建 `deploy.local.json`,内容为 `{"target": "<config>/custom_components/nextfloor"}`,然后在 `frontend/` 里运行 `npm run deploy`。
|
||||||
|
- **Python 测试**在 CI 里用 `pytest-homeassistant-custom-component` 运行。
|
||||||
|
- **家具包**:内置家具包由 `tools/build_packs.py` 生成。自己做的家具包格式见 [docs/packs.md](https://github.com/therealMRBK/NextFloor/blob/main/docs/packs.md)(德语)。
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## 💬 想法、问题与缺陷
|
||||||
|
|
||||||
|
想法和问题请到 [Discussions](https://github.com/therealMRBK/NextFloor/discussions),缺陷请到 [Issues](https://github.com/therealMRBK/NextFloor/issues/new/choose)。
|
||||||
|
|
||||||
|
## 🙏 致谢
|
||||||
|
|
||||||
|
NextFloor 起初是 Mastershort(Torsten)的 [NeonPlan 3D](https://github.com/Mastershort/neonplan3d) 的一个分支。"在 Home Assistant 里拥有一套实时 3D 的家"这个想法,以及 NextFloor 生长所依赖的基础,都是他的。NextFloor 沿着自己的方向把这个想法继续下去:完全免费、开源,面向所有人。谢谢你,Torsten!
|
||||||
|
|
||||||
|
## 许可证
|
||||||
|
|
||||||
|
MIT,见 [LICENSE](https://github.com/therealMRBK/NextFloor/blob/main/LICENSE)。NextFloor 包含 [three.js](https://threejs.org)(MIT)、[Lit](https://lit.dev)(BSD-3-Clause);它们的声明在 [THIRD_PARTY_NOTICES.md](https://github.com/therealMRBK/NextFloor/blob/main/THIRD_PARTY_NOTICES.md) 里。
|
||||||
|
|
||||||
|
"Home Assistant" 是其所有者的商标;"Tesla" 及特斯拉车型名称是 Tesla, Inc. 的商标;"IKEA" 及其产品名称是 Inter IKEA Systems B.V. 的商标;此处仅用于说明尺寸和车型。NextFloor 是独立的社区项目,与 Nabu Casa、Tesla 或 IKEA 没有关联,也未获其背书。
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
# NextFloor – Roadmap
|
||||||
|
|
||||||
|
Ideas for what comes next. There are no fixed dates; everything lands in NextFloor for free. What comes next is mostly decided by the wishes in [Discussions](https://github.com/therealMRBK/NextFloor/discussions) and the [issues](https://github.com/therealMRBK/NextFloor/issues) – vote there or add your own. Everything has to keep running on old, weak wall tablets. What is already done is in the [changelog](https://github.com/therealMRBK/NextFloor/blob/main/CHANGELOG.md).
|
||||||
|
|
||||||
|
*Deutsch weiter unten.*
|
||||||
|
|
||||||
|
| Topic | What it is about |
|
||||||
|
|---|---|
|
||||||
|
| More imports | More plan and scan formats besides JSON, Sweet Home 3D, DXF and IFC (doors and windows from IFC next) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# NextFloor – Roadmap (Deutsch)
|
||||||
|
|
||||||
|
Ideen für das, was als Nächstes kommt. Es gibt keine festen Termine; alles kommt kostenlos in NextFloor. Was als Nächstes kommt, bestimmen vor allem die Wünsche in den [Discussions](https://github.com/therealMRBK/NextFloor/discussions) und den [Issues](https://github.com/therealMRBK/NextFloor/issues) – stimm dort ab oder schreib deinen eigenen. Alles muss weiter auf alten, schwachen Wand-Tablets laufen. Was schon fertig ist, steht im [Changelog](https://github.com/therealMRBK/NextFloor/blob/main/CHANGELOG.md).
|
||||||
|
|
||||||
|
| Thema | Worum es geht |
|
||||||
|
|---|---|
|
||||||
|
| Weitere Importe | Weitere Plan- und Scan-Formate neben JSON, Sweet Home 3D, DXF und IFC (als Nächstes Türen und Fenster aus IFC) |
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
# Security policy
|
||||||
|
|
||||||
|
## Supported versions
|
||||||
|
|
||||||
|
Only the latest release receives fixes. Update through HACS.
|
||||||
|
|
||||||
|
## Reporting a vulnerability
|
||||||
|
|
||||||
|
Please do **not** open a public issue for a security problem. Use GitHub's private reporting instead:
|
||||||
|
[Report a vulnerability](https://github.com/therealMRBK/NextFloor/security/advisories/new).
|
||||||
|
|
||||||
|
Include what you found, the NextFloor and Home Assistant versions and, if you can, how to reproduce it. You get an answer within a few days; a confirmed problem is fixed in a patch release and credited in the changelog unless you prefer otherwise.
|
||||||
|
|
||||||
|
## What NextFloor does and does not do
|
||||||
|
|
||||||
|
- It does not talk to the internet on its own and has no account or cloud part.
|
||||||
|
- Plugins run with the same rights as NextFloor in your browser, so install only plugins whose source you trust (the plugin store pins every file by sha256).
|
||||||
|
- Shared plans and share views are built from an allowlist and carry no entity ids, areas, map position or other data of your home.
|
||||||
File renamed without changes.
@@ -0,0 +1,18 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#16243f"/><stop offset="1" stop-color="#0a1222"/></linearGradient>
|
||||||
|
<linearGradient id="top" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#5fe0ff"/><stop offset="1" stop-color="#2f8bff"/></linearGradient>
|
||||||
|
<linearGradient id="mid" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#8ab6f5"/><stop offset="1" stop-color="#5e8ad6"/></linearGradient>
|
||||||
|
<linearGradient id="low" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#5f7fb6"/><stop offset="1" stop-color="#43608f"/></linearGradient>
|
||||||
|
<filter id="glow" x="-80%" y="-80%" width="260%" height="260%"><feGaussianBlur stdDeviation="9" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter>
|
||||||
|
</defs>
|
||||||
|
<rect width="512" height="512" rx="112" fill="url(#bg)"/>
|
||||||
|
<!-- the next floor, not built yet -->
|
||||||
|
<polygon points="106,150 256,66 406,150 256,234" fill="none" stroke="#5fe0ff" stroke-opacity=".55" stroke-width="7" stroke-dasharray="4 16" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<polygon points="106,382 256,466 256,488 106,404" fill="#34507d"/><polygon points="406,382 256,466 256,488 406,404" fill="#2a4068"/><polygon points="106,382 256,298 406,382 256,466" fill="url(#low)" />
|
||||||
|
<polygon points="106,310 256,394 256,416 106,332" fill="#4a72b8"/><polygon points="406,310 256,394 256,416 406,332" fill="#3b5c98"/><polygon points="106,310 256,226 406,310 256,394" fill="url(#mid)" />
|
||||||
|
<polygon points="106,238 256,322 256,344 106,260" fill="#2a74d8"/><polygon points="406,238 256,322 256,344 406,260" fill="#2161b8"/><polygon points="106,238 256,154 406,238 256,322" fill="url(#top)" />
|
||||||
|
<!-- the light that is on -->
|
||||||
|
<ellipse cx="256" cy="238" rx="40" ry="22" fill="#ffd86b" fill-opacity=".30" filter="url(#glow)"/>
|
||||||
|
<circle cx="256" cy="236" r="14" fill="#ffe08a" filter="url(#glow)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,22 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Mastershort
|
||||||
|
Copyright (c) 2026 therealMRBK
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
# Third-party notices
|
||||||
|
|
||||||
|
NextFloor ships the following third-party software inside its bundles
|
||||||
|
(`custom_components/nextfloor/frontend/`). Their licence texts are reproduced here, as they require.
|
||||||
|
|
||||||
|
NextFloor itself is released under the MIT licence (see `LICENSE`).
|
||||||
|
|
||||||
|
## three.js 0.186.1 (MIT)
|
||||||
|
|
||||||
|
<https://threejs.org>
|
||||||
|
|
||||||
|
```
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright © 2010-2026 three.js authors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Lit 3.3.3 (BSD-3-Clause)
|
||||||
|
|
||||||
|
Includes `lit-html` 3.3.3, `lit-element` 4.2.2 and `@lit/reactive-element` 2.1.2, all by Google LLC under the same licence.
|
||||||
|
|
||||||
|
<https://lit.dev>
|
||||||
|
|
||||||
|
```
|
||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2017 Google LLC. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build and development tools
|
||||||
|
|
||||||
|
TypeScript (Apache-2.0), esbuild (MIT) and puppeteer-core (Apache-2.0) are used to build and test the project.
|
||||||
|
They are not part of what is distributed.
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
"""NextFloor: draw your home in Home Assistant and control it in 3D."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import hashlib
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from homeassistant.components import frontend, panel_custom
|
||||||
|
from homeassistant.components.http import StaticPathConfig
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.const import Platform
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
from homeassistant.loader import async_get_integration
|
||||||
|
|
||||||
|
from .announce import async_register_announce
|
||||||
|
from .card_resource import async_remove_card_resource, async_schedule_card_resource
|
||||||
|
from .const import (
|
||||||
|
DOMAIN,
|
||||||
|
MAIN_BUNDLE,
|
||||||
|
PANEL_COMPONENT,
|
||||||
|
PANEL_ICON,
|
||||||
|
PANEL_TITLE,
|
||||||
|
PANEL_URL_PATH,
|
||||||
|
URL_BASE,
|
||||||
|
)
|
||||||
|
from .meshes import async_register_mesh_view
|
||||||
|
from .storage import NextFloorData
|
||||||
|
from .store_notice import async_notify_official_store
|
||||||
|
from .websocket import async_register_commands
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
_STATIC_REGISTERED = f"{DOMAIN}_static_registered"
|
||||||
|
# sensors from the plan: open windows and doors, lights on (per floor and for the house)
|
||||||
|
PLATFORMS = [Platform.SENSOR]
|
||||||
|
|
||||||
|
|
||||||
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
|
"""Register the websocket commands and the actions once."""
|
||||||
|
async_register_commands(hass)
|
||||||
|
async_register_mesh_view(hass)
|
||||||
|
async_register_announce(hass)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
_MAIN_URL = f"{DOMAIN}_main_url"
|
||||||
|
|
||||||
|
|
||||||
|
def _bundle_hash() -> str:
|
||||||
|
"""A short hash of the main bundle: a rebuilt bundle gets a new URL even when the version stays."""
|
||||||
|
path = Path(__file__).parent / "frontend" / MAIN_BUNDLE
|
||||||
|
try:
|
||||||
|
return hashlib.sha256(path.read_bytes()).hexdigest()[:10]
|
||||||
|
except OSError:
|
||||||
|
return "0"
|
||||||
|
|
||||||
|
|
||||||
|
async def _async_main_url(hass: HomeAssistant) -> str:
|
||||||
|
# computed once per run, so adding and removing the script use the same URL
|
||||||
|
if url := hass.data.get(_MAIN_URL):
|
||||||
|
return url
|
||||||
|
integration = await async_get_integration(hass, DOMAIN)
|
||||||
|
digest = await hass.async_add_executor_job(_bundle_hash)
|
||||||
|
url = f"{URL_BASE}/{MAIN_BUNDLE}?v={integration.version}-{digest}"
|
||||||
|
hass.data[_MAIN_URL] = url
|
||||||
|
return url
|
||||||
|
|
||||||
|
|
||||||
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
|
"""Load the stores and register the frontend (panel and card)."""
|
||||||
|
data = NextFloorData(hass)
|
||||||
|
await data.async_load()
|
||||||
|
hass.data[DOMAIN] = data
|
||||||
|
|
||||||
|
# static paths cannot be unregistered, so they are registered once per run
|
||||||
|
if not hass.data.get(_STATIC_REGISTERED):
|
||||||
|
await hass.http.async_register_static_paths(
|
||||||
|
[StaticPathConfig(URL_BASE, str(Path(__file__).parent / "frontend"), cache_headers=False)]
|
||||||
|
)
|
||||||
|
hass.data[_STATIC_REGISTERED] = True
|
||||||
|
|
||||||
|
url = await _async_main_url(hass)
|
||||||
|
frontend.add_extra_js_url(hass, url)
|
||||||
|
# and as a dashboard resource, so a dashboard never draws the card before its script is there (#252)
|
||||||
|
async_schedule_card_resource(hass, url)
|
||||||
|
await panel_custom.async_register_panel(
|
||||||
|
hass,
|
||||||
|
frontend_url_path=PANEL_URL_PATH,
|
||||||
|
webcomponent_name=PANEL_COMPONENT,
|
||||||
|
sidebar_title=PANEL_TITLE,
|
||||||
|
sidebar_icon=PANEL_ICON,
|
||||||
|
module_url=url,
|
||||||
|
require_admin=False,
|
||||||
|
config={},
|
||||||
|
)
|
||||||
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
|
await async_notify_official_store(hass, entry)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
|
"""Remove panel, card and sensors."""
|
||||||
|
await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||||
|
frontend.async_remove_panel(hass, PANEL_URL_PATH)
|
||||||
|
frontend.remove_extra_js_url(hass, await _async_main_url(hass))
|
||||||
|
hass.data.pop(DOMAIN, None)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||||
|
"""The plan, its pictures and packs stay in .storage when the integration is removed: they are the
|
||||||
|
user's work, and removing and re-adding the integration must never cost it."""
|
||||||
|
await async_remove_card_resource(hass)
|
||||||
@@ -0,0 +1,347 @@
|
|||||||
|
"""Announcements: the action nextfloor.announce speaks a message in rooms of the plan and on the open NextFloor screens.
|
||||||
|
|
||||||
|
Each room speaks through its own speaker: the one chosen for the room in the plan, else one placed in the room, else
|
||||||
|
one of the room's area. A voice satellite announces with its chime, an Echo through its announce entity (Alexa Devices)
|
||||||
|
or as an announcement (Alexa Media Player), a speaker that can announce (Sonos and others) lowers its music for it, any
|
||||||
|
other speaker plays it through text-to-speech. TVs and speakers that are off are never picked by themselves. Rooms
|
||||||
|
with a quiet time are left out while it runs, unless the announcement names only that room.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from datetime import time as dtime
|
||||||
|
import logging
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from homeassistant.core import HomeAssistant, ServiceCall, SupportsResponse, callback
|
||||||
|
from homeassistant.exceptions import ServiceValidationError
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
|
from homeassistant.helpers import device_registry as dr
|
||||||
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
|
from homeassistant.util import dt as dt_util
|
||||||
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from .const import DOMAIN, SIGNAL_ANNOUNCE
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
SERVICE_ANNOUNCE = "announce"
|
||||||
|
|
||||||
|
ANNOUNCE_SCHEMA = vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("message"): vol.All(cv.string, vol.Length(min=1, max=500)),
|
||||||
|
# rooms by name, room id or area id; none and no floor: every room with a speaker
|
||||||
|
vol.Optional("rooms"): vol.All(cv.ensure_list, [cv.string]),
|
||||||
|
vol.Optional("floor"): cv.string,
|
||||||
|
vol.Optional("on_speakers", default=True): cv.boolean,
|
||||||
|
vol.Optional("on_screens", default=True): cv.boolean,
|
||||||
|
# only the NextFloor screens with these names (set on each screen); none: every screen
|
||||||
|
vol.Optional("screens"): vol.All(cv.ensure_list, [cv.string]),
|
||||||
|
# a text-to-speech entity instead of the one chosen in the plan (or the first one)
|
||||||
|
vol.Optional("tts_entity"): cv.entity_id,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
_TV_CLASSES = {"tv"}
|
||||||
|
# MediaPlayerEntityFeature.MEDIA_ANNOUNCE: the speaker lowers what it plays for the announcement and carries on after
|
||||||
|
_MEDIA_ANNOUNCE = 1048576
|
||||||
|
|
||||||
|
|
||||||
|
class NoSpeech(Exception):
|
||||||
|
"""A speaker that needs text-to-speech while there is no text-to-speech entity."""
|
||||||
|
|
||||||
|
|
||||||
|
def _point_in(points: list[list[float]], x: float, z: float) -> bool:
|
||||||
|
"""Ray casting: whether (x, z) lies inside the polygon."""
|
||||||
|
inside = False
|
||||||
|
j = len(points) - 1
|
||||||
|
for i, (xi, zi) in enumerate(points):
|
||||||
|
xj, zj = points[j]
|
||||||
|
if (zi > z) != (zj > z) and x < (xj - xi) * (z - zi) / ((zj - zi) or 1e-12) + xi:
|
||||||
|
inside = not inside
|
||||||
|
j = i
|
||||||
|
return inside
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_time(text: Any) -> dtime | None:
|
||||||
|
try:
|
||||||
|
hours, minutes = str(text).split(":")[:2]
|
||||||
|
return dtime(int(hours), int(minutes))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def in_quiet_time(room: dict[str, Any], now: dtime) -> bool:
|
||||||
|
"""Whether the room's quiet time runs at `now` (a time span over midnight works too)."""
|
||||||
|
quiet = room.get("announce_quiet") or {}
|
||||||
|
start, end = _parse_time(quiet.get("from")), _parse_time(quiet.get("to"))
|
||||||
|
if start is None or end is None or start == end:
|
||||||
|
return False
|
||||||
|
return start <= now < end if start < end else now >= start or now < end
|
||||||
|
|
||||||
|
|
||||||
|
def _matches(room: dict[str, Any], wanted: str) -> bool:
|
||||||
|
key = wanted.strip().casefold()
|
||||||
|
return key in (
|
||||||
|
str(room.get("id", "")).casefold(),
|
||||||
|
str(room.get("area_id") or "").casefold(),
|
||||||
|
str(room.get("name", "")).strip().casefold(),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def target_rooms(
|
||||||
|
building: dict[str, Any], rooms: list[str] | None, floor: str | None
|
||||||
|
) -> tuple[list[tuple[dict, dict]], bool]:
|
||||||
|
"""The (floor, room) pairs an announcement goes to, and whether exactly the rooms asked for were named."""
|
||||||
|
pairs = [(f, r) for f in building.get("floors", []) for r in f.get("rooms", [])]
|
||||||
|
if floor:
|
||||||
|
key = floor.strip().casefold()
|
||||||
|
pairs = [
|
||||||
|
(f, r)
|
||||||
|
for f, r in pairs
|
||||||
|
if key
|
||||||
|
in (
|
||||||
|
str(f.get("id", "")).casefold(),
|
||||||
|
str(f.get("name", "")).strip().casefold(),
|
||||||
|
str(f.get("ha_floor") or "").casefold(),
|
||||||
|
)
|
||||||
|
]
|
||||||
|
if rooms:
|
||||||
|
pairs = [(f, r) for f, r in pairs if any(_matches(r, w) for w in rooms)]
|
||||||
|
return pairs, True
|
||||||
|
return pairs, False
|
||||||
|
|
||||||
|
|
||||||
|
def _area_entities(hass: HomeAssistant, area_id: str | None) -> list[str]:
|
||||||
|
if not area_id:
|
||||||
|
return []
|
||||||
|
ent_reg = er.async_get(hass)
|
||||||
|
dev_reg = dr.async_get(hass)
|
||||||
|
found = []
|
||||||
|
for entry in ent_reg.entities.values():
|
||||||
|
if entry.disabled_by or entry.hidden_by:
|
||||||
|
continue
|
||||||
|
area = entry.area_id
|
||||||
|
if area is None and entry.device_id and (device := dev_reg.async_get(entry.device_id)):
|
||||||
|
area = device.area_id
|
||||||
|
if area == area_id:
|
||||||
|
found.append(entry.entity_id)
|
||||||
|
return found
|
||||||
|
|
||||||
|
|
||||||
|
def _is_echo_announce(hass: HomeAssistant, entity_id: str) -> bool:
|
||||||
|
"""The announce entity of an Echo (Alexa Devices: a notify entity whose unique id ends in "-announce")."""
|
||||||
|
if not entity_id.startswith("notify."):
|
||||||
|
return False
|
||||||
|
entry = er.async_get(hass).async_get(entity_id)
|
||||||
|
return entry is not None and str(entry.unique_id).endswith("-announce")
|
||||||
|
|
||||||
|
|
||||||
|
def _usable_speaker(hass: HomeAssistant, entity_id: str) -> bool:
|
||||||
|
"""A speaker that may be picked by itself: no TV, not off or gone. An Echo's announce entity has no state to ask."""
|
||||||
|
st = hass.states.get(entity_id)
|
||||||
|
if st is None or st.state == "unavailable":
|
||||||
|
return False
|
||||||
|
if entity_id.startswith("notify."):
|
||||||
|
return _is_echo_announce(hass, entity_id)
|
||||||
|
if st.state in ("off", "unknown"):
|
||||||
|
return False
|
||||||
|
return st.attributes.get("device_class") not in _TV_CLASSES
|
||||||
|
|
||||||
|
|
||||||
|
def room_speaker(hass: HomeAssistant, floor: dict[str, Any], room: dict[str, Any]) -> str | None:
|
||||||
|
"""A room's speaker: chosen in the plan, else placed in the room, else a voice satellite or speaker of its area."""
|
||||||
|
chosen = room.get("announce_speaker")
|
||||||
|
if chosen == "none":
|
||||||
|
return None
|
||||||
|
if chosen:
|
||||||
|
return chosen
|
||||||
|
points = room.get("points") or []
|
||||||
|
if len(points) >= 3:
|
||||||
|
placed = [
|
||||||
|
p["entity_id"]
|
||||||
|
for p in floor.get("placements", [])
|
||||||
|
if str(p.get("entity_id", "")).startswith(("media_player.", "assist_satellite."))
|
||||||
|
and _point_in(points, float(p.get("x", 0)), float(p.get("z", 0)))
|
||||||
|
]
|
||||||
|
placed += [
|
||||||
|
f["entity"]
|
||||||
|
for f in floor.get("furniture", [])
|
||||||
|
if str(f.get("entity") or "").startswith(("media_player.", "assist_satellite."))
|
||||||
|
and _point_in(points, float(f.get("x", 0)), float(f.get("z", 0)))
|
||||||
|
]
|
||||||
|
for entity_id in placed:
|
||||||
|
if _usable_speaker(hass, entity_id):
|
||||||
|
return entity_id
|
||||||
|
area = _area_entities(hass, room.get("area_id"))
|
||||||
|
for domain in ("assist_satellite.", "notify.", "media_player."):
|
||||||
|
for entity_id in sorted(e for e in area if e.startswith(domain)):
|
||||||
|
if _usable_speaker(hass, entity_id):
|
||||||
|
return entity_id
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _announce_entity(hass: HomeAssistant, media_player: str) -> str | None:
|
||||||
|
"""The announce entity of the same device (an Echo of the Alexa Devices integration)."""
|
||||||
|
ent_reg = er.async_get(hass)
|
||||||
|
entry = ent_reg.async_get(media_player)
|
||||||
|
if entry is None or entry.device_id is None:
|
||||||
|
return None
|
||||||
|
for other in er.async_entries_for_device(ent_reg, entry.device_id):
|
||||||
|
if other.domain == "notify" and str(other.unique_id).endswith("-announce"):
|
||||||
|
return other.entity_id
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _platform(hass: HomeAssistant, entity_id: str) -> str | None:
|
||||||
|
entry = er.async_get(hass).async_get(entity_id)
|
||||||
|
return entry.platform if entry else None
|
||||||
|
|
||||||
|
|
||||||
|
def _tts_entity(hass: HomeAssistant, building: dict[str, Any], wanted: str | None) -> str | None:
|
||||||
|
"""The text-to-speech entity: asked for, chosen in the plan, else the first one."""
|
||||||
|
for candidate in (wanted, (building.get("settings") or {}).get("announce_tts")):
|
||||||
|
if candidate and candidate != "none" and hass.states.get(candidate):
|
||||||
|
return candidate
|
||||||
|
entities = sorted(hass.states.async_entity_ids("tts"))
|
||||||
|
return entities[0] if entities else None
|
||||||
|
|
||||||
|
|
||||||
|
async def _speak(hass: HomeAssistant, speaker: str, message: str, tts: str | None) -> str:
|
||||||
|
"""Say the message on one speaker; returns how (for the response). Raises NoSpeech when it needs text-to-speech."""
|
||||||
|
if speaker.startswith("assist_satellite."):
|
||||||
|
await hass.services.async_call(
|
||||||
|
"assist_satellite", "announce", {"entity_id": speaker, "message": message}, blocking=True
|
||||||
|
)
|
||||||
|
return "satellite"
|
||||||
|
announce = speaker if speaker.startswith("notify.") else _announce_entity(hass, speaker)
|
||||||
|
if announce:
|
||||||
|
await hass.services.async_call(
|
||||||
|
"notify", "send_message", {"entity_id": announce, "message": message}, blocking=True
|
||||||
|
)
|
||||||
|
return "echo"
|
||||||
|
if _platform(hass, speaker) == "alexa_media" and hass.services.has_service("notify", "alexa_media"):
|
||||||
|
await hass.services.async_call(
|
||||||
|
"notify",
|
||||||
|
"alexa_media",
|
||||||
|
{"message": message, "target": [speaker], "data": {"type": "announce"}},
|
||||||
|
blocking=True,
|
||||||
|
)
|
||||||
|
return "echo"
|
||||||
|
if tts is None:
|
||||||
|
raise NoSpeech
|
||||||
|
st = hass.states.get(speaker)
|
||||||
|
features = int(st.attributes.get("supported_features", 0)) if st else 0
|
||||||
|
if features & _MEDIA_ANNOUNCE:
|
||||||
|
media_id = tts_media_id(hass, message, tts)
|
||||||
|
await hass.services.async_call(
|
||||||
|
"media_player",
|
||||||
|
"play_media",
|
||||||
|
{"entity_id": speaker, "media_content_id": media_id, "media_content_type": "music", "announce": True},
|
||||||
|
blocking=True,
|
||||||
|
)
|
||||||
|
return "announce"
|
||||||
|
await hass.services.async_call(
|
||||||
|
"tts",
|
||||||
|
"speak",
|
||||||
|
{"entity_id": tts, "media_player_entity_id": speaker, "message": message, "cache": True},
|
||||||
|
blocking=True,
|
||||||
|
)
|
||||||
|
return "tts"
|
||||||
|
|
||||||
|
|
||||||
|
def tts_media_id(hass: HomeAssistant, message: str, tts: str) -> str:
|
||||||
|
"""The media source id of the spoken message (text-to-speech is loaded only when it is needed)."""
|
||||||
|
from homeassistant.components.tts import generate_media_source_id
|
||||||
|
|
||||||
|
return generate_media_source_id(hass, message, engine=tts, cache=True)
|
||||||
|
|
||||||
|
|
||||||
|
async def screen_audio(hass: HomeAssistant, tts: str | None, message: str) -> str | None:
|
||||||
|
"""A URL with the spoken message for the screens (None: they speak with the browser's own voice)."""
|
||||||
|
if tts is None:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
from homeassistant.components import media_source
|
||||||
|
|
||||||
|
resolved = await media_source.async_resolve_media(hass, tts_media_id(hass, message, tts), None)
|
||||||
|
except Exception as err: # any engine error just leaves the screens to the browser's voice
|
||||||
|
_LOGGER.debug("No text-to-speech audio for the screens: %s", err)
|
||||||
|
return None
|
||||||
|
return resolved.url
|
||||||
|
|
||||||
|
|
||||||
|
async def async_announce(hass: HomeAssistant, building: dict[str, Any], data: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
"""Speak an announcement on the rooms' speakers and send it to the NextFloor screens."""
|
||||||
|
message: str = data["message"]
|
||||||
|
tts = _tts_entity(hass, building, data.get("tts_entity"))
|
||||||
|
spoken: dict[str, str] = {}
|
||||||
|
skipped: dict[str, str] = {}
|
||||||
|
if data.get("on_speakers", True):
|
||||||
|
pairs, named = target_rooms(building, data.get("rooms"), data.get("floor"))
|
||||||
|
if data.get("rooms") and not pairs:
|
||||||
|
raise ServiceValidationError(translation_domain=DOMAIN, translation_key="no_rooms")
|
||||||
|
now = dt_util.now().time()
|
||||||
|
done: set[str] = set()
|
||||||
|
for floor, room in pairs:
|
||||||
|
name = room.get("name") or room.get("id", "")
|
||||||
|
# a quiet room only hears what is meant for it alone
|
||||||
|
if in_quiet_time(room, now) and not (named and len(pairs) == 1):
|
||||||
|
skipped[name] = "quiet"
|
||||||
|
continue
|
||||||
|
speaker = room_speaker(hass, floor, room)
|
||||||
|
if speaker is None:
|
||||||
|
if named:
|
||||||
|
skipped[name] = "no_speaker"
|
||||||
|
continue
|
||||||
|
if speaker in done:
|
||||||
|
continue
|
||||||
|
done.add(speaker)
|
||||||
|
try:
|
||||||
|
spoken[speaker] = await _speak(hass, speaker, message, tts)
|
||||||
|
except NoSpeech:
|
||||||
|
skipped[name] = "no_tts"
|
||||||
|
except Exception as err: # one speaker failing must not stop the others
|
||||||
|
_LOGGER.warning("Announcement on %s failed: %s", speaker, err)
|
||||||
|
skipped[name] = "failed"
|
||||||
|
on_screens = bool(data.get("on_screens", True))
|
||||||
|
if on_screens:
|
||||||
|
audio = await screen_audio(hass, tts, message)
|
||||||
|
payload = {
|
||||||
|
"message": message,
|
||||||
|
"screens": data.get("screens") or [],
|
||||||
|
"audio": audio,
|
||||||
|
"time": dt_util.utcnow().isoformat(),
|
||||||
|
}
|
||||||
|
async_dispatcher_send(hass, SIGNAL_ANNOUNCE, payload)
|
||||||
|
# nobody heard it because no speaker could talk: say why instead of failing silently
|
||||||
|
if not spoken and not on_screens and skipped and all(why == "no_tts" for why in skipped.values()):
|
||||||
|
raise ServiceValidationError(translation_domain=DOMAIN, translation_key="no_tts")
|
||||||
|
return {"speakers": spoken, "skipped": skipped, "screens": on_screens}
|
||||||
|
|
||||||
|
|
||||||
|
RELOAD_SCHEMA = vol.Schema({vol.Optional("template"): vol.All(cv.string, vol.Length(max=64))})
|
||||||
|
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def async_register_announce(hass: HomeAssistant) -> None:
|
||||||
|
"""Register the actions nextfloor.announce and nextfloor.reload_screens."""
|
||||||
|
|
||||||
|
async def reload_screens(call: ServiceCall) -> None:
|
||||||
|
# the open screens load their page again, some seconds apart; with a template only the cards that use it
|
||||||
|
payload = {"reload": True, "template": call.data.get("template"), "time": dt_util.utcnow().isoformat()}
|
||||||
|
async_dispatcher_send(hass, SIGNAL_ANNOUNCE, payload)
|
||||||
|
|
||||||
|
hass.services.async_register(DOMAIN, "reload_screens", reload_screens, schema=RELOAD_SCHEMA)
|
||||||
|
|
||||||
|
async def handle(call: ServiceCall) -> dict[str, Any] | None:
|
||||||
|
data = hass.data.get(DOMAIN)
|
||||||
|
if data is None:
|
||||||
|
raise ServiceValidationError(translation_domain=DOMAIN, translation_key="not_loaded")
|
||||||
|
result = await async_announce(hass, data.building, call.data)
|
||||||
|
return result if call.return_response else None
|
||||||
|
|
||||||
|
hass.services.async_register(
|
||||||
|
DOMAIN, SERVICE_ANNOUNCE, handle, schema=ANNOUNCE_SCHEMA, supports_response=SupportsResponse.OPTIONAL
|
||||||
|
)
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
"""Locate a Bluetooth tag by room, learned by walking.
|
||||||
|
|
||||||
|
Every Bluetooth scanner Home Assistant knows (ESPHome Bluetooth proxies, Shelly devices with Bluetooth scanning on, the
|
||||||
|
host's own adapters) hears a tag with a different signal strength. While you walk from room to room with the tag, the
|
||||||
|
editor records that pattern per room (a fingerprint). Later the current pattern is compared with the fingerprints and
|
||||||
|
the nearest room wins. Nothing here talks to the tag; it only reads what the scanners already report.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Iterable, Mapping
|
||||||
|
import math
|
||||||
|
import statistics
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
# a scanner that does not hear the tag counts as this (dBm); differences are capped, so one odd scanner cannot decide
|
||||||
|
MISSING = -100.0
|
||||||
|
MAX_DIFF = 40.0
|
||||||
|
# above this distance (RMS over the scanners, in dB) no room is a good match
|
||||||
|
UNKNOWN_DISTANCE = 18.0
|
||||||
|
# a new room has to win this many readings in a row before the sensor switches
|
||||||
|
SWITCH_VOTES = 3
|
||||||
|
|
||||||
|
Reading = Mapping[str, float]
|
||||||
|
|
||||||
|
|
||||||
|
def distance(a: Reading, b: Reading) -> float:
|
||||||
|
"""The distance between two signal patterns: RMS of the per-scanner differences in dB."""
|
||||||
|
keys = set(a) | set(b)
|
||||||
|
if not keys:
|
||||||
|
return math.inf
|
||||||
|
total = sum(min(abs(a.get(k, MISSING) - b.get(k, MISSING)), MAX_DIFF) ** 2 for k in keys)
|
||||||
|
return math.sqrt(total / len(keys))
|
||||||
|
|
||||||
|
|
||||||
|
def locate(prints: Iterable[Mapping[str, Any]], reading: Reading) -> tuple[str | None, float, float]:
|
||||||
|
"""The room that fits a reading best: (room id, its distance in dB, how far the runner-up is behind).
|
||||||
|
|
||||||
|
`prints` are {"room": id, "rssi": {scanner: dBm}}; a room may have several (one per spot you recorded there).
|
||||||
|
No room is returned when nothing is heard or no fingerprint is close enough.
|
||||||
|
"""
|
||||||
|
if not reading:
|
||||||
|
return None, math.inf, 0.0
|
||||||
|
best: dict[str, float] = {}
|
||||||
|
for fp in prints:
|
||||||
|
d = distance(fp.get("rssi") or {}, reading)
|
||||||
|
room = fp.get("room")
|
||||||
|
if isinstance(room, str) and d < best.get(room, math.inf):
|
||||||
|
best[room] = d
|
||||||
|
if not best:
|
||||||
|
return None, math.inf, 0.0
|
||||||
|
ranked = sorted(best.items(), key=lambda kv: kv[1])
|
||||||
|
room, dist = ranked[0]
|
||||||
|
if dist > UNKNOWN_DISTANCE:
|
||||||
|
return None, dist, 0.0
|
||||||
|
margin = ranked[1][1] - dist if len(ranked) > 1 else UNKNOWN_DISTANCE
|
||||||
|
return room, dist, margin
|
||||||
|
|
||||||
|
|
||||||
|
def median_reading(samples: Iterable[Reading]) -> dict[str, float]:
|
||||||
|
"""The median signal per scanner over several samples. A scanner that missed the tag in most samples is left out."""
|
||||||
|
samples = list(samples)
|
||||||
|
if not samples:
|
||||||
|
return {}
|
||||||
|
out: dict[str, float] = {}
|
||||||
|
for key in {k for s in samples for k in s}:
|
||||||
|
values = [s[key] for s in samples if key in s]
|
||||||
|
if len(values) * 2 > len(samples):
|
||||||
|
out[key] = round(statistics.median(values), 1)
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
class Smoother:
|
||||||
|
"""Keeps the answer from flickering: a different room has to win several readings in a row."""
|
||||||
|
|
||||||
|
def __init__(self, votes: int = SWITCH_VOTES) -> None:
|
||||||
|
self.votes = votes
|
||||||
|
self.room: str | None = None
|
||||||
|
self._candidate: str | None = None
|
||||||
|
self._count = 0
|
||||||
|
|
||||||
|
def update(self, room: str | None) -> str | None:
|
||||||
|
"""Take one reading's room and return the room to show."""
|
||||||
|
if room == self.room:
|
||||||
|
self._candidate, self._count = None, 0
|
||||||
|
return self.room
|
||||||
|
if room == self._candidate:
|
||||||
|
self._count += 1
|
||||||
|
else:
|
||||||
|
self._candidate, self._count = room, 1
|
||||||
|
if self._count >= self.votes:
|
||||||
|
self.room, self._candidate, self._count = room, None, 0
|
||||||
|
return self.room
|
||||||
|
|
||||||
|
|
||||||
|
def smooth_reading(history: list[dict[str, float]], reading: Reading, size: int = 5) -> dict[str, float]:
|
||||||
|
"""Adds a reading to the history (newest last, `size` kept) and returns the median over it."""
|
||||||
|
history.append(dict(reading))
|
||||||
|
del history[:-size]
|
||||||
|
return median_reading(history)
|
||||||
|
|
||||||
|
|
||||||
|
def rooms_of(building: Mapping[str, Any]) -> dict[str, dict[str, str]]:
|
||||||
|
"""Room id -> {"name", "floor"} of every room of the plan."""
|
||||||
|
out: dict[str, dict[str, str]] = {}
|
||||||
|
for floor in building.get("floors", []):
|
||||||
|
for room in floor.get("rooms", []):
|
||||||
|
out[room["id"]] = {"name": room.get("name") or room["id"], "floor": floor.get("name") or floor["id"]}
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def tags_of(building: Mapping[str, Any]) -> list[dict[str, Any]]:
|
||||||
|
"""The Bluetooth tags set up in the plan."""
|
||||||
|
ble = building.get("settings", {}).get("ble") or {}
|
||||||
|
return list(ble.get("tags") or [])
|
||||||
|
|
||||||
|
|
||||||
|
# --- Home Assistant side ---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
def available(hass: HomeAssistant) -> bool:
|
||||||
|
"""Whether Home Assistant's Bluetooth integration is running."""
|
||||||
|
return "bluetooth" in hass.config.components
|
||||||
|
|
||||||
|
|
||||||
|
def tag_address(hass: HomeAssistant, tag: Mapping[str, Any]) -> str | None:
|
||||||
|
"""The address to listen for: the fixed one, or the current one of a Private BLE Device tracker."""
|
||||||
|
if entity := tag.get("entity"):
|
||||||
|
state = hass.states.get(entity)
|
||||||
|
current = state.attributes.get("current_address") if state else None
|
||||||
|
return str(current).upper() if current else None
|
||||||
|
address = tag.get("address")
|
||||||
|
return str(address).upper() if address else None
|
||||||
|
|
||||||
|
|
||||||
|
def scanner_readings(hass: HomeAssistant, address: str) -> dict[str, tuple[str, float]]:
|
||||||
|
"""What every scanner last heard of an address: source -> (scanner name, RSSI in dBm)."""
|
||||||
|
if not available(hass):
|
||||||
|
return {}
|
||||||
|
from homeassistant.components import bluetooth # imported late: Bluetooth is optional
|
||||||
|
|
||||||
|
out: dict[str, tuple[str, float]] = {}
|
||||||
|
for device in bluetooth.async_scanner_devices_by_address(hass, address.upper(), False):
|
||||||
|
rssi = device.advertisement.rssi
|
||||||
|
if rssi is not None and rssi > -127:
|
||||||
|
out[device.scanner.source] = (device.scanner.name, float(rssi))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def discovered(hass: HomeAssistant, limit: int = 80) -> dict[str, Any]:
|
||||||
|
"""The scanners and the devices they hear, strongest first, for choosing a tag in the editor."""
|
||||||
|
if not available(hass):
|
||||||
|
return {"available": False, "scanners": [], "devices": []}
|
||||||
|
from homeassistant.components import bluetooth
|
||||||
|
|
||||||
|
scanners = [{"source": s.source, "name": s.name} for s in bluetooth.async_current_scanners(hass)]
|
||||||
|
seen: dict[str, dict[str, Any]] = {}
|
||||||
|
for info in bluetooth.async_discovered_service_info(hass, False):
|
||||||
|
row = seen.setdefault(info.address, {"address": info.address, "name": info.name, "rssi": -200, "named": False})
|
||||||
|
row["rssi"] = max(row["rssi"], info.rssi)
|
||||||
|
# a device without a name shows up with its address as the name
|
||||||
|
row["named"] = info.name != info.address
|
||||||
|
row["name"] = info.name
|
||||||
|
devices = sorted(seen.values(), key=lambda r: (not r["named"], -r["rssi"]))[:limit]
|
||||||
|
return {"available": True, "scanners": scanners, "devices": devices}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
@@ -0,0 +1,83 @@
|
|||||||
|
"""The dashboard card as a Lovelace resource.
|
||||||
|
|
||||||
|
The main bundle is also loaded as an extra frontend module, but in the companion app a dashboard may be drawn
|
||||||
|
before that module has arrived; the card then stays "Custom element doesn't exist: nextfloor-card" until the
|
||||||
|
sidebar page is opened (#252). Lovelace waits for its resources before it draws cards, so the card's bundle is
|
||||||
|
kept in the resource list as well, in storage mode only (YAML resources belong to the user).
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import logging
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from homeassistant.const import EVENT_HOMEASSISTANT_STARTED
|
||||||
|
from homeassistant.core import CoreState, Event, HomeAssistant
|
||||||
|
|
||||||
|
from .const import MAIN_BUNDLE, URL_BASE
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def _resources(hass: HomeAssistant) -> Any | None:
|
||||||
|
"""Lovelace's resource collection when it can be changed (storage mode), else None."""
|
||||||
|
data = hass.data.get("lovelace")
|
||||||
|
if data is None:
|
||||||
|
return None
|
||||||
|
# since 2025.2 a LovelaceData object, before a dict
|
||||||
|
resources = data.get("resources") if isinstance(data, dict) else getattr(data, "resources", None)
|
||||||
|
if resources is None or not hasattr(resources, "async_create_item"):
|
||||||
|
return None
|
||||||
|
return resources
|
||||||
|
|
||||||
|
|
||||||
|
def _is_ours(url: str) -> bool:
|
||||||
|
"""A resource that loads our main bundle: ours, or an older copy of it (another path, an old hand install)."""
|
||||||
|
return url.split("?")[0].endswith(f"/{MAIN_BUNDLE}")
|
||||||
|
|
||||||
|
|
||||||
|
async def async_ensure_card_resource(hass: HomeAssistant, url: str) -> None:
|
||||||
|
"""Keep exactly our current bundle URL in the dashboard resources (added once, updated after an update)."""
|
||||||
|
resources = _resources(hass)
|
||||||
|
if resources is None:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
await resources.async_get_info() # loads the collection
|
||||||
|
ours = [item for item in resources.async_items() if _is_ours(str(item.get("url", "")))]
|
||||||
|
if not ours:
|
||||||
|
await resources.async_create_item({"res_type": "module", "url": url})
|
||||||
|
_LOGGER.debug("Added the dashboard card resource %s", url)
|
||||||
|
return
|
||||||
|
for item in ours:
|
||||||
|
if item.get("url") != url:
|
||||||
|
# an older version or an old copy of the bundle: it would define the card first, so it points to ours
|
||||||
|
await resources.async_update_item(item["id"], {"res_type": "module", "url": url})
|
||||||
|
_LOGGER.debug("Updated dashboard resource %s to %s", item.get("url"), url)
|
||||||
|
except Exception: # the card still loads as an extra module, this is only a help
|
||||||
|
_LOGGER.debug("Could not update the dashboard resources", exc_info=True)
|
||||||
|
|
||||||
|
|
||||||
|
def async_schedule_card_resource(hass: HomeAssistant, url: str) -> None:
|
||||||
|
"""Run once Home Assistant has started (Lovelace and its resources are set up by then)."""
|
||||||
|
if hass.state is CoreState.running:
|
||||||
|
hass.async_create_task(async_ensure_card_resource(hass, url))
|
||||||
|
return
|
||||||
|
|
||||||
|
async def _started(_event: Event) -> None:
|
||||||
|
await async_ensure_card_resource(hass, url)
|
||||||
|
|
||||||
|
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, _started)
|
||||||
|
|
||||||
|
|
||||||
|
async def async_remove_card_resource(hass: HomeAssistant) -> None:
|
||||||
|
"""When the integration is removed: drop the resources that point to our own static path."""
|
||||||
|
resources = _resources(hass)
|
||||||
|
if resources is None:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
await resources.async_get_info()
|
||||||
|
for item in list(resources.async_items()):
|
||||||
|
if str(item.get("url", "")).startswith(f"{URL_BASE}/"):
|
||||||
|
await resources.async_delete_item(item["id"])
|
||||||
|
except Exception:
|
||||||
|
_LOGGER.debug("Could not remove the dashboard resource", exc_info=True)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
"""Config flow for NextFloor (no options: everything is set up in the panel)."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||||
|
|
||||||
|
from .const import DOMAIN, PANEL_TITLE
|
||||||
|
|
||||||
|
|
||||||
|
class NextFloorConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
|
"""Single-step flow."""
|
||||||
|
|
||||||
|
VERSION = 1
|
||||||
|
|
||||||
|
async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult:
|
||||||
|
"""Confirm and create the entry."""
|
||||||
|
if user_input is not None:
|
||||||
|
return self.async_create_entry(title=PANEL_TITLE, data={})
|
||||||
|
return self.async_show_form(step_id="user")
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
"""Constants for NextFloor."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
DOMAIN = "nextfloor"
|
||||||
|
|
||||||
|
STORAGE_VERSION = 1
|
||||||
|
# minor versions of the building store; each step has a migration in storage.py
|
||||||
|
STORAGE_MINOR_VERSION = 2
|
||||||
|
STORAGE_KEY_BUILDING = f"{DOMAIN}.building"
|
||||||
|
STORAGE_KEY_IMAGES = f"{DOMAIN}.images"
|
||||||
|
STORAGE_KEY_HISTORY = f"{DOMAIN}.history"
|
||||||
|
STORAGE_KEY_PACKS = f"{DOMAIN}.packs"
|
||||||
|
|
||||||
|
# restore points: at most this many, and a new one only after this pause since the last one
|
||||||
|
HISTORY_MAX = 20
|
||||||
|
HISTORY_INTERVAL = 600
|
||||||
|
|
||||||
|
URL_BASE = "/nextfloor_static"
|
||||||
|
MAIN_BUNDLE = "nextfloor.js"
|
||||||
|
PANEL_URL_PATH = "nextfloor"
|
||||||
|
PANEL_COMPONENT = "nextfloor-panel"
|
||||||
|
PANEL_ICON = "mdi:floor-plan"
|
||||||
|
PANEL_TITLE = "NextFloor"
|
||||||
|
|
||||||
|
SIGNAL_BUILDING_UPDATED = f"{DOMAIN}_building_updated"
|
||||||
|
SIGNAL_ANNOUNCE = f"{DOMAIN}_announce"
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"services": {
|
||||||
|
"announce": {
|
||||||
|
"service": "mdi:bullhorn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"domain": "nextfloor",
|
||||||
|
"name": "NextFloor",
|
||||||
|
"after_dependencies": [
|
||||||
|
"bluetooth",
|
||||||
|
"media_source",
|
||||||
|
"tts"
|
||||||
|
],
|
||||||
|
"codeowners": [
|
||||||
|
"@therealMRBK"
|
||||||
|
],
|
||||||
|
"config_flow": true,
|
||||||
|
"dependencies": [
|
||||||
|
"frontend",
|
||||||
|
"http",
|
||||||
|
"panel_custom",
|
||||||
|
"websocket_api"
|
||||||
|
],
|
||||||
|
"documentation": "https://github.com/therealMRBK/NextFloor#readme",
|
||||||
|
"integration_type": "service",
|
||||||
|
"iot_class": "calculated",
|
||||||
|
"issue_tracker": "https://github.com/therealMRBK/NextFloor/issues",
|
||||||
|
"requirements": [],
|
||||||
|
"single_config_entry": true,
|
||||||
|
"version": "0.26.6"
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
"""3D models (binary glTF) you own, kept on your Home Assistant and shown in place of a pack item's simple shape.
|
||||||
|
|
||||||
|
NextFloor ships none of them. A pack item names a model with `mesh`; when a file with that id exists in
|
||||||
|
`<config>/nextfloor_meshes/`, the 3D view draws it, otherwise the item's own parts. Admins upload them (see
|
||||||
|
docs/models.md); everyone logged in can read them.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from http import HTTPStatus
|
||||||
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
|
||||||
|
from aiohttp import web
|
||||||
|
from homeassistant.components.http import HomeAssistantView
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
MESH_DIR = "nextfloor_meshes"
|
||||||
|
MAX_BYTES = 12 * 1024 * 1024
|
||||||
|
_ID = re.compile(r"^[a-z0-9_]{1,48}$")
|
||||||
|
_REGISTERED = f"{DOMAIN}_mesh_view"
|
||||||
|
|
||||||
|
|
||||||
|
def _path(hass: HomeAssistant, mesh_id: str) -> Path | None:
|
||||||
|
if not _ID.match(mesh_id):
|
||||||
|
return None
|
||||||
|
return Path(hass.config.path(MESH_DIR)) / f"{mesh_id}.glb"
|
||||||
|
|
||||||
|
|
||||||
|
class MeshView(HomeAssistantView):
|
||||||
|
"""Read, upload (admin) or remove (admin) one model."""
|
||||||
|
|
||||||
|
url = "/api/nextfloor/mesh/{mesh_id}"
|
||||||
|
name = "api:nextfloor:mesh"
|
||||||
|
requires_auth = True
|
||||||
|
|
||||||
|
async def get(self, request: web.Request, mesh_id: str) -> web.Response:
|
||||||
|
hass: HomeAssistant = request.app["hass"]
|
||||||
|
path = _path(hass, mesh_id)
|
||||||
|
if path is None:
|
||||||
|
return web.Response(status=HTTPStatus.BAD_REQUEST)
|
||||||
|
data = await hass.async_add_executor_job(lambda: path.read_bytes() if path.is_file() else None)
|
||||||
|
if data is None:
|
||||||
|
return web.Response(status=HTTPStatus.NOT_FOUND)
|
||||||
|
return web.Response(
|
||||||
|
body=data, content_type="model/gltf-binary", headers={"Cache-Control": "private, max-age=3600"}
|
||||||
|
)
|
||||||
|
|
||||||
|
async def post(self, request: web.Request, mesh_id: str) -> web.Response:
|
||||||
|
hass: HomeAssistant = request.app["hass"]
|
||||||
|
if not request["hass_user"].is_admin:
|
||||||
|
return web.Response(status=HTTPStatus.UNAUTHORIZED)
|
||||||
|
path = _path(hass, mesh_id)
|
||||||
|
if path is None:
|
||||||
|
return web.Response(status=HTTPStatus.BAD_REQUEST)
|
||||||
|
data = await request.read()
|
||||||
|
if len(data) > MAX_BYTES:
|
||||||
|
return web.Response(status=HTTPStatus.REQUEST_ENTITY_TOO_LARGE)
|
||||||
|
if data[:4] != b"glTF":
|
||||||
|
return web.Response(status=HTTPStatus.BAD_REQUEST, text="not a binary glTF (.glb) file")
|
||||||
|
|
||||||
|
def write() -> None:
|
||||||
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
path.write_bytes(data)
|
||||||
|
|
||||||
|
await hass.async_add_executor_job(write)
|
||||||
|
return web.Response(status=HTTPStatus.CREATED)
|
||||||
|
|
||||||
|
async def delete(self, request: web.Request, mesh_id: str) -> web.Response:
|
||||||
|
hass: HomeAssistant = request.app["hass"]
|
||||||
|
if not request["hass_user"].is_admin:
|
||||||
|
return web.Response(status=HTTPStatus.UNAUTHORIZED)
|
||||||
|
path = _path(hass, mesh_id)
|
||||||
|
if path is None:
|
||||||
|
return web.Response(status=HTTPStatus.BAD_REQUEST)
|
||||||
|
await hass.async_add_executor_job(lambda: path.unlink(missing_ok=True))
|
||||||
|
return web.Response(status=HTTPStatus.NO_CONTENT)
|
||||||
|
|
||||||
|
|
||||||
|
def async_register_mesh_view(hass: HomeAssistant) -> None:
|
||||||
|
"""Register the model endpoint once."""
|
||||||
|
if hass.data.get(_REGISTERED):
|
||||||
|
return
|
||||||
|
hass.data[_REGISTERED] = True
|
||||||
|
hass.http.register_view(MeshView())
|
||||||
@@ -0,0 +1,266 @@
|
|||||||
|
"""Furniture packs: JSON files with furniture models built from boxes, cylinders and lofts.
|
||||||
|
|
||||||
|
A pack is plain JSON (format, id, name, publisher, items). The packs that come with the integration
|
||||||
|
(packs/*.json) are always there, and anyone can import their own.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
import voluptuous as vol
|
||||||
|
|
||||||
|
PACK_FORMAT = "nfpack"
|
||||||
|
PACK_VERSION = 1
|
||||||
|
# largest pack file accepted (characters of JSON)
|
||||||
|
MAX_PACK_SIZE = 1_000_000
|
||||||
|
|
||||||
|
_ID = vol.All(str, vol.Match(r"^[a-z0-9][a-z0-9_.-]{0,39}$"))
|
||||||
|
_TEXT = vol.All(str, vol.Length(min=1, max=80))
|
||||||
|
# a colour: "#rrggbb" or a role of the built-in palette (so packs follow the look of the plan)
|
||||||
|
_COLOR = vol.Any(
|
||||||
|
vol.Match(r"^#[0-9a-fA-F]{6}$"),
|
||||||
|
vol.In(["body", "fabric", "cushion", "wood", "white", "metal", "dark", "glass", "plant", "pot", "accent"]),
|
||||||
|
)
|
||||||
|
_FRACTION = vol.All(vol.Coerce(float), vol.Range(min=-0.5, max=0.5))
|
||||||
|
_SPAN = vol.All(vol.Coerce(float), vol.Range(min=0.001, max=1))
|
||||||
|
_LEVEL = vol.All(vol.Coerce(float), vol.Range(min=0, max=1))
|
||||||
|
_METRES = vol.All(vol.Coerce(float), vol.Range(min=0.01, max=10))
|
||||||
|
|
||||||
|
|
||||||
|
def _station(value: Any) -> list[float]:
|
||||||
|
"""A cross section of a sweep: [z, bottom, top, width] in fractions of the item's depth, height and width."""
|
||||||
|
if not isinstance(value, (list, tuple)) or len(value) != 4:
|
||||||
|
raise vol.Invalid("a station is [z, bottom, top, width]")
|
||||||
|
z, y0, y1, w = (float(v) for v in value)
|
||||||
|
if not (-0.5 <= z <= 0.5 and 0 <= y0 <= 1 and 0 <= y1 <= 1 and 0.001 <= w <= 1):
|
||||||
|
raise vol.Invalid("station out of range")
|
||||||
|
return [z, y0, y1, w]
|
||||||
|
|
||||||
|
|
||||||
|
# Parts in fractions of the item's size: x/z centre (-0.5..0.5, front at +z), w/d extent, y/h bottom
|
||||||
|
# and height of the item height. A cylinder's diameter is the smaller of w and d.
|
||||||
|
PART_SCHEMA = vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("shape"): vol.In(["box", "cyl", "loft", "sweep"]),
|
||||||
|
vol.Required("x"): _FRACTION,
|
||||||
|
vol.Required("z"): _FRACTION,
|
||||||
|
vol.Required("w"): _SPAN,
|
||||||
|
vol.Required("d"): _SPAN,
|
||||||
|
vol.Required("y"): _LEVEL,
|
||||||
|
vol.Required("h"): _SPAN,
|
||||||
|
vol.Required("color"): _COLOR,
|
||||||
|
vol.Optional("top"): _COLOR,
|
||||||
|
# outline: True (soft blue), "glow" (cyan like the walls) or "faint"
|
||||||
|
vol.Optional("edges", default=False): vol.Any(bool, vol.In(["glow", "faint"])),
|
||||||
|
# lamps: the part shines in the colour and brightness of the linked light
|
||||||
|
vol.Optional("glow", default=False): bool,
|
||||||
|
# a screen (TV, monitor): shows the linked media player's app colour and picture on its front (+z)
|
||||||
|
vol.Optional("screen", default=False): bool,
|
||||||
|
# a picture frame's opening: shows the item's own photo (a stored picture, a URL or an image entity)
|
||||||
|
vol.Optional("picture", default=False): bool,
|
||||||
|
# a button or socket of a switch plate (0 = the first): glows while the entity of that gang is on
|
||||||
|
vol.Optional("gang"): vol.All(vol.Coerce(int), vol.Range(min=0, max=7)),
|
||||||
|
# moves with the item's cover entity: rolls up ("down"), gathers to a side, reaches out ("out") or slides away
|
||||||
|
vol.Optional("move"): vol.In(["down", "left", "right", "out", "slide_left", "slide_right"]),
|
||||||
|
# loft: centre and extent of the top rectangle (default: the same as the bottom)
|
||||||
|
vol.Optional("tx"): _FRACTION,
|
||||||
|
vol.Optional("tz"): _FRACTION,
|
||||||
|
vol.Optional("tw"): _SPAN,
|
||||||
|
vol.Optional("td"): _SPAN,
|
||||||
|
# sweep: cross sections along z, each [z, bottom, top, width] in fractions of the item's depth, height, width
|
||||||
|
vol.Optional("stations"): vol.All([_station], vol.Length(min=2, max=48)),
|
||||||
|
# sweep: how boxy the cross section is (2 = ellipse) and how many points go round it
|
||||||
|
vol.Optional("exp"): vol.All(vol.Coerce(float), vol.Range(min=1.5, max=8)),
|
||||||
|
vol.Optional("n"): vol.All(vol.Coerce(int), vol.Range(min=6, max=32)),
|
||||||
|
# cylinder axis: upright (default) or lying along x or z (wheels, rollers)
|
||||||
|
vol.Optional("axis"): vol.In(["x", "y", "z"]),
|
||||||
|
# turn of the part around its own centre (degrees around the vertical axis): spiral steps, diagonals
|
||||||
|
vol.Optional("rot"): vol.All(vol.Coerce(float), vol.Range(min=-360, max=360)),
|
||||||
|
# a body part that takes the item's chosen colour (see "colors" of the item)
|
||||||
|
vol.Optional("paint"): bool,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Plan symbol in the same fractions (optional: without it the parts are drawn from above).
|
||||||
|
SYMBOL_SCHEMA = vol.Any(
|
||||||
|
vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("shape"): "rect",
|
||||||
|
"x": _FRACTION,
|
||||||
|
"z": _FRACTION,
|
||||||
|
"w": _SPAN,
|
||||||
|
"d": _SPAN,
|
||||||
|
vol.Optional("fill", default=False): bool,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
vol.Schema({vol.Required("shape"): "circle", "x": _FRACTION, "z": _FRACTION, "r": _SPAN}),
|
||||||
|
vol.Schema({vol.Required("shape"): "line", "x1": _FRACTION, "z1": _FRACTION, "x2": _FRACTION, "z2": _FRACTION}),
|
||||||
|
)
|
||||||
|
|
||||||
|
# A choosable colour of an item (a car's paint): parts with "paint": true are drawn in the chosen one.
|
||||||
|
COLORWAY_SCHEMA = vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("id"): vol.All(str, vol.Match(r"^[a-z0-9_]{1,24}$")),
|
||||||
|
vol.Required("name"): vol.All({vol.All(str, vol.Length(min=2, max=5)): _TEXT}, vol.Length(min=1, max=10)),
|
||||||
|
vol.Required("hex"): vol.Match(r"^#[0-9a-fA-F]{6}$"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# The settings of an item built in the editor's furniture studio, kept so it can be opened there again (sizes in cm).
|
||||||
|
_COUNT = vol.All(vol.Coerce(int), vol.Range(min=0, max=12))
|
||||||
|
RECIPE_SCHEMA = vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("kind"): vol.In(["cabinet", "shelf", "lamp", "device"]),
|
||||||
|
vol.Required("name"): vol.All(str, vol.Length(max=60)),
|
||||||
|
vol.Required("w"): vol.All(vol.Coerce(float), vol.Range(min=1, max=1000)),
|
||||||
|
vol.Required("d"): vol.All(vol.Coerce(float), vol.Range(min=1, max=1000)),
|
||||||
|
vol.Required("h"): vol.All(vol.Coerce(float), vol.Range(min=1, max=1000)),
|
||||||
|
vol.Optional("doors", default=0): _COUNT,
|
||||||
|
vol.Optional("drawers", default=0): _COUNT,
|
||||||
|
vol.Optional("shelves", default=0): _COUNT,
|
||||||
|
vol.Optional("base", default="none"): vol.In(["none", "legs", "plinth"]),
|
||||||
|
vol.Optional("handle", default="none"): vol.In(["bar", "knob", "none"]),
|
||||||
|
vol.Optional("back", default=False): bool,
|
||||||
|
vol.Optional("lamp", default="floor"): vol.In(["floor", "table", "pendant", "wall"]),
|
||||||
|
vol.Optional("display", default=False): bool,
|
||||||
|
vol.Optional("mount", default="floor"): vol.In(["floor", "surface", "wall"]),
|
||||||
|
vol.Optional("body", default="body"): _COLOR,
|
||||||
|
vol.Optional("front", default="body"): _COLOR,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
ITEM_SCHEMA = vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("id"): _ID,
|
||||||
|
# names by language ("de", "en", …); "en" or the first one is the fallback
|
||||||
|
vol.Required("name"): vol.All({vol.All(str, vol.Length(min=2, max=5)): _TEXT}, vol.Length(min=1, max=10)),
|
||||||
|
vol.Required("size"): vol.All([_METRES], vol.Length(min=3, max=3)),
|
||||||
|
vol.Optional("electric", default=False): bool,
|
||||||
|
# a thermostat / heat pump / A/C item: links to a climate entity and may also have a power sensor
|
||||||
|
vol.Optional("climate", default=False): bool,
|
||||||
|
# where it stands: on the floor, on the furniture below it, on a wall (bottom at wall_y) or
|
||||||
|
# hanging from the ceiling
|
||||||
|
vol.Optional("mount", default="floor"): vol.In(["floor", "surface", "wall", "ceiling"]),
|
||||||
|
vol.Optional("wall_y", default=1.0): vol.All(vol.Coerce(float), vol.Range(min=0, max=3)),
|
||||||
|
# its top carries other items (like a table or a worktop)
|
||||||
|
vol.Optional("surface", default=False): bool,
|
||||||
|
# a 3D model the owner has put on their Home Assistant (see meshes.py); the parts are the fallback
|
||||||
|
vol.Optional("mesh"): vol.All(str, vol.Match(r"^[a-z0-9_]{1,48}$")),
|
||||||
|
# a vehicle: offered for parking spots
|
||||||
|
vol.Optional("vehicle", default=False): bool,
|
||||||
|
# moving parts: an open cover pulls them in ("retracts") or out ("extends", an awning), and their rest
|
||||||
|
vol.Optional("cover"): vol.In(["retracts", "extends"]),
|
||||||
|
vol.Optional("cover_rest"): vol.All(vol.Coerce(float), vol.Range(min=0, max=1)),
|
||||||
|
# an animal that roams its room in 3D
|
||||||
|
vol.Optional("pet", default=False): bool,
|
||||||
|
# the household: a waste bin (pickup day), a mailbox (post) or a plant (soil moisture), shown from a sensor
|
||||||
|
vol.Optional("household"): vol.In(["bin", "mail", "plant"]),
|
||||||
|
# light switches and sockets: how many buttons (gangs) the item has, each linked to its own entity
|
||||||
|
vol.Optional("gangs"): vol.All(vol.Coerce(int), vol.Range(min=1, max=8)),
|
||||||
|
# scale every part evenly when resized, instead of keeping legs, arms and plates at their size
|
||||||
|
vol.Optional("stretch", default=False): bool,
|
||||||
|
# stairs: when it reaches the floor above, it cuts a stairwell opening into that floor
|
||||||
|
vol.Optional("hole", default=False): bool,
|
||||||
|
# a lamp: how its light spreads (like the built-in lamp of that kind)
|
||||||
|
vol.Optional("light"): vol.In(
|
||||||
|
[
|
||||||
|
"ceiling",
|
||||||
|
"downlight",
|
||||||
|
"spot",
|
||||||
|
"panel",
|
||||||
|
"pendant",
|
||||||
|
"floor",
|
||||||
|
"uplight",
|
||||||
|
"table",
|
||||||
|
"wall",
|
||||||
|
"strip",
|
||||||
|
"bollard",
|
||||||
|
"garden",
|
||||||
|
]
|
||||||
|
),
|
||||||
|
vol.Required("parts"): vol.All([PART_SCHEMA], vol.Length(min=1, max=60)),
|
||||||
|
vol.Optional("symbol"): vol.All([SYMBOL_SCHEMA], vol.Length(max=40)),
|
||||||
|
# colours to choose from; the first one is the default
|
||||||
|
vol.Optional("colors"): vol.All([COLORWAY_SCHEMA], vol.Length(min=2, max=24)),
|
||||||
|
vol.Optional("recipe"): RECIPE_SCHEMA,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
PAYLOAD_SCHEMA = vol.Schema(
|
||||||
|
{
|
||||||
|
vol.Required("format"): PACK_FORMAT,
|
||||||
|
vol.Required("version"): PACK_VERSION,
|
||||||
|
vol.Required("id"): _ID,
|
||||||
|
vol.Required("name"): _TEXT,
|
||||||
|
vol.Required("publisher"): _TEXT,
|
||||||
|
# release number of the pack (a newer release of the same id replaces an installed one)
|
||||||
|
vol.Optional("release", default=1): vol.All(int, vol.Range(min=1, max=100000)),
|
||||||
|
vol.Optional("description", default=""): vol.All(str, vol.Length(max=400)),
|
||||||
|
vol.Required("items"): vol.All([ITEM_SCHEMA], vol.Length(min=1, max=200)),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class PackError(Exception):
|
||||||
|
"""A pack that cannot be imported; `code` says why."""
|
||||||
|
|
||||||
|
def __init__(self, code: str, detail: str = "") -> None:
|
||||||
|
"""Keep the reason."""
|
||||||
|
super().__init__(f"{code}: {detail}" if detail else code)
|
||||||
|
self.code = code
|
||||||
|
self.detail = detail
|
||||||
|
|
||||||
|
|
||||||
|
def _sweeps_have_stations(clean: dict[str, Any]) -> None:
|
||||||
|
for item in clean["items"]:
|
||||||
|
for part in item["parts"]:
|
||||||
|
if part["shape"] == "sweep" and not part.get("stations"):
|
||||||
|
raise PackError("invalid_content", f"{item['id']}: a sweep needs stations")
|
||||||
|
|
||||||
|
|
||||||
|
def validate_payload(payload: Any) -> dict[str, Any]:
|
||||||
|
"""Check the content of a pack; raises PackError."""
|
||||||
|
try:
|
||||||
|
clean = PAYLOAD_SCHEMA(payload)
|
||||||
|
except vol.Invalid as err:
|
||||||
|
# a value this version does not know yet (a new item kind of a newer pack release)
|
||||||
|
if "value must be one of" in str(err):
|
||||||
|
raise PackError("needs_update", str(err)) from err
|
||||||
|
raise PackError("invalid_content", str(err)) from err
|
||||||
|
ids = [item["id"] for item in clean["items"]]
|
||||||
|
if len(ids) != len(set(ids)):
|
||||||
|
raise PackError("invalid_content", "item ids must be unique")
|
||||||
|
_sweeps_have_stations(clean)
|
||||||
|
for it in clean["items"]:
|
||||||
|
colors = [c["id"] for c in it.get("colors", [])]
|
||||||
|
if len(colors) != len(set(colors)):
|
||||||
|
raise PackError("invalid_content", f"{it['id']}: colour ids must be unique")
|
||||||
|
return clean
|
||||||
|
|
||||||
|
|
||||||
|
def parse_pack(text: str) -> dict[str, Any]:
|
||||||
|
"""Parse a pack file and return its checked content."""
|
||||||
|
if len(text) > MAX_PACK_SIZE:
|
||||||
|
raise PackError("too_large")
|
||||||
|
try:
|
||||||
|
data = json.loads(text)
|
||||||
|
except ValueError as err:
|
||||||
|
raise PackError("not_a_pack", "not JSON") from err
|
||||||
|
if not isinstance(data, dict) or data.get("format") != PACK_FORMAT:
|
||||||
|
raise PackError("not_a_pack")
|
||||||
|
return validate_payload(data)
|
||||||
|
|
||||||
|
|
||||||
|
BUILTIN_DIR = Path(__file__).parent / "packs"
|
||||||
|
|
||||||
|
|
||||||
|
def load_builtin_packs() -> list[dict[str, Any]]:
|
||||||
|
"""The packs that come with the integration (blocking: run in the executor)."""
|
||||||
|
packs = []
|
||||||
|
for file in sorted(BUILTIN_DIR.glob("*.json")):
|
||||||
|
pack = parse_pack(file.read_text(encoding="utf-8"))
|
||||||
|
packs.append({**pack, "builtin": True})
|
||||||
|
return packs
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,294 @@
|
|||||||
|
"""Sensors from the plan: how many windows and doors are open and how many lights are on, per floor and for the house.
|
||||||
|
|
||||||
|
They count what the plan links: the contacts of its doors and windows (a garage door by its cover), and the lights of
|
||||||
|
its device pins and lamps. Automations and voice can use them without listing the entities of a floor by hand.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Callable
|
||||||
|
from datetime import timedelta
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from homeassistant.components.sensor import SensorEntity, SensorStateClass
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback
|
||||||
|
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
||||||
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
from homeassistant.helpers.event import async_track_state_change_event, async_track_time_interval
|
||||||
|
|
||||||
|
from . import ble
|
||||||
|
from .const import DOMAIN, SIGNAL_BUILDING_UPDATED
|
||||||
|
|
||||||
|
HOUSE = "house"
|
||||||
|
KINDS = ("open", "lights_on")
|
||||||
|
|
||||||
|
|
||||||
|
def _is_light(entity_id: Any) -> bool:
|
||||||
|
return isinstance(entity_id, str) and entity_id.startswith("light.")
|
||||||
|
|
||||||
|
|
||||||
|
def floor_lights(floor: dict[str, Any]) -> set[str]:
|
||||||
|
"""The lights the plan shows on a floor: device pins and the lights of lamps (with their extra lights)."""
|
||||||
|
lights = {p.get("entity_id") for p in floor.get("placements", []) if _is_light(p.get("entity_id"))}
|
||||||
|
for item in floor.get("furniture", []):
|
||||||
|
if _is_light(item.get("entity")):
|
||||||
|
lights.add(item["entity"])
|
||||||
|
lights.update(e for e in item.get("extra_lights") or [] if _is_light(e))
|
||||||
|
return {e for e in lights if e}
|
||||||
|
|
||||||
|
|
||||||
|
def floor_openings(floor: dict[str, Any]) -> list[dict[str, Any]]:
|
||||||
|
"""The doors, windows and garage doors of a floor that have an entity telling whether they are open."""
|
||||||
|
out = []
|
||||||
|
for o in floor.get("openings", []):
|
||||||
|
sensors = [o.get(k) for k in ("contact", "contact2", "tilt", "tilt2") if isinstance(o.get(k), str) and o.get(k)]
|
||||||
|
cover = o.get("cover") if o.get("type") == "garage" and isinstance(o.get("cover"), str) else None
|
||||||
|
if sensors or cover:
|
||||||
|
out.append({"sensors": sensors, "cover": cover})
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def _floors(building: dict[str, Any]) -> list[dict[str, Any]]:
|
||||||
|
return [f for f in building.get("floors", []) if not f.get("layer")]
|
||||||
|
|
||||||
|
|
||||||
|
class _Counter:
|
||||||
|
"""What one sensor counts: the lights or the openings of some floors, read from the current states."""
|
||||||
|
|
||||||
|
def __init__(self, hass: HomeAssistant, kind: str) -> None:
|
||||||
|
self.hass = hass
|
||||||
|
self.kind = kind
|
||||||
|
self.lights: set[str] = set()
|
||||||
|
self.openings: list[dict[str, Any]] = []
|
||||||
|
|
||||||
|
def take(self, floors: list[dict[str, Any]]) -> None:
|
||||||
|
self.lights = set().union(*(floor_lights(f) for f in floors)) if floors else set()
|
||||||
|
self.openings = [o for f in floors for o in floor_openings(f)]
|
||||||
|
|
||||||
|
def watched(self) -> set[str]:
|
||||||
|
if self.kind == "lights_on":
|
||||||
|
return set(self.lights)
|
||||||
|
return {e for o in self.openings for e in [*o["sensors"], o["cover"]] if e}
|
||||||
|
|
||||||
|
def _state(self, entity_id: str) -> str | None:
|
||||||
|
st = self.hass.states.get(entity_id)
|
||||||
|
return st.state if st else None
|
||||||
|
|
||||||
|
def count(self) -> tuple[int, list[str]]:
|
||||||
|
if self.kind == "lights_on":
|
||||||
|
on = sorted(e for e in self.lights if self._state(e) == "on")
|
||||||
|
return len(on), on
|
||||||
|
open_ids: list[str] = []
|
||||||
|
for o in self.openings:
|
||||||
|
hit = next((e for e in o["sensors"] if self._state(e) == "on"), None)
|
||||||
|
if hit is None and o["cover"] and self._state(o["cover"]) in ("open", "opening", "closing"):
|
||||||
|
hit = o["cover"]
|
||||||
|
if hit:
|
||||||
|
open_ids.append(hit)
|
||||||
|
return len(open_ids), sorted(open_ids)
|
||||||
|
|
||||||
|
|
||||||
|
class NextFloorCountSensor(SensorEntity):
|
||||||
|
"""Open windows and doors, or lights on, on one floor or in the whole house."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
_attr_should_poll = False
|
||||||
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
|
|
||||||
|
def __init__(self, hass: HomeAssistant, entry: ConfigEntry, scope: str, name: str, kind: str) -> None:
|
||||||
|
"""Count `kind` on the floor `scope` (or the whole house)."""
|
||||||
|
self.scope = scope
|
||||||
|
self._counter = _Counter(hass, kind)
|
||||||
|
self._unsub_states: Callable[[], None] | None = None
|
||||||
|
self._attr_unique_id = f"{entry.entry_id}_{scope}_{kind}"
|
||||||
|
self._attr_translation_key = f"{'house' if scope == HOUSE else 'floor'}_{kind}"
|
||||||
|
self._attr_translation_placeholders = {"floor": name}
|
||||||
|
self._attr_icon = "mdi:window-open-variant" if kind == "open" else "mdi:lightbulb-group"
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, entry.entry_id)}, name="NextFloor", entry_type=DeviceEntryType.SERVICE
|
||||||
|
)
|
||||||
|
self._ids: list[str] = []
|
||||||
|
|
||||||
|
def take(self, building: dict[str, Any]) -> None:
|
||||||
|
"""Follow the floors of the (new) plan; a floor that is gone leaves the sensor unavailable."""
|
||||||
|
floors = _floors(building)
|
||||||
|
mine = floors if self.scope == HOUSE else [f for f in floors if f.get("id") == self.scope]
|
||||||
|
self._attr_available = self.scope == HOUSE or bool(mine)
|
||||||
|
if mine and self.scope != HOUSE:
|
||||||
|
self._attr_translation_placeholders = {"floor": mine[0].get("name") or self.scope}
|
||||||
|
self._counter.take(mine)
|
||||||
|
self._refresh()
|
||||||
|
if self.hass is not None and self.platform is not None:
|
||||||
|
self._watch()
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def _watch(self) -> None:
|
||||||
|
if self._unsub_states:
|
||||||
|
self._unsub_states()
|
||||||
|
watched = sorted(self._counter.watched())
|
||||||
|
self._unsub_states = async_track_state_change_event(self.hass, watched, self._changed) if watched else None
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def _changed(self, _event: Event[EventStateChangedData]) -> None:
|
||||||
|
self._refresh()
|
||||||
|
self.async_write_ha_state()
|
||||||
|
|
||||||
|
def _refresh(self) -> None:
|
||||||
|
n, ids = self._counter.count()
|
||||||
|
self._attr_native_value = n
|
||||||
|
self._ids = ids
|
||||||
|
|
||||||
|
@property
|
||||||
|
def extra_state_attributes(self) -> dict[str, Any]:
|
||||||
|
"""The entities that are open or on, for templates and notifications."""
|
||||||
|
return {"entities": self._ids}
|
||||||
|
|
||||||
|
async def async_added_to_hass(self) -> None:
|
||||||
|
"""Start following the states."""
|
||||||
|
self._watch()
|
||||||
|
|
||||||
|
async def async_will_remove_from_hass(self) -> None:
|
||||||
|
"""Stop following the states."""
|
||||||
|
if self._unsub_states:
|
||||||
|
self._unsub_states()
|
||||||
|
self._unsub_states = None
|
||||||
|
|
||||||
|
|
||||||
|
BLE_POLL = timedelta(seconds=2)
|
||||||
|
# a tag that no scanner has heard for this long is "away"
|
||||||
|
BLE_AWAY_AFTER = timedelta(minutes=2)
|
||||||
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
|
|
||||||
|
class NextFloorBleSensor(SensorEntity):
|
||||||
|
"""The room a Bluetooth tag is in, from its signal at the scanners and the fingerprints recorded in the editor."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
_attr_should_poll = False
|
||||||
|
_attr_icon = "mdi:bluetooth-connect"
|
||||||
|
|
||||||
|
def __init__(self, hass: HomeAssistant, entry: ConfigEntry, tag: dict[str, Any]) -> None:
|
||||||
|
"""Locate `tag` (a dict of the plan's settings.ble.tags)."""
|
||||||
|
self.hass = hass
|
||||||
|
self.tag_id = tag["id"]
|
||||||
|
self._tag = tag
|
||||||
|
self._rooms: dict[str, dict[str, str]] = {}
|
||||||
|
self._smoother = ble.Smoother()
|
||||||
|
self._history: list[dict[str, float]] = []
|
||||||
|
self._last_heard: Any = None
|
||||||
|
self._room_id: str | None = None
|
||||||
|
self._detail: dict[str, Any] = {}
|
||||||
|
self._unsub: Callable[[], None] | None = None
|
||||||
|
self._attr_unique_id = f"{entry.entry_id}_ble_{tag['id']}"
|
||||||
|
self._attr_name = tag["name"]
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, entry.entry_id)}, name="NextFloor", entry_type=DeviceEntryType.SERVICE
|
||||||
|
)
|
||||||
|
self._attr_native_value = UNKNOWN
|
||||||
|
|
||||||
|
def take(self, building: dict[str, Any]) -> None:
|
||||||
|
"""Follow the (new) plan: the tag's fingerprints and the room names."""
|
||||||
|
found = next((t for t in ble.tags_of(building) if t["id"] == self.tag_id), None)
|
||||||
|
self._attr_available = found is not None
|
||||||
|
if found is not None:
|
||||||
|
self._tag = found
|
||||||
|
self._attr_name = found["name"]
|
||||||
|
self._rooms = ble.rooms_of(building)
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def poll(self, _now: Any = None) -> None:
|
||||||
|
"""Read the scanners, compare with the fingerprints and update the room (smoothed)."""
|
||||||
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
|
address = ble.tag_address(self.hass, self._tag)
|
||||||
|
readings = ble.scanner_readings(self.hass, address) if address else {}
|
||||||
|
now = dt_util.utcnow()
|
||||||
|
if readings:
|
||||||
|
self._last_heard = now
|
||||||
|
merged = ble.smooth_reading(self._history, {src: rssi for src, (_n, rssi) in readings.items()})
|
||||||
|
room, dist, margin = ble.locate(self._tag.get("prints") or [], merged)
|
||||||
|
shown = self._smoother.update(room)
|
||||||
|
self._detail = {
|
||||||
|
"room_id": shown,
|
||||||
|
"distance_db": None if dist == float("inf") else round(dist, 1),
|
||||||
|
"margin_db": round(margin, 1),
|
||||||
|
"scanners": {name: rssi for _src, (name, rssi) in readings.items()},
|
||||||
|
"address": address,
|
||||||
|
}
|
||||||
|
elif self._last_heard is None or now - self._last_heard > BLE_AWAY_AFTER:
|
||||||
|
self._history.clear()
|
||||||
|
self._smoother = ble.Smoother()
|
||||||
|
shown = None
|
||||||
|
self._detail = {"room_id": None, "scanners": {}, "address": address}
|
||||||
|
else:
|
||||||
|
shown = self._smoother.room
|
||||||
|
self._room_id = shown
|
||||||
|
info = self._rooms.get(shown) if shown else None
|
||||||
|
self._attr_native_value = info["name"] if info else UNKNOWN
|
||||||
|
self._detail["floor"] = info["floor"] if info else None
|
||||||
|
if self.platform is not None:
|
||||||
|
self.async_write_ha_state()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def extra_state_attributes(self) -> dict[str, Any]:
|
||||||
|
"""The room id and floor, how far the match is, and what each scanner hears."""
|
||||||
|
return dict(self._detail)
|
||||||
|
|
||||||
|
async def async_added_to_hass(self) -> None:
|
||||||
|
"""Start reading the scanners."""
|
||||||
|
self._unsub = async_track_time_interval(self.hass, self.poll, BLE_POLL)
|
||||||
|
|
||||||
|
async def async_will_remove_from_hass(self) -> None:
|
||||||
|
"""Stop reading."""
|
||||||
|
if self._unsub:
|
||||||
|
self._unsub()
|
||||||
|
self._unsub = None
|
||||||
|
|
||||||
|
|
||||||
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None:
|
||||||
|
"""Add the house sensors and one pair per floor; floors added later get theirs when the plan is saved."""
|
||||||
|
data = hass.data[DOMAIN]
|
||||||
|
sensors: dict[tuple[str, str], NextFloorCountSensor] = {}
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def sync(_revision: int | None = None) -> None:
|
||||||
|
building = data.building
|
||||||
|
new: list[NextFloorCountSensor] = []
|
||||||
|
scopes = [(HOUSE, "")] + [(f["id"], f.get("name") or f["id"]) for f in _floors(building)]
|
||||||
|
for scope, name in scopes:
|
||||||
|
for kind in KINDS:
|
||||||
|
sensor = sensors.get((scope, kind))
|
||||||
|
if sensor is None:
|
||||||
|
sensor = sensors[(scope, kind)] = NextFloorCountSensor(hass, entry, scope, name, kind)
|
||||||
|
new.append(sensor)
|
||||||
|
for sensor in sensors.values():
|
||||||
|
sensor.take(building)
|
||||||
|
if sensor not in new and sensor.hass is not None:
|
||||||
|
sensor.async_write_ha_state()
|
||||||
|
if new:
|
||||||
|
async_add_entities(new)
|
||||||
|
|
||||||
|
ble_sensors: dict[str, NextFloorBleSensor] = {}
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def sync_ble(_revision: int | None = None) -> None:
|
||||||
|
building = data.building
|
||||||
|
new_ble: list[NextFloorBleSensor] = []
|
||||||
|
for tag in ble.tags_of(building):
|
||||||
|
sensor = ble_sensors.get(tag["id"])
|
||||||
|
if sensor is None:
|
||||||
|
sensor = ble_sensors[tag["id"]] = NextFloorBleSensor(hass, entry, tag)
|
||||||
|
new_ble.append(sensor)
|
||||||
|
for sensor in ble_sensors.values():
|
||||||
|
sensor.take(building)
|
||||||
|
if sensor not in new_ble and sensor.platform is not None:
|
||||||
|
sensor.async_write_ha_state()
|
||||||
|
if new_ble:
|
||||||
|
async_add_entities(new_ble)
|
||||||
|
|
||||||
|
sync()
|
||||||
|
sync_ble()
|
||||||
|
entry.async_on_unload(async_dispatcher_connect(hass, SIGNAL_BUILDING_UPDATED, sync))
|
||||||
|
entry.async_on_unload(async_dispatcher_connect(hass, SIGNAL_BUILDING_UPDATED, sync_ble))
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
announce:
|
||||||
|
fields:
|
||||||
|
message:
|
||||||
|
required: true
|
||||||
|
example: "Dinner is ready!"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
multiline: true
|
||||||
|
rooms:
|
||||||
|
example: "Kitchen, Living room"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
multiple: true
|
||||||
|
floor:
|
||||||
|
example: "Ground floor"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
on_speakers:
|
||||||
|
default: true
|
||||||
|
selector:
|
||||||
|
boolean:
|
||||||
|
on_screens:
|
||||||
|
default: true
|
||||||
|
selector:
|
||||||
|
boolean:
|
||||||
|
screens:
|
||||||
|
example: "Hallway"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
multiple: true
|
||||||
|
tts_entity:
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain: tts
|
||||||
|
|
||||||
|
reload_screens:
|
||||||
|
fields:
|
||||||
|
template:
|
||||||
|
example: "kitchen_tablet"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
"""Persistence for NextFloor.
|
||||||
|
|
||||||
|
The building (rooms, walls, furniture, placements) and the background images live in separate
|
||||||
|
stores so frequent saves from the editor never rewrite the large image data.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import time
|
||||||
|
from typing import Any
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
|
from homeassistant.helpers.storage import Store
|
||||||
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from .const import (
|
||||||
|
HISTORY_INTERVAL,
|
||||||
|
HISTORY_MAX,
|
||||||
|
SIGNAL_BUILDING_UPDATED,
|
||||||
|
STORAGE_KEY_BUILDING,
|
||||||
|
STORAGE_KEY_HISTORY,
|
||||||
|
STORAGE_KEY_IMAGES,
|
||||||
|
STORAGE_KEY_PACKS,
|
||||||
|
STORAGE_MINOR_VERSION,
|
||||||
|
STORAGE_VERSION,
|
||||||
|
)
|
||||||
|
from .packs import PackError, load_builtin_packs
|
||||||
|
from .schema import BUILDING_SCHEMA, empty_building, image_ids
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def complete(building: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
"""Fill fields added in later versions with their defaults (keeps the building when it is invalid)."""
|
||||||
|
try:
|
||||||
|
return BUILDING_SCHEMA(building)
|
||||||
|
except vol.Invalid as err:
|
||||||
|
_LOGGER.warning("Stored building does not validate (%s); loading it unchanged", err)
|
||||||
|
return building
|
||||||
|
|
||||||
|
|
||||||
|
class _BuildingStore(Store):
|
||||||
|
"""Building store with migrations between minor versions."""
|
||||||
|
|
||||||
|
async def _async_migrate_func(self, old_major_version: int, old_minor_version: int, old_data: dict) -> dict:
|
||||||
|
# 1 -> 2: newer optional fields (openings, furniture, energy, presence) get their defaults
|
||||||
|
if old_minor_version < 2 and old_data.get("building"):
|
||||||
|
old_data = {**old_data, "building": complete(old_data["building"])}
|
||||||
|
return old_data
|
||||||
|
|
||||||
|
|
||||||
|
def _stores(hass: HomeAssistant) -> tuple[Store, Store, Store, Store]:
|
||||||
|
return (
|
||||||
|
_BuildingStore(hass, STORAGE_VERSION, STORAGE_KEY_BUILDING, minor_version=STORAGE_MINOR_VERSION),
|
||||||
|
Store(hass, STORAGE_VERSION, STORAGE_KEY_IMAGES),
|
||||||
|
Store(hass, STORAGE_VERSION, STORAGE_KEY_HISTORY),
|
||||||
|
Store(hass, STORAGE_VERSION, STORAGE_KEY_PACKS),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _summary(building: dict[str, Any]) -> dict[str, int]:
|
||||||
|
floors = building.get("floors", [])
|
||||||
|
return {
|
||||||
|
"floors": len(floors),
|
||||||
|
"rooms": sum(len(f.get("rooms", [])) for f in floors),
|
||||||
|
"furniture": sum(len(f.get("furniture", [])) for f in floors),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class NextFloorData:
|
||||||
|
"""Building and images of one installation."""
|
||||||
|
|
||||||
|
def __init__(self, hass: HomeAssistant) -> None:
|
||||||
|
"""Initialise the stores."""
|
||||||
|
self.hass = hass
|
||||||
|
self._building_store, self._image_store, self._history_store, self._pack_store = _stores(hass)
|
||||||
|
self.building: dict[str, Any] = empty_building()
|
||||||
|
self.revision = 0
|
||||||
|
self._images: dict[str, str] = {}
|
||||||
|
self._history: list[dict[str, Any]] = []
|
||||||
|
# imported furniture packs (checked payloads, see packs.py)
|
||||||
|
self.packs: list[dict[str, Any]] = []
|
||||||
|
# the packs that come with the integration (packs/*.json)
|
||||||
|
self.builtin_packs: list[dict[str, Any]] = []
|
||||||
|
|
||||||
|
async def async_load(self) -> None:
|
||||||
|
"""Load both stores and drop images no floor refers to any more."""
|
||||||
|
stored = await self._building_store.async_load()
|
||||||
|
if stored:
|
||||||
|
self.building = complete(stored.get("building") or empty_building())
|
||||||
|
self.revision = int(stored.get("revision", 0))
|
||||||
|
packs = await self._pack_store.async_load()
|
||||||
|
self.packs = list((packs or {}).get("packs", []))
|
||||||
|
try:
|
||||||
|
self.builtin_packs = await self.hass.async_add_executor_job(load_builtin_packs)
|
||||||
|
except (OSError, PackError) as err:
|
||||||
|
_LOGGER.error("The furniture packs that come with NextFloor could not be loaded: %s", err)
|
||||||
|
history = await self._history_store.async_load()
|
||||||
|
self._history = list((history or {}).get("snapshots", []))
|
||||||
|
images = await self._image_store.async_load()
|
||||||
|
self._images = dict((images or {}).get("images", {}))
|
||||||
|
unused = set(self._images) - image_ids(self.building)
|
||||||
|
if unused:
|
||||||
|
_LOGGER.debug("Removing %d unused background images", len(unused))
|
||||||
|
for image_id in unused:
|
||||||
|
self._images.pop(image_id)
|
||||||
|
await self._save_images()
|
||||||
|
|
||||||
|
async def async_save_building(self, building: dict[str, Any]) -> int:
|
||||||
|
"""Store a validated building, bump the revision and notify subscribers.
|
||||||
|
|
||||||
|
The state before the save becomes a restore point when the last one is older than
|
||||||
|
HISTORY_INTERVAL, so a long editing session leaves a trail without saving every step.
|
||||||
|
"""
|
||||||
|
last = self._history[-1]["saved_at"] if self._history else 0
|
||||||
|
if self.building.get("floors") and time.time() - last > HISTORY_INTERVAL:
|
||||||
|
await self.async_snapshot()
|
||||||
|
self.building = building
|
||||||
|
self.revision += 1
|
||||||
|
await self._building_store.async_save({"revision": self.revision, "building": building})
|
||||||
|
async_dispatcher_send(self.hass, SIGNAL_BUILDING_UPDATED, self.revision)
|
||||||
|
return self.revision
|
||||||
|
|
||||||
|
async def async_snapshot(self, name: str | None = None) -> str:
|
||||||
|
"""Keep the current building as a restore point; a named one (a version) stays when older ones go."""
|
||||||
|
snapshot_id = uuid.uuid4().hex[:12]
|
||||||
|
point: dict[str, Any] = {
|
||||||
|
"id": snapshot_id,
|
||||||
|
"revision": self.revision,
|
||||||
|
"saved_at": time.time(),
|
||||||
|
"building": self.building,
|
||||||
|
}
|
||||||
|
if name:
|
||||||
|
point["name"] = name
|
||||||
|
self._history.append(point)
|
||||||
|
named = [h for h in self._history if h.get("name")][-HISTORY_MAX:]
|
||||||
|
unnamed = [h for h in self._history if not h.get("name")][-HISTORY_MAX:]
|
||||||
|
keep = {id(h) for h in named + unnamed}
|
||||||
|
self._history = [h for h in self._history if id(h) in keep]
|
||||||
|
await self._history_store.async_save({"snapshots": self._history})
|
||||||
|
return snapshot_id
|
||||||
|
|
||||||
|
async def async_delete_snapshot(self, snapshot_id: str) -> bool:
|
||||||
|
"""Remove a restore point; False when there is none of that id."""
|
||||||
|
before = len(self._history)
|
||||||
|
self._history = [h for h in self._history if h["id"] != snapshot_id]
|
||||||
|
if len(self._history) == before:
|
||||||
|
return False
|
||||||
|
await self._history_store.async_save({"snapshots": self._history})
|
||||||
|
return True
|
||||||
|
|
||||||
|
def history(self) -> list[dict[str, Any]]:
|
||||||
|
"""Restore points, newest first, without their buildings."""
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
"id": h["id"],
|
||||||
|
"revision": h["revision"],
|
||||||
|
"saved_at": h["saved_at"],
|
||||||
|
**({"name": h["name"]} if h.get("name") else {}),
|
||||||
|
**_summary(h["building"]),
|
||||||
|
}
|
||||||
|
for h in reversed(self._history)
|
||||||
|
]
|
||||||
|
|
||||||
|
def snapshot(self, snapshot_id: str) -> dict[str, Any] | None:
|
||||||
|
"""Building of a restore point."""
|
||||||
|
return next((h["building"] for h in self._history if h["id"] == snapshot_id), None)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def all_packs(self) -> list[dict[str, Any]]:
|
||||||
|
"""The built-in packs and the imported ones."""
|
||||||
|
return [*self.builtin_packs, *self.packs]
|
||||||
|
|
||||||
|
async def async_add_pack(self, payload: dict[str, Any]) -> None:
|
||||||
|
"""Keep an imported pack; a newer file of the same pack replaces the old one."""
|
||||||
|
entry = {**payload, "imported_at": time.time()}
|
||||||
|
self.packs = [p for p in self.packs if p["id"] != payload["id"]] + [entry]
|
||||||
|
await self._pack_store.async_save({"packs": self.packs})
|
||||||
|
|
||||||
|
@property
|
||||||
|
def images(self) -> dict[str, str]:
|
||||||
|
"""All stored images (id -> data URL)."""
|
||||||
|
return dict(self._images)
|
||||||
|
|
||||||
|
async def async_restore(self, building: dict[str, Any], packs: list[dict[str, Any]]) -> int:
|
||||||
|
"""Replace the plan and the packs from a backup; the state before becomes a restore point."""
|
||||||
|
await self.async_snapshot()
|
||||||
|
self.packs = packs
|
||||||
|
await self._pack_store.async_save({"packs": self.packs})
|
||||||
|
return await self.async_save_building(building)
|
||||||
|
|
||||||
|
async def async_remove_pack(self, pack_id: str) -> bool:
|
||||||
|
"""Remove a pack (furniture using it stays in the plan as plain boxes)."""
|
||||||
|
kept = [p for p in self.packs if p["id"] != pack_id]
|
||||||
|
if len(kept) == len(self.packs):
|
||||||
|
return False
|
||||||
|
self.packs = kept
|
||||||
|
await self._pack_store.async_save({"packs": self.packs})
|
||||||
|
return True
|
||||||
|
|
||||||
|
def get_image(self, image_id: str) -> str | None:
|
||||||
|
"""Return an image as data URL."""
|
||||||
|
return self._images.get(image_id)
|
||||||
|
|
||||||
|
async def async_set_image(self, image_id: str, data: str) -> None:
|
||||||
|
"""Store an image."""
|
||||||
|
self._images[image_id] = data
|
||||||
|
await self._save_images()
|
||||||
|
|
||||||
|
async def async_delete_image(self, image_id: str) -> None:
|
||||||
|
"""Remove an image."""
|
||||||
|
if self._images.pop(image_id, None) is not None:
|
||||||
|
await self._save_images()
|
||||||
|
|
||||||
|
async def _save_images(self) -> None:
|
||||||
|
await self._image_store.async_save({"images": self._images})
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
"""A one-time note for people who installed NextFloor before it joined the official HACS store."""
|
||||||
|
# ruff: noqa: E501, RUF001
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from datetime import UTC, datetime
|
||||||
|
|
||||||
|
from homeassistant.components import persistent_notification
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers.storage import Store
|
||||||
|
|
||||||
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
NOTICE_ID = f"{DOMAIN}_official_store"
|
||||||
|
STORAGE_KEY = f"{DOMAIN}.store_notice"
|
||||||
|
# installs made before this day came in as a custom repository; later ones can only come from the store
|
||||||
|
STORE_SINCE = datetime(2026, 11, 4, tzinfo=UTC)
|
||||||
|
|
||||||
|
TITLE = {
|
||||||
|
"en": "NextFloor is now in the official HACS store",
|
||||||
|
"de": "NextFloor ist jetzt im offiziellen HACS-Store",
|
||||||
|
"fr": "NextFloor est maintenant dans le store HACS officiel",
|
||||||
|
"es": "NextFloor ya está en la tienda oficial de HACS",
|
||||||
|
"it": "NextFloor è ora nello store ufficiale di HACS",
|
||||||
|
"nl": "NextFloor staat nu in de officiële HACS-store",
|
||||||
|
"pl": "NextFloor jest teraz w oficjalnym sklepie HACS",
|
||||||
|
"pt": "O NextFloor já está na loja oficial do HACS",
|
||||||
|
"sv": "NextFloor finns nu i den officiella HACS-butiken",
|
||||||
|
"zh": "NextFloor 现已进入 HACS 官方商店",
|
||||||
|
}
|
||||||
|
|
||||||
|
MESSAGE = {
|
||||||
|
"en": "Thank you for using NextFloor! You installed it as a custom repository; it is now part of the official HACS store, so new installs just search for *NextFloor* in HACS. **Nothing to do for you:** your installation, plan and settings stay as they are, and updates keep coming through HACS. HACS recognises NextFloor as a regular repository by itself once it has refreshed its list.",
|
||||||
|
"de": "Danke, dass du NextFloor nutzt! Du hast es als eigenes Repository installiert; jetzt gehört es zum offiziellen HACS-Store, neue Nutzer suchen einfach nach *NextFloor* in HACS. **Du musst nichts tun:** Installation, Plan und Einstellungen bleiben wie sie sind, Updates kommen weiter über HACS. HACS erkennt NextFloor von selbst als normales Repository, sobald es seine Liste aktualisiert hat.",
|
||||||
|
"fr": "Merci d'utiliser NextFloor ! Vous l'avez installé comme dépôt personnalisé ; il fait désormais partie du store HACS officiel, les nouveaux utilisateurs cherchent simplement *NextFloor* dans HACS. **Rien à faire :** votre installation, votre plan et vos réglages restent tels quels, et les mises à jour continuent d'arriver via HACS. HACS reconnaît NextFloor comme un dépôt normal dès qu'il a actualisé sa liste.",
|
||||||
|
"es": "¡Gracias por usar NextFloor! Lo instalaste como repositorio personalizado; ahora forma parte de la tienda oficial de HACS y los nuevos usuarios solo buscan *NextFloor* en HACS. **No tienes que hacer nada:** tu instalación, tu plano y tus ajustes siguen igual, y las actualizaciones siguen llegando por HACS. HACS reconoce NextFloor como repositorio normal en cuanto actualice su lista.",
|
||||||
|
"it": "Grazie per usare NextFloor! L'hai installato come repository personalizzato; ora fa parte dello store ufficiale di HACS e i nuovi utenti cercano semplicemente *NextFloor* in HACS. **Non devi fare nulla:** installazione, planimetria e impostazioni restano come sono e gli aggiornamenti continuano ad arrivare tramite HACS. HACS riconosce NextFloor come repository normale da solo, dopo aver aggiornato il suo elenco.",
|
||||||
|
"nl": "Bedankt voor het gebruik van NextFloor! Je hebt het als eigen repository geïnstalleerd; het hoort nu bij de officiële HACS-store, nieuwe gebruikers zoeken gewoon naar *NextFloor* in HACS. **Je hoeft niets te doen:** installatie, plattegrond en instellingen blijven zoals ze zijn en updates komen nog steeds via HACS. HACS herkent NextFloor zelf als gewone repository zodra de lijst is vernieuwd.",
|
||||||
|
"pl": "Dziękujemy za korzystanie z NextFloor! Zainstalowano go jako repozytorium niestandardowe; jest już częścią oficjalnego sklepu HACS, więc nowi użytkownicy po prostu szukają *NextFloor* w HACS. **Nie musisz nic robić:** instalacja, plan i ustawienia pozostają bez zmian, a aktualizacje nadal przychodzą przez HACS. HACS sam rozpozna NextFloor jako zwykłe repozytorium po odświeżeniu listy.",
|
||||||
|
"pt": "Obrigado por usar o NextFloor! Você o instalou como repositório personalizado; agora ele faz parte da loja oficial do HACS e os novos usuários só procuram *NextFloor* no HACS. **Você não precisa fazer nada:** instalação, planta e configurações continuam como estão, e as atualizações seguem pelo HACS. O HACS reconhece o NextFloor como repositório normal sozinho depois de atualizar a lista.",
|
||||||
|
"sv": "Tack för att du använder NextFloor! Du installerade det som eget arkiv; nu ingår det i den officiella HACS-butiken och nya användare söker bara efter *NextFloor* i HACS. **Du behöver inte göra något:** installation, ritning och inställningar är oförändrade och uppdateringarna kommer fortsatt via HACS. HACS känner själv igen NextFloor som ett vanligt arkiv när listan har uppdaterats.",
|
||||||
|
"zh": "感谢使用 NextFloor!你是通过自定义仓库安装的;现在它已进入 HACS 官方商店,新用户直接在 HACS 里搜索 *NextFloor* 即可。**你无需做任何事:**安装、平面图和设置保持不变,更新仍通过 HACS 提供。HACS 刷新列表后会自动把 NextFloor 识别为普通仓库。",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _lang(hass: HomeAssistant) -> str:
|
||||||
|
language = (hass.config.language or "en").lower()
|
||||||
|
for key in (language, language.split("-")[0]):
|
||||||
|
if key in MESSAGE:
|
||||||
|
return key
|
||||||
|
return "zh" if language.startswith("zh") else "en"
|
||||||
|
|
||||||
|
|
||||||
|
async def async_notify_official_store(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
|
"""Show the note once, and only for an installation older than the store listing. Returns whether it was shown."""
|
||||||
|
created = getattr(entry, "created_at", None)
|
||||||
|
if created is None or created >= STORE_SINCE:
|
||||||
|
return False
|
||||||
|
store: Store[dict[str, bool]] = Store(hass, 1, STORAGE_KEY)
|
||||||
|
if (await store.async_load() or {}).get("shown"):
|
||||||
|
return False
|
||||||
|
lang = _lang(hass)
|
||||||
|
persistent_notification.async_create(hass, MESSAGE[lang], title=TITLE[lang], notification_id=NOTICE_ID)
|
||||||
|
await store.async_save({"shown": True})
|
||||||
|
return True
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"step": {
|
||||||
|
"user": {
|
||||||
|
"title": "NextFloor",
|
||||||
|
"description": "Adds a sidebar page where you draw your home and see it in 3D."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"abort": {
|
||||||
|
"single_instance_allowed": "NextFloor is already set up."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"announce": {
|
||||||
|
"name": "Announcement",
|
||||||
|
"description": "Speaks a message in rooms of the plan, each through its own speaker, and shows and speaks it on every open NextFloor screen.",
|
||||||
|
"fields": {
|
||||||
|
"message": {
|
||||||
|
"name": "Message",
|
||||||
|
"description": "What is said."
|
||||||
|
},
|
||||||
|
"rooms": {
|
||||||
|
"name": "Rooms",
|
||||||
|
"description": "Rooms by name, room id or area id. Empty: every room with a speaker (rooms in their quiet time are left out)."
|
||||||
|
},
|
||||||
|
"floor": {
|
||||||
|
"name": "Floor",
|
||||||
|
"description": "Only the rooms of this floor (name or id)."
|
||||||
|
},
|
||||||
|
"on_speakers": {
|
||||||
|
"name": "On the speakers",
|
||||||
|
"description": "Speak in the rooms."
|
||||||
|
},
|
||||||
|
"on_screens": {
|
||||||
|
"name": "On the screens",
|
||||||
|
"description": "Show and speak it on the open NextFloor screens."
|
||||||
|
},
|
||||||
|
"screens": {
|
||||||
|
"name": "Only these screens",
|
||||||
|
"description": "Names of NextFloor screens (set on each screen). Empty: every screen."
|
||||||
|
},
|
||||||
|
"tts_entity": {
|
||||||
|
"name": "Text-to-speech",
|
||||||
|
"description": "Instead of the one chosen in the plan, or the first one."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"reload_screens": {
|
||||||
|
"name": "Reload screens",
|
||||||
|
"description": "Makes the open NextFloor screens load their page again, a few seconds apart, for example after an update.",
|
||||||
|
"fields": {
|
||||||
|
"template": {
|
||||||
|
"name": "Card template",
|
||||||
|
"description": "Only the screens whose card uses this template. Empty: every open screen."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exceptions": {
|
||||||
|
"no_rooms": {
|
||||||
|
"message": "No room of the plan matches the rooms given."
|
||||||
|
},
|
||||||
|
"no_tts": {
|
||||||
|
"message": "No speaker could say it: set up a text-to-speech entity in Home Assistant."
|
||||||
|
},
|
||||||
|
"not_loaded": {
|
||||||
|
"message": "NextFloor is not set up."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"floor_open": {
|
||||||
|
"name": "{floor}: open windows and doors"
|
||||||
|
},
|
||||||
|
"floor_lights_on": {
|
||||||
|
"name": "{floor}: lights on"
|
||||||
|
},
|
||||||
|
"house_open": {
|
||||||
|
"name": "Open windows and doors"
|
||||||
|
},
|
||||||
|
"house_lights_on": {
|
||||||
|
"name": "Lights on"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"step": {
|
||||||
|
"user": {
|
||||||
|
"title": "NextFloor",
|
||||||
|
"description": "Přidá stránku na postranní panel, na které si nakreslíte svůj dům a uvidíte ho ve 3D."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"abort": {
|
||||||
|
"single_instance_allowed": "NextFloor je již nakonfigurován."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"announce": {
|
||||||
|
"name": "Oznámení",
|
||||||
|
"description": "Přečte zprávu v místnostech plánu (každou přes její vlastní reproduktor) a zároveň ji zobrazí a přečte na každé otevřené obrazovce NextFloor.",
|
||||||
|
"fields": {
|
||||||
|
"message": {
|
||||||
|
"name": "Zpráva",
|
||||||
|
"description": "Co má být řečeno."
|
||||||
|
},
|
||||||
|
"rooms": {
|
||||||
|
"name": "Místnosti",
|
||||||
|
"description": "Místnosti podle názvu, ID místnosti nebo ID oblasti. Prázdné: každá místnost s reproduktorem (místnosti v době nočního klidu/ticha jsou vynechány)."
|
||||||
|
},
|
||||||
|
"floor": {
|
||||||
|
"name": "Podlaží",
|
||||||
|
"description": "Pouze místnosti tohoto podlaží (název nebo ID)."
|
||||||
|
},
|
||||||
|
"on_speakers": {
|
||||||
|
"name": "Na reproduktorech",
|
||||||
|
"description": "Hlásit v místnostech."
|
||||||
|
},
|
||||||
|
"on_screens": {
|
||||||
|
"name": "Na obrazovkách",
|
||||||
|
"description": "Zobrazit a přečíst na otevřených obrazovkách NextFloor."
|
||||||
|
},
|
||||||
|
"screens": {
|
||||||
|
"name": "Pouze tyto obrazovky",
|
||||||
|
"description": "Názvy obrazovek NextFloor (nastavené na každé obrazovce). Prázdné: všechny."
|
||||||
|
},
|
||||||
|
"tts_entity": {
|
||||||
|
"name": "Převod textu na řeč (TTS)",
|
||||||
|
"description": "Místo vybrané v plánu nebo první dostupné."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exceptions": {
|
||||||
|
"no_rooms": {
|
||||||
|
"message": "Žádná místnost v plánu neodpovídá zadaným parametrům."
|
||||||
|
},
|
||||||
|
"no_tts": {
|
||||||
|
"message": "Žádný reproduktor nemohl zprávu přečíst: nakonfigurujte v Home Assistant entitu převodu textu na řeč."
|
||||||
|
},
|
||||||
|
"not_loaded": {
|
||||||
|
"message": "NextFloor není nakonfigurován."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"floor_open": {
|
||||||
|
"name": "{floor}: otevřená okna a dveře"
|
||||||
|
},
|
||||||
|
"floor_lights_on": {
|
||||||
|
"name": "{floor}: rozsvícená světla"
|
||||||
|
},
|
||||||
|
"house_open": {
|
||||||
|
"name": "Otevřená okna a dveře"
|
||||||
|
},
|
||||||
|
"house_lights_on": {
|
||||||
|
"name": "Rozsvícená světla"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loaded 100 of 955 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user