Share your Floorplan

Hello infidels, :slight_smile: and a big welcome to 2018 from my part, to this beautiful community.

OK guys, I really need some help here. I’m not new at this, but for the life of me I can’t get this to look the way it should. So, in short, here are the facts:

  1. I have a floor plan (the view of my apartment from the top) which I decided to change, for ease of use sake, and other reasons.
  2. I have a bunch of iPad Minis, 2 and 3 gen. I have at least 3 which I’ve decided to mount on the walls. These iPad Mini, have a native resolution of 1536 x 2048 (Width x Height).
  3. In Inkscape, I created the new floorplan.svg, and give it the custom dimensions above, in pixels. The view area is the same dimensions.
    This is what I get :slight_smile:

I get the B view every time I open the Home Assistant IOS app.
Now, the B view has white spaces all around, but the white space on the left, right and top, were created by me (just white rectangles, over the brown coffee background image). Why did I do that ? Because of the white space at the bottom of which I cannot get rid of !!! … and I like things to look proper.

So, when I open the app, the real svg looks like A view on the right, left and top, but looks like B view on the bot ! WTF ! … :slight_smile:

I have 2 options here:

  1. Every time I open the app, I need to pinch to zoom to make it cover the whole screen. … fk it
  2. I set the ipads to never shut down the screens, never lock, and never close … and I only pinch to zoom once, and I leave it like that … but my ocd will kill me … :slight_smile:

Help, help, help … or I’ll be dead !, I already tried every combination of resolutions possible, to no avail … It must be something that can be done, but I miss it … I’ve been going around this for 4 days now and now I cant think past this and came here to finally ask for your help … :slight_smile:

The floorplan.svg is not near to be finished. I will describe it once its final. I have a lot of work to do still, but meantime, during these tests, maybe you can help me get this thing resolved. Thank You.

Thank you so much for that TV powered Idea…I was wondering for the longest time how I shoule make this visible…that’s a fantastic way of doing it! Great work!

PS: Your beds seem so short for some reason xD

~Cheers

here I am!

I`m new to floorplan, but encounter the same issue you did.
I have a phone with resolution 2560x1440. But for the image to fit my screen perfectly, I have the vcg file at resolution 2700x1750.
But I use google chrome browser on android.

You probably already did this, but in case not:

1: Change the resolution on the svg-file to ex. 1700x2400 and enlarge the background to that resolution, to see if anything changes.
2: Enlarge the background to be bigger than the borderlines in inkscape (or the program you use) and see if anything changes
3: Try to open floorplan in Google Chrome.

I`m sorry if you already try this, but the first one was the solution to me.

Edit: For the bottom white part, check out post 130 by Will_Garbutt
Edit 2: That seems to fix everything. When I fixed that now, I could resize down my SVG-file. When you have that white bar, the whole image resizes, and therefore the pixels gets strange values. To use the pixels the screen have on the tab or phone, the picture needs to show on the whole screen (also above the status bar at the top too I think).

Here are the files! Enjoy.

https://drive.google.com/drive/folders/1sx0nliMFfDfV8HK240G-6caKuMJjImEX?usp=sharing

1 Like

Can you share your css, .svg and .yaml for your floorplan!? Would love to steal a few ideas from it!

1 Like

@zepxir, no not yet unfortunately. Floorplan is revealing itself to be more complicated than I had hoped for. Will get there in the end…

more info can be found here: Github Floorplan Layers by @ryanrdetzel

has anyone got any ideas how you could put the ‘spotify ui’ from the non floorplan version into a rect?

My thought was to have a spotify_toggle_button on each floor, which brings up the UI

I know a number of folks have made their own UI, but trying to minimize effort :wink:

Hey,

I got 2 questions for now.

  1. How can I make my floorplan look bigger on my 7" tablet? (Solved, in Inkscape I pressed edit and “Resize page to selection”.
  2. Why does the text font differ on PC and tablet/phone?
Pictures below:


The mac address is the mac address of the firetablet running Fully Kiosk Browser.

Thank you very much.

The fonts differ due to your phone not having that truetype font installed on it.
If you’d like them all the same, use a generic font all devices should have.

Thanks! I will try! :slight_smile:

This looks amazing! How did you get the room to light up? Are you using layers or something in the svg file?

Hello, first i want to give a big thanks to “pkozul” and all the people involved in the creation and evolution of this wonderfull feature. To “oakbrad” thank you for your beautyfull floorplan and awsome buttons. You have been my inspiration source for my own floorplan and again i would like to thank you for this.

I would like to know if it’s possible in your .svg file to “unhide/show” the invisible objects (filaments in the bulbs ‘glow’,…). For exemple when i had your ‘input_boolean.ui_livingroom’ to my floor plan it keeps the shadows from your floorplan objects. I wish i could change or replace it but i really don’t know how.

I’m sorry but i’m complete noob in .svg, .css and any help would be awsome.

Thanks.

Here’s my floor plan. I still need to add lights, power strips, etc.

If anyone is interested, I tweaked the ha-floorplan.html to support RGB lights.
The light should change its color and brightness based on the “rgb_color” and “brightness” attributes of the entity.
I only tested it with my Xiaomi Gateway but it works really nice.

Here is the code you need to add to ha-floorplan.html (just before the class_template code):

      if (entityConfig.group.rgb_template) {
        if (entityState.attributes.rgb_color) {
          rgb = entityState.attributes.rgb_color;
          fill = `#${rgb[0].toString(16)[0]}${rgb[1].toString(16)[0]}${rgb[2].toString(16)[0]}`;
          if (entityState.attributes.brightness) {
            fillOpacity = entityState.attributes.brightness / 255;
            if (fillOpacity < 0.5)
              fillOpacity = 0.5;
          }
          // Fill element based in rgb_color and brightness
          svgElement.style.fill = fill;
          svgElement.style.fillOpacity = fillOpacity;
        }
        else {
          // Off state - use class specified in floorplan.yaml
          targetClass = this.assemble(entityConfig.group.rgb_template, entityState, entities);
        }
      }

In the floorplan.yaml add these lines:

    - name: Gateways
      entities:
        - light.gateway_light_7811dcb23b46
      rgb_template: '
        return "off-state";
      '

The rgb_template returns the CSS class for the “off” state.
Now you should have an RGB light that changes its color dynamically.

:yum:

10 Likes

Thanks for sharing this really useful code! But I don`t seem to get it to work with my Hue lights.
Can you please share some text above and below your code in the ha-floorplan.html, so I can check if I have pasted it in the correct place, and have the correct spacing?

Edit: Just forget it, I just needed to delete the browser cache. So now it works! Thank you :smile:

That’s great.
I’d like to thank the creator of the floorplan add-on for writing this excellent code and all the other contributers in the forum. The result looks amazing and I’m adding more components every day.

1 Like

Can you post your files?

i can try - but i have currently moved away from floorplan - i’m working on custom tiles and custom UI. What specifically did you need?