Your Home Digital Twin: Interactive floor 3d plan

Hi @adizanni, see below two differents test with “backgroundColor: transparent” command :

  1. With pre selected Backend Theme

  1. With original HA Background

Im both cases the background of the image remains white instead of transparent.

I’m sorry but I’m not able to reproduce, can you try the standard dark theme (you activate it in your profile)

And please post the console output that includes the card version and any error that are displayed.

Please, see below with the standard dark theme:

Hello Vincenzo, I think this means that the other teams have default card background set to white and this is something Icannot control. But I will try to do further tests with custom themes…

Hi! I can’t use the card with tablets or smart phones: when the project finish 2/2 100% start with default camera but HA application or browsers crash

1 Like

@Amerigo_Rossi, if the model is too heavy the old Smartphones and Tablets are not able to load. I suggest you start with smaller models check if it is working and add additional elements little by little to have a model that can be loaded smoothly.

1 Like

Hello everybody,

I think that I may have done a change that is causing more confusion than actually help people configure the card.
A few version ago I introduced the sample model that is loaded automatically when you first add the floor3d-card to the view.
The card uses a sample model that is loaded into the HACS community folder, binds randomly some of your existing entities to object in the model and creates some object groups.
When you replace the sample model with your own model please follow these steps:

  1. You better not put your model in the HACS community folder. Create a folder under /config/www/<model folder> and reference it in the card path with the URL /local/<model folder>

  2. When you replace the sample model with your model, you need to remove all entities from the card configuration, otherwise you will have an uncaught errors due to the fact that the object ids of the sample are not anymore present in your model

  3. Remove the object groups too for the same reason as 2.

Hope it is clearer, I thought I did something to assist but many people is having uncaught errors because of this.

1 Like

Thank you, Andy, for your wonderful addition. I personally find it to be among the most transformative applications and helps unleash the full potential of home automation. Here’s what I have thus far:

I’m having some trouble with making a .glb version of my model. I could not get nodejs to run on Windows, but I did get it to work on MacOS. Using either MacOS or Blender to do the transformation from .obj to .glb format, my model got flipped so that I can only view it on a vertical edge:

Any thoughts on what I may be doing incorrectly or how to fix it?

Thanks again.

1 Like

Hello @FortranFour, thanks for your words, it helps me to stay motivated in maintining and evolving the project.

I’ve tried with Blender myself but, unfortunately, it was a dead end. Why ? You can solve the axis flipping by unchecking the option I have highlighted in the picture below.
Nevertheless the export to glb breaks a number of other things that cannot be fixed by parameters. One critical problem is the object_ids. They are not preserved and they are not following the Sweethome naming from the .obj export. So, it is unusable for me. I reckon that the current way to export to glb I have recommended (nodejs routine) is a little complicated, but I’m surprised it is not working on MacOS (flipped axis): are you clearing the cache after you tried the blender and the nodejs version of the file ? Another option is to add a version in the card (ex. home.glb?ver=1 then 2,3 etc) or change the name of the file (ex. homeblender.glb and homenodejs.glb) ?.
I’m trying to include a glb exporter in my ExportToHASS plugin, but this is not an easy one and it will take time.

image

Thanks for the quick response. Changing the file name fixed the issue–a simple fix.

1 Like

For one who has a computer with 2 (or more) gpus, like in laptops with a second NVIDIA gpu, one may notice that either Chrome or Firefox actually use the internal Intel UHD Graphics instead of NVIDIA.
That makes the rendering slow and the experience frustrating.
Steps to dramatically improve the rendering.
A. Firefox

  1. In NVIDIA Control Panel 3D Settings->Manage 3D Settings->Program Settings Tab->1. Select a program to customise->Mozilla Firefox → 2. Select The preferred graphics processor->High performance NVIDIA → 3. OpenGL rendering GPU → NVIDIA;
  2. In Firefox address bar, type about:config. Search ‘webgl.disable-angle’ and set it to true (that instructs Firefox to use OpenGL).

B. Chrome

  1. In NVIDIA Control Panel 3D Settings->Manage 3D Settings->Program Settings Tab->1. Select a program to customise->Google Chrome-> 2. Select The preferred graphics processor->High performance NVIDIA → 3. OpenGL rendering GPU → NVIDIA;
  2. In Chrome address bar, type chrome://flags/#use-angle. Select OpenGL. Restart Chrome;
  3. In Chrome address bar, type chrome://gpu. Search for ‘GL_RENDERER’ and check if it say 'ANGLE (NVIDIA … OpenGL … );
  4. I still experiment with ‘chrome://flags/#enable-drdc’.

C. Edge

  1. In NVIDIA Control Panel 3D Settings->Manage 3D Settings->Program Settings Tab->1. Select a program to customise->Edge-> 2. Select The preferred graphics processor->High performance NVIDIA → 3. OpenGL rendering GPU → NVIDIA;
  2. In Edge address bar, type edge://flags/#use-angle. Select OpenGL. Restart Edge;
    I couldn’t figure out how to do it in Edge. It should be like chrome, because Edge is chromium. But for some reason it doesn’t work. Checking edge://gpu GL_RENDERER shows Direct3D11 instead of OpenGL.

Cheers,
us

3 Likes

Thanks @uss i steal it and put it in the readme !!

I thank you!

I strongly recommend converting models to the .glb format. They are about half the size, load more quickly, and only a few of the object ids were changed, which appeared to be the result of complex objects being rendered more smoothly by fewer individual components. For example, my SH3D file for my house (excluding garage), shown below, is 91.4 MB. The uncompressed .obj file is 81.3 MB, whereas the .glb file is only 52.2 MB, which is sufficiently small to run smoothly on my iPhone 12. I run Home Assistant at a remote location and access it through Nabu Casa, which can be a problem for uploading files, because Hass.io Ingress blocks uploads greater than 16 MB. However, 52.2 MB compresses to a Zip file just under that limit (using the greatest level of compression on 7Zip), so that I can upload it, without splitting it into multiple parts, and then expand the file using a terminal command. It’s worth noting that Andy’s Sweeet Home ‘export obj to HASS’ plugin does not compress the resulting zip file.

2 Likes

@FortranFour I’m just curious. Why does it show in gray with no colors?

1 Like

Good to have these feedbacks. The routine to zip in the ExportToHASS plugin is not mine, I got it from another plugin, but I may look why it is not compressing (I did not notice). Of course if you have to deal with upload limitation I understand you are doing all effort to shrink, which lead me to the same comments made by @uss below: it is like you have removed all materials. I remind you that all files (material and textures) need to be in the folder when you are using the objtogltf converter.

I didn’t see the zip problem. For my house the zip file is 117,709,387 bytes and the expanded files are 117,678,451 bytes. So the zip is actually bigger than the files.
Uncompressing and compressing again with 7z set to zip gives 26,321,577 bytes so basically 25%.
So, Andy, the zipping is wrong.

Tip for Windows.

When one generates zip after zip when building the house in SH3D and opens the zips, eventually it will take ages to open any zip.
To solve that, open Control Panel Items, open File Explorer Options, and press Clear File Explorer history.

I changed nearly everything to grayscale. The gray is just my preference, so that I can highlight areas to click and more clearly distinguish when lights are turned on, using a pop of color.