Page 1 of 1

FloorPlan

Posted: Sunday 26 November 2023 19:14
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.

Re: FloorPlan

Posted: Wednesday 17 January 2024 22:10
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.

Re: FloorPlan

Posted: Thursday 01 February 2024 13:24
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.

Re: FloorPlan

Posted: Thursday 01 February 2024 14:01
by waltervl
I think you have to create a new floorplan image that fits your screen better.

Re: FloorPlan

Posted: Monday 05 February 2024 14:24
by jibenito
Thanks,

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