diff --git a/restricted/rooms.php b/restricted/rooms.php index e947a86..d631336 100644 --- a/restricted/rooms.php +++ b/restricted/rooms.php @@ -15,9 +15,14 @@ * * Ein Raum ohne x/y ist trotzdem ein Raum: Geräte lassen sich ihm zuordnen * (siehe die Spalte actors.room und den Zuordnungsdialog in der Karte - * "Automatismen"), er erscheint nur nicht als Kachel im Grundriss. Das - * betrifft Räume ohne Thermostat - die Küche im EG, die Technikräume -, - * deren Kachel eine Temperatur anzeigen würde, die niemand misst. + * "Automatismen"), er erscheint nur nicht als Kachel im Grundriss. Derzeit + * hat jeder Raum eine Kachel; die Unterscheidung bleibt, weil ein neuer Raum + * zuerst als Zeile ohne Position entsteht und erst dann seinen Platz im + * Grundriss bekommt. + * + * Wo eine Kachel hingehört, misst tools/kachelpositionen.php aus: Grundriss + * mit Raster, Geisterkachel am Zeiger, fertige Zeile zum Abschreiben. x/y + * ist die linke obere Ecke der 24 x 19 grossen Kachel, nicht ihre Mitte. */ // Reihenfolge im Menü und in der Anzeige; OG ist die Standardetage. @@ -29,17 +34,19 @@ $rooms = [ ["floor" => "OG", "mqtt" => "Schlafzimmer", "id" => "schlafen", "x" => 235, "y" => 70], ["floor" => "OG", "mqtt" => "Bad", "id" => "bad", "x" => 260, "y" => 120], ["floor" => "OG", "mqtt" => "Buero", "id" => "buero", "x" => 265, "y" => 175], + ["floor" => "OG", "mqtt" => "Kueche", "id" => "kueche", "x" => 122, "y" => 138], + ["floor" => "OG", "mqtt" => "Technik", "id" => "technik", "x" => 173, "y" => 67], ["floor" => "EG", "mqtt" => "Wohnzimmer", "id" => "wozi", "x" => 185, "y" => 150], ["floor" => "EG", "mqtt" => "Florian", "id" => "kizi", "x" => 130, "y" => 90], ["floor" => "EG", "mqtt" => "Schlafen", "id" => "schlafen", "x" => 235, "y" => 80], ["floor" => "EG", "mqtt" => "Bad", "id" => "bad", "x" => 253, "y" => 130], ["floor" => "EG", "mqtt" => "Magdalena", "id" => "buero", "x" => 258, "y" => 180], - ["floor" => "EG", "mqtt" => "Kueche", "id" => "kueche"], - ["floor" => "EG", "mqtt" => "Technik", "id" => "technik"], + ["floor" => "EG", "mqtt" => "Kueche", "id" => "kueche", "x" => 126, "y" => 146], + ["floor" => "EG", "mqtt" => "Technik", "id" => "technik", "x" => 172, "y" => 78], ["floor" => "UG", "mqtt" => "Buero", "id" => "buero", "x" => 140, "y" => 140], ["floor" => "UG", "mqtt" => "Bad", "id" => "bad", "x" => 210, "y" => 80], ["floor" => "UG", "mqtt" => "Kueche", "id" => "kueche", "x" => 190, "y" => 195], - ["floor" => "UG", "mqtt" => "Technik", "id" => "technik"], + ["floor" => "UG", "mqtt" => "Technik", "id" => "technik", "x" => 238, "y" => 93], ]; /** diff --git a/tools/kachelpositionen.php b/tools/kachelpositionen.php new file mode 100644 index 0000000..c8d2fae --- /dev/null +++ b/tools/kachelpositionen.php @@ -0,0 +1,214 @@ +/smart/tools/kachelpositionen.php + * + * Bewusst eine eigene Seite und kein Eintrag im Menü: sie wird gebraucht, + * wenn ein Raum dazukommt, und das ist selten. + */ + +require_once(__DIR__ . "/../helper.php"); +require_once(__DIR__ . "/../restricted/rooms.php"); + +if (!checkLogin()) { + http_response_code(403); + exit; +} + +/** So groß ist eine Kachel im SVG - siehe restricted/home.php. */ +const KACHEL_BREIT = 24; +const KACHEL_HOCH = 19; + +/** So groß ist die Zeichenfläche. */ +const PLAN_BREIT = 400; +const PLAN_HOCH = 300; + +?> + + + + +Kachelpositionen + + + +
+ +

Kachelpositionen im Grundriss

+

+ Die Zeichenfläche ist × . Eine Kachel ist + × groß, und x/y + in restricted/rooms.php ist ihre linke obere Ecke – die + Punkte an den vorhandenen Kacheln zeigen, wo dieser Bezugspunkt sitzt. + Zeig auf die Stelle, an der die Mitte der neuen Kachel liegen soll; das gelbe + Rechteck zeigt sie in Originalgröße, darunter stehen die Werte für die Tabelle. + Ein Klick friert die Ablesung ein. +

+ + + +
+

+ · noch ohne Kachel: + +

+ + + + + + + + + + + + + + + + + + + + + + ,)"> + + + + + + + + + +

Zeiger über den Grundriss bewegen …

+
+ + +
+ + + +