Your Home Digital Twin: Interactive floor 3d plan

Hello @scoutamis123 , I do not have the same problem, can you please open the developers tool and see if there is an error related to the load of the materials ? It really seems that the textures are not loaded…

I searched the entire log since I restarted home assistant and I don’t see any mention of Floor 3D Visualization at all. Was there somewhere else I can look to see errors more specific to this addon? Sorry I’m not very familiar with debugging anything

In the case of the custom card the log is the console in the browser. In chrome in the page of the bugged floor3d card you have to open the “more tools”“development tools” from the browser menu and look into the console tab You will see a few regular entries related to loading the model in the card and, if there is an error you copy an paste the content.

This is the entirety of the developer tools in Google Chrome. Looks like it’s an issue specific to Chrome because all my textures load fine on the Android app and on Microsoft Edge.

The only thing that come to my mind is to do either of these 2 things:

  1. Clear Browser cache
  2. If you do not want to clear the browser cache you can put this in the parameter of the floor3d card: <mtl file name>?ver=1 (ex. ‘home.mtl?ver=1’) and for any new version of the mtl file you will have to put a different number.

Sorry but I cannot reproduce it so I’m blind. In my setup Chrome loads textures in exactly the same way.

1 Like

New video of my series Your Home Digital Twin: Your Home Digital Twin: Floor3d Custom Card for Home Assistant - Episode 3 - Your first card - YouTube

Turorial on the usage of the floor3d-card

2 Likes

Hello.
I admire the idea.
I have a problem.
I do not have visible elements such as btama, sofa, single lamps, garage door.

Hello @dachdeker.biuro, I need more info to fix your problem. The configuration of the card, the sh3d or obj files, etc.

Added another episode of my series. This time it is about the sweethome3d plugin to facilitate export to Floor3d card: Episode 4 - Export to HA Plugin for Sweethome3d - Floor3d Custom Card for Home Assistant (YHDT) - YouTube

2 Likes

Great plugin, I’ve got my floor plan working ok but wondered how I should set the interaction for when I click on a Sonos speaker (or anything that needs something other than on or off really). I have been using Gesture, then media.player for the domain and media_play_pause for the service but ideally I’d like to be able to launch the more-info panel, is this possible?

1 Like

In fact I did not think about this case, but you can use a back-door I have opened in a recent release :slight_smile:
Check at this code:

type: custom:floor3d-card
....
click: 'yes'
....
entities:
  - entity: media_player.something
    action: more-info
    object_id: TVScreen_3

Not sure this answer your need, but if you now click on the media player object, the more-info will pop-up

2 Likes

Very cool!
Can this be toggle also?

That is exactly what I was after. Perfect!

1 Like

I could do toggle using call service but this is what I was after

image

1 Like

First of all thanks a lot @adizanni for the work done. I have followed all your youtube tutorials and getting things working was a breeze.

I am pretty happy with what I have been able to achieve in just a few hours:
2022-02-02 08_18_13-Window

Now I did some changes to my model yesterday and I’ve updated all the files into my www folder using samba share. After clearing the browser cache all looks good now when I use HA via a browser. But when I use HA via my mobile (using the companion app via Nabu Casa) I still see my previous model. How do I get the current model to also show up correctly on my mobile?

2 Likes

Hello Erik, even better than clearing the cache: you can add a version in the file names of the model, example:

name: My home
path: /local/home/
objfile: home.obj?ver=1
mtlfile: home.mtl?ver=1

This way you force the load of the new version of the object regardless if you are on mobile or pc browser.

1 Like

Ok thanks for the prompt reply. I will give that a try this evening!
I still need to play around with the card itself a bit more, for now I was focusing on the model and I’ve quickly got a light working. So I might get back with some additional questions later on :slightly_smiling_face:

1 Like

A thought for the card. I see in some other threads where people are using Sweet home 3d models in combination with the picture elements card that people have a day and nighttime view. Possibly driven by the sunrise and sunset logic in Home Assistant. Would this be a possibility?

Hello @Kire88, you can create a sensor defined like this in your configuration.yaml file:

sensor:
  - platform: template
    sensors:
      global_light_power:
        friendly_name: 'Global light power'
        value_template: "{{ max(state_attr('sun.sun', 'elevation') / 90, 0.2) }}"

and then you can use this parameter in the card:

....
globalLightPower: 'sensor.global_light_power'
...

This way your card will have an illumination that will depend on the sun elevation.

3 Likes

@adizanni I am trying your suggestion. The current sensor value is 0.2 and it makes the entire card pretty mark dark, also the light that I have switched on in the house, which I have given a value of 1000 lumen inside the card.

Also in my card the name is Global Light Scene, but I guess its the same field you are referring to:
2022-02-03 21_19_31-Window