FloorPlan

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
houk
Posts: 17
Joined: Thursday 07 April 2016 16:53
Target OS: Linux
Domoticz version: 2023.2
Contact:

FloorPlan

Post by houk »

Hi guys.
about 6 years ago i wanted to change graphic file for my idx=1 floorplan and i go to images/floorplans download file, edit it (change colors, one wall etc)
Now i try to do same thing and floorplans are moved to sqlite. How to do it now?
I have on a plan almost 100 devices so please don't write delete plan and start over, this is whole day of nonsens work.
Daiii
Posts: 13
Joined: Saturday 12 August 2017 0:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: New Hampshire, USA
Contact:

Re: FloorPlan

Post by Daiii »

I've been curious about this too, and your question, though two months old, inspired looking into it. I hope this reply might still be useful.

Yes, Floorplan background images are now stored in the domoticz.db database. They are in a table called "Floorplans" having entries "Name" (the name you gave to each floorplan) and "Image" (the image file being used for the background). The image contents are stored as "blob data" in the database.

If you have the sqlite3 command line tool on your system you can extract the old floorplan image this way:

Code: Select all

sqlite3 domoticz.db "SELECT (writefile('oldimage.png', Image)) FROM Floorplans WHERE Name = 'MyPlan' ;"
Then make whatever changes you need to the image using your favorite graphical editor, write out a new image file, and update the database with:

Code: Select all

sqlite3 domoticz.db "UPDATE Floorplans SET Image = readfile('newimage.png') WHERE Name = 'MyPlan' ;"
Obviously, replace "MyPlan" with whatever name you gave your floorplan.

Note that the (generally very useful) SQLite Browser tool, in its default configuration, does not seem to have the writefile() and readfile() functions built in. But the simple command line tool works fine out of the box.
jibenito
Posts: 9
Joined: Thursday 01 February 2024 13:04
Target OS: Linux
Domoticz version: 2025.1
Location: Spain
Contact:

Re: FloorPlan

Post by jibenito »

Hello everyone, I am new to the forum but not to domoticz. I have been using it for years, first on a rapsberry pi and now on a mini pc with Ubuntu, zigbee, mqtt, netatmo...
The point is that I am delighted with it, but now I find myself with an issue that I don't know how to solve. Until now I had a floorplan with the sensors, switches... placed in it and everything worked ok. But now I have decided to give it a facelift and have changed the floorplan to 3D. The point is that the uploaded plan does not occupy the entire screen, but rather there is a lot of "wasted" space as you can see in the image (red circles). I don't know if the plane can be enlarged or it has to stay like this. I already have the rooms configured to zoom when clicking on them, but I would like the general plan to look larger.
Thank you all.
Attachments
floorplan.jpg
floorplan.jpg (311.59 KiB) Viewed 661 times
User avatar
waltervl
Posts: 5762
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: FloorPlan

Post by waltervl »

I think you have to create a new floorplan image that fits your screen better.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jibenito
Posts: 9
Joined: Thursday 01 February 2024 13:04
Target OS: Linux
Domoticz version: 2025.1
Location: Spain
Contact:

Re: FloorPlan

Post by jibenito »

Thanks,

I have created another plan with other proportions and I have increased the work area and it looks bigger and better.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest