This project is a plugin for the Sweet Home 3D interior design application. It allows creating a 3D rendered floor plan panel for Home Assistant that displays your home's current lighting state along with icons for toggling each light, sensors and cameras.
This plugin supports 3 modes for rendering the different lights
In this (recommended) mode a base image is generated with all the lights turned off. Then, for each light source, a new image is rendered with only it turned on. The floor plan YAML then instructs the browser how to mix the different lights sources from each render when multiple light sources interact with each other.
This method offers good results with a low number of required images to render.
The floor plan is comprised of one base/background image without any of the lights turned on. Then, for each light, it generates an overlay image where only changed pixels are included and the rest of the image is transparent. This allows for overlaying multiple images, with multiple lights turned on together without the need for different renders for all possible combinations.
In order to get the best results for lights that do interact with each other, i.e., the lights that appear in the same room, will be rendered with all possible combinations. This approach significantly reduces the number of rendered images, compared to all possible combinations of the entire floor.
This mode renders separate images for all possible light combinations on the rendered floor. It requires generating many renders but offers the best quality.
floorplan
folder to your Home Assistant pathpicture-elements
in Home Assistant and paste the
contents of the generated floorplan.yaml
The configuration window displays a list of detected lights grouped according to the room they're located in. Please verify the list matches your expectations.
The progress bar at the bottom will indicate how many images need to be rendered for the complete floor plan and will progress as they are ready.
light.xxx
, switch.xxx
binary_sensor.xxx
camera.xxx
climate.xxx
cover.xxx
fan.xxx
media_player.xxx
sensor.xxx
switch.xxx
For best results, it's suggested to:
When using the "Room overlay" light mixing mode, it's also suggested to:
Where should I copy the generated files and what should I copy?
After the process is complete, copy the floorplan folder and floorplan.yaml
to your Home Assistant path, e.g., /config/www
.
How do I select the desired perspective for rendering? Before activating the plugin, set the SH3D project to the specific 3D point of view that you want to be rendered.
How do I change the rendering settings? Prior to activating the plugin, go to "Create photo..." in the SH3D project and adjust the settings there. You do not need to render or save anything; simply make the changes and close the dialog.
Can I work on the SH3D project while rendering? No, do not make any changes or interact with the 3D view while it’s rendering. These actions will be captured by the plugin as it scripts the renders one by one. Start the rendering process and then leave it to complete.
What's the difference between renders
and floorplan
folders?
The renders directory includes the rendered images as generated by SH3D. The
floorplan directory includes the images you need to copy over to Home Assistant.
With the CSS option, both directories are pretty much the same, except that the
base image (with all the lights turned off) exists only in the floorplan
directory. This is because in this mode, we let the browser to the light
blending and this plugin doesn't need to do anything special.
With the room overlay mode, the renders, again, includes all the images generated by SH3D while the floorplan directory will include the processed images with the transparent background.
The renders directory was created (back when room overlay was the only option) in case one wanted to change any parameters (like the sensitivity) to generate a new floor plan without needing to wait for all the renders from SH3D, which don't change. It's basically a cache of rendered images.
What's the use of Use existing renders
option?
Technically this option can work with any mode. You can start with the CSS
mode and generate the least number of needed renders but then decide to switch
to room overlay. When doing so, you already have part of the required renders
and there's no need to generate them again. If you started with room overlay and
switched to CSS, you'll have all of the required images and the whole process
will be done in a few seconds