Your Home Digital Twin: Interactive floor 3d plan

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

Yes the parameter is Global Scene Light and yes you have set it correctly.

You can adjust the calculation of the sensor according to your wish. The sun elevation is max 90 degrees in the summer at noon (depending on your latitude). You can also fix the parameter Global Scene Light between 0 and 1 and then adapt your calculation accordingly.

I have this effect in my card with the same parameters:

1 Like

I seem to have fixed the issue. The sensor should not have the ‘’ around them. It now shows a similar view as yours, which indeed corresponds to the value of 0.2 in case I put that value in manually.

1 Like

Yes, my yaml code for the card is valid when you are using the Code Editor not the Visual Editor. In the Visual Editor you have to remove the quotes. It will be difficult to achieve the photo realistic render you can do in the Picture Element Card, but I think that the result is still pretty good.

I like it for now, will see how it looks like tomorrow during daylight :slightly_smiling_face:

Thanks again for your prompt replies. I have to also say your youtube tutorials have been really helpful, so keep up the good work.

1 Like

Hi @adizanni

As others have said, thank you for the work that you have done. I am really excited about the potential for this card. I have been experimenting and it looks like the card can handle many of the devices and entities that I would want to visualize.

I am trying to determine how to best include a motorized window blind (cover entity). I am trying to use a sliding door with a simple blind object but I can’t seem to get that to work. Even if I do get it to work I don’t think I can represent the true amount open or closed.

Do you have any advice on this? Do you have plans to include something like this in the future?

Hello @ewalsh2000, I have to think about the blinds. I will hardly achieve animation for any moving objects. Even if I just want to show the final position (without animating), I have two problems today:

  1. For all doors and windows I have a percentage of opening but it is not dynamic (you have to set it at config time). This I will correct in the future by binding the percentage to some state or attribute of an entity.

  2. blinds are rolled over and this is a complex transformation for an object. I have probably to think on a way to show only a fraction of an object. If you have other ideas you are welcome

And, by the way, with the new feature I’m implementing in version 1.2 (coming soon), blind implementations could be very nice. I’m going to activate a sky feature with a real sun in the right position.

1 Like

Hello guys,

this is the playlist of my new tutorials:

Tomorrow is the big day of the release 1.2 coming out with a few new features

3 Likes