shmuelzon / home-assistant-floor-plan

Home Assistant Floor Plan Generator Plugin For Sweet Home 3D
MIT License
129 stars 4 forks source link

Home Assistant Floor Plan Plugin for Sweet Home 3D

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.

Features

Rendering Modes

This plugin supports 3 modes for rendering the different lights

CSS

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.

Room Overlay

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.

Complete Renders

This mode renders separate images for all possible light combinations on the rendered floor. It requires generating many renders but offers the best quality.

How To Use The Plugin

  1. Download the latest plugin from the releases page and install it
  2. Prepare your model to fit with the criteria of this plugin
  3. Start the plugin by clicking the "Tools"->"Home Assistant Floor Plan" menu
  4. Modify the configuration options accordingly
  5. Click "Start"
  6. Copy all images under floorplan folder to your Home Assistant path
  7. Create a card of type picture-elements in Home Assistant and paste the contents of the generated floorplan.yaml

Configuration Options

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.

Preparation

Suggestions

For best results, it's suggested to:

When using the "Room overlay" light mixing mode, it's also suggested to:

Frequently Asked Questions

Possible Future Enhancements