I don’t think you do, you just export the image and map that in whatever svg software you are using, for instance Inkscape.
I import the JPG in the inkscape and then file export SVG?
After making the flooplan on the website, I used inkscape software to import the SVG images on the floorplan where each SVG is mapped to the corresponding entity that you want to display/control.
cool - i thought there was some super fancy 3D lighting effect.
Love floorplanner.com (in fact that is what inspired me to try the 3D view)
thanks
Ok now I get it.
Import the JPG in inkscape as base image and on top of it add SVG objects/icon and give the entity_id.
I added my first lamp: if I go with the mouse and click on it it works perfectly, on the contrary if I use touch (both on tablet-pc or android smartphone) the touch is not working/giving the toggle command
ANyone knows why?
how to display a temperature from a sensor in inkscape?
Been eyeing up Floorplan for a while, now finally my system is ready to take advantage of it. So this is an early screenshot of my plan.
I built it in Magicplan which was very easy and looks really good.
I’ve added sensor values and coloured up rooms based on usage/presence. However I can’t get image templates to work correctly. Each of the rectangles should be substituted for an image (motion detectors) that change when triggered. The only one that shows up is the one assigned to the red rectangle but not in the right place- its below the main plan and it’s also fixed in the same way the + - Reset buttons are when you pan around. If I hover my mouse over either the image or the rectangle both display my sensor information and I can click to the get the state card.
The image at the bottom does work when the motion sensor is triggered - the image is toggled between on & off svgs. But its just in the wrong place - and the others are not visible at all.
Floorplan.yaml:
- name: Motion detectors
entities:
- binary_sensor.smallbathroom_1_2
- binary_sensor.motion_livingroom
- binary_sensor.motion_kitchen_1
- binary_sensor.motion_kitchen_2_1
- binary_sensor.motion_kitchen_2_2
- binary_sensor.motion_bedroom
image_template: ’
var imageName = “”;
imageName = “motion_detector_off”;
switch (entity.state) {
case “off”:
imageName = “motion_detector_off”;
break;
case "on":
imageName = "motion_detector_on";
break;
}
return "/local/custom_ui/floorplan/images/" + imageName + ".svg";
'
Motion svg files at: HomeAssistant_Config\www\custom_ui\floorplan\images
My rectangles are at the root level in the svg (not in layers).
Followed all the guides I can but still don’t know what’s going on here. Any ideas?
Just finished a new floorplan for my home’s water management that I hope can complement my other floorpans for different areas/systems. Note that I have yet to implement floorplan!
The plan is to use @ryanrdetzel’s implementation of multiple layers and javascript to switch between different floorpans. More info about this feature can be found here: https://github.com/pkozul/ha-floorplan/pull/41/commits/77fa70a32673bbd801086e760eb4876732ac7d15
A problem I see I will face is that the same entity is used in several layers. In SVG files, entity ID’s must be unique and you can not use the same entity with the same ID in different layers. Is there any way around this, like aliases or giving multiple names in Home Assistant to a single entity?
Any assistance is welcomed!
First and foremost nice setup. To the best of my knowledge, you can customize the same entity with a different name allowing you to use it in different places on the floorplan. I’m sure other on this forum will have other ideas to accomplish it.
Thanks William, I can’t find info on how to do this and whether the same device’s different entity names will all get updated when the status of one ID is changed.
One way I thought about achieving this is by creating different groups with just one entity in them… I’m unsure how messy this would make the config!
Hi there!
What a great function this is for HA, I really like it!
To my question: Have anyone managed to control layer opacity with a dynamic value? Or is it even possible?
I have done a 3D-rendering of my house with individual brightness layers for each room. Right now I can dim the room “on” “off” based on a light or group, but I would like it do dim in let’s say 10 steps from 0-100.
I would really appreciate any input and promise to show my setup when v1.0 is released
5,000 restarts later and I’ve got myself the base of a working floorplan for my ‘new’ black Friday tablet.
Thank you @pkozul, I can’t imagine how much time you must have spent working out how to pull this all together, very much appreciated.
anyone has my behaviour? I just want to understand if this is normal (not possible to use touch) or if I am doing something wrong (what?)
Touch should work. I’m afraid I can’t help you more than that.
Do you have to use layers in Inkscape?
I don’t know if you ‘have to’ but I certainly did. It made it easier for me to show/hide the layer that I am actively working on. I also lock them so I do not accidentally grab or change anything while working on a specific object.
I have motion, camera, control, environment, and text layers.
I solved my svg image templates putting images in wrong place by disabling the pan/zoom function. If you use pan/zoom you’ll move around your floorplan but the sensor images will be frozen and not move with the plan. They also end up in the wrong place to start with when using pan zoom function so its best not used currently.
WHat I don’t understand of this setting:
JPG of floorplan and on top SVG objects (camera, light, whatever), it works but not the TOUCH function. Have you any clue of why?
Am I forced to convert the JPG into SVG?
Do I have to work with layers (but do not understand how this works)?
Having trouble seeing my floor plan inside the panel. I think I have copied and placed the right files in the correct directories. I can see the navigation for the new panel, but the panel is empty (my svg is not showing).
Files are the following;
Config/floorplan.yaml
Config/panels/floorplan.html
Config/www/custom_ui/floorplan/floorplan.svg
Config/www/custom_ui/floorplan/ha-floorplan.html
Config/www/custom_ui/floorplan/floorplan.css
Floorplan.yaml has the following directories listed;
name: Thames Home Floorplan image: /local/www/custom_ui/floorplan/floorplan.svg stylesheet: /local/www/custom_ui/floorplan/floorplan.css
Any help is appreciated! Thanks
AFAIK your links in floorplan.yaml should be :
image: /local/custom_ui/floorplan/floorplan.svg
stylesheet: /local/custom_ui/floorplan/floorplan.css