Your Home Digital Twin: Interactive floor 3d plan

will work to a nicer progress bar…

that’s cool … like this the user is less confused and knows the floorplan is loading and it looks nice the same way :slight_smile:

you write interactive objects… how would that work? double klick on the object?

1 Like

Yes double click on the light object to toggle and you can use the “gesture” entity to call a service on any other entity (ex you can create a small box on a wall to represent a switch) when you click on it you trigger a toggle on a light entity (check the doc)

ok double clikc works nice… but how would i get the more_info for the light to change color or brightness for example?

For this it is better to stop using the panel mode and put my card side by side with light cards … :wink:
As I said you can create panel objects on the wall (ex. a red panel and a blue panel° and let them play the role of switch using the “gesture” entity… In the future I will try to overlay light controls on the card, but I’m already reaching my limits as a JS programmer, I will need contributors or give away my card to better developers…

any ideas how to get the object id? I have lights behind my tv and the editor does not allow me to circle behind the tv :frowning:

OK got it :slight_smile: i just open the editor and can move around the way i need it :slight_smile:

You can either look into the .obj file to spot the objects behind the TV set. In this case I suggest you put some 3D shapes that are only used for those lights; ex. you can put 2 cylinders behind the TV and then you can find the object_id of the cylinder inside the obj file (the “g” tag will look like g cylinder_123).
Alternatively you can try to zoom from above to spot your light objects and double click on them to reveal their IDs; this last solution can be hard at times.

Of course you have also the possibility to make the light object easily accessible in Sweethome3D; then export to obj format and load them in the floor3d card to reveal the object_id, then go back to sweethome3d to put the light objects on the back of the TV and re-export. In doing this operation you have not removed any object so your object_id will not change

I have not everything running… (just a few lights) but on my dashboard the floorplan is way toooo small. is there maybe a way to add buttons to zoom? I mean it is java and zoom buttons / navigate button should be possible right?

Have you tried the mouse wheel ?

no mouse whell on my buit-in touchscreen in the wall :frowning:

maybe something like this?

I am not all al rgogrammer but i have java apps with zoom buttons … so i thought it might be possible somehow ?

I’m not in control of the Three.js library behind my card. I can only capture the events that are exposed. In iOS and Android the zoom gesture (with 2 fingers) is supported and working fine. What system is your touchscreen based upon ? Tomorrow I can test on a Windows 10 touch screen…

I have also to work on an optimal default zoom level to reduce the white spaces in the canvas and have the visible objects span the entire available space, as you suggest previously.

Running windpws 10 chrome / edge. another stupi questn. I tried coordinated like this:

        camera_position:
          x: -800.9873059424981
          y: 1551.3112916814066
          z: 844.7744449743745
        camera_rotate:
          x: -1.0721430856080154
          y: -0.4257229434602591
          z: -0.6488423303850023

But it doesn’t work… what’s the coorect synthax here? :stuck_out_tongue:

This doen’t work either:

        camera_position:
          x: <x -800.9873059424981>
          y: <y 1551.3112916814066>
          z: <z 844.7744449743745>
        camera_rotate:
          x: <x -1.0721430856080154>
          y: <y -0.4257229434602591>
          z: <z -0.6488423303850023>

While in edit mode in the card, You have to double click on an empty space in the canvas . After you copy the text in the message box and you paste it at the end of your card configuration in code editor mode. This is still very experimental and others have reported bugs… Sorry for the effort… it is not yet user friendly

u mean this:

camera_position: { x: -800.9873059424981, y: 1551.3112916814066, z: 844.7744449743745 }
camera_rotate: { x: -1.0721430856080154, y: -0.4257229434602591, z: -0.6488423303850023 }

? just copy paste?

Yes it will reformat it as yaml

hmm doesn’t work… here my full config:

views:
  - title: Floorplan 3D Downstairs
    path: floorplan-3d-dwonstairs
    panel: true
    theme: ''
    badges: []
    cards:
      - type: custom:floor3d-card
        entities:
          - entity: light.chill_out_corner_left_level_light_color_on_off
            type3d: light
            light:
              lumens: '1000'
            object_id: sweethome3d_window_pane_69_516
          - entity: light.chill_out_corner_right_level_light_color_on_off
            type3d: light
            light:
              lumens: '1000'
            object_id: sweethome3d_window_pane_69_521
          - entity: light.dining_room
            type3d: light
            object_id: Lamp_outdoor_Pane2_1102
            light:
              lumens: '1000'
          - entity: light.lamps_dining_room_wall
            type3d: light
            light:
              lumens: '1000'
            object_id: <lamps_dining_room_wall>
          - entity: light.garage
            type3d: light
            object_id: <garage>
            light:
              lumens: '1000'
          - entity: light.led_strip_living_room
            type3d: light
            object_id: fluorescent_strip_fluorescent_strip_fluorescent_tube_1106
            light:
              lumens: '100'
          - entity: light.tv_living_room
            type3d: light
            object_id: <tv_ambilight>
            light:
              lumens: '100'
        name: Downstairs
        path: /local/floorplan/downstairs/
        objfile: downstairs.obj
        mtlfile: downstairs.mtl
        object_groups:
          - object_group: lamps_dining_room_wall
            objects:
              - object_id: porch_light_porch_light_PAINT_black_1120
              - object_id: porch_light_porch_light_PAINT_black_1118
          - object_group: garage
            objects:
              - object_id: fluorescent_strip_fluorescent_strip_Material_1112
              - object_id: fluorescent_strip_fluorescent_strip_fluorescent_tube_1114
          - object_group: tv_ambilight
            objects:
              - object_id: fluorescent_strip_fluorescent_strip_Material_1132
              - object_id: fluorescent_strip_fluorescent_strip_Material_1120
              - object_id: fluorescent_strip_fluorescent_strip_fluorescent_tube_1126
              - object_id: fluorescent_strip_fluorescent_strip_Material_1124
              - object_id: fluorescent_strip_fluorescent_strip_Material_1140
              - object_id: fluorescent_strip_fluorescent_strip_Material_1136
        camera_rotate: '90'
        camera_position: { x: -800.9873059424981, y: 1551.3112916814066, z: 844.7744449743745 }
        camera_rotate: { x: -1.0721430856080154, y: -0.4257229434602591, z: -0.6488423303850023 }


both does not work :confused:

Remove camera_rotate: 90, this is not coming from the message box

worked… but camera_rotate: ‘90’ was in the file automatically :slight_smile:

But the rest of the card config seems fine. It is still quite the effort, but I hope the result is worth

The result i AWESOME! Thanks 100000 times :slight_smile: And with position and coordinates the “zoom” issue is gone :slight_smile: It now has the right “size” / “Zoom” :slight_smile: I can rotate perfectly . will continue tomorrow to add all my 40 lights :stuck_out_tongue: will come back if needed and thanks so much for your awesome work! Even if it is still not 100% user friendly but nobody expects this… keep up the great work mate! :slight_smile: nighty night!

so far great :slight_smile:

2 Likes