adizanni / floor3d-card

Your Home Digital Twin: aka floor3d-card. Visualize Home Assistant state and perform actions using objects in a 3D home model based on Three.js.
https://github.com/adizanni/floor3d-card
MIT License
471 stars 67 forks source link

Card Not loading in main screen but loading in edit page. #26

Closed sheminasalam closed 3 years ago

sheminasalam commented 3 years ago

I have the latest version of the card but it seems that one of my cards are not working. It is not loading. please see the gif. screen-capture

adizanni commented 3 years ago

Hello, can you please put the console log in this issue ? In Chrome You need to use the menu More Tools-> Developer Tools and look into the Console tap on the bottom right of the chrome screen

sheminasalam commented 3 years ago
apexcharts-card.js:1 Error: <svg> attribute height: Expected length, "NaN".
value @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <foreignObject> attribute height: Expected length, "NaN".
value @ apexcharts-card.js:1
27Error: <path> attribute d: Expected number, "M 0 NaN".
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
attr @ apexcharts-card.js:1
apexcharts-card.js:1 Error: <path> attribute d: Expected number, "M 0 NaN".
adizanni commented 3 years ago

You should capture the console log only while loading the page where the floor3d card is failing to display.

sheminasalam commented 3 years ago

This has entire console after reloading the page and when the card was not loading. https://pastebin.com/zN4SQLiA Hope this will do. Do let me know if this is not it.

adizanni commented 3 years ago

In the new release I have added a shadow parameter. I see you have an issue with the WebGL; but this can happen only if you put yes in the shadow. it means that your GPU cannot handle that much shadow management. Try to put 'no' in the shadow. if it is already 'no' or ''empty' I need to check why.

sheminasalam commented 3 years ago

Actually there was no shadow parameter in my config but I added shadow: no and tried but still the same result.

adizanni commented 3 years ago

it is strange because I did no chqnge other things affecting the WebGL. This is the error:

THREE.WebGLProgram: shader error: 0 35715 false gl.getProgramInfoLog Pixel shader sampler count exceeds MAX_TEXTURE_IMAGE_UNITS (16).

Are you sure that this was working prior to the new release ?

adizanni commented 3 years ago

If you do not mind, send me your sh3d file.

sheminasalam commented 3 years ago

Yes, it was working before 2 updates. Infact i can it while editing but not in the main card. This is the files 3d11.zip 1wall30.zip

sheminasalam commented 3 years ago

Just downgraded to v 0.9.16hf and the card works fine.

adizanni commented 3 years ago

Yes, I have been reported also other issues, I think it is related to the shadow management, how many entities you have in the card, and how many light entities ?

sheminasalam commented 3 years ago

This is my config. 10 light entities.

type: custom:floor3d-card
style: 'height: 530px'
entities:
  - entity: switch.media_room_light
    type3d: light
    show:
      state: 'off'
    light:
      lumens: '1000'
    object_id: <mediarm>
  - entity: switch.prayer_room_light
    type3d: light
    light:
      lumens: '3000'
    object_id: Sphere_104_1000
  - entity: switch.kitchen_light
    type3d: light
    light:
      lumens: '1000'
    object_id: <kitchen>
  - entity: switch.dining_room_light
    type3d: light
    light:
      lumens: '6000'
    object_id: CeilingFan6900_4_4_1077
  - entity: switch.dining_room_light
    type3d: light
    light:
      lumens: '500'
    object_id: <drlight>
  - entity: switch.prayer_room_light
    type3d: light
    light:
      lumens: '800'
    object_id: <prayerlight>
  - entity: switch.living_room_light
    type3d: light
    light:
      lumens: '3000'
    object_id: CeilingFan6900_4_4_1073
  - entity: switch.sitout_light
    type3d: light
    light:
      lumens: '1000'
    object_id: <sitout>
  - entity: switch.master_bedroom_light
    type3d: light
    light:
      lumens: '3000'
    object_id: Sphere_104_1020
  - entity: switch.daemon
    type3d: hide
    object_id: ground_1
    hide:
      state: 'on'
  - entity: switch.back_light
    type3d: light
    light:
      lumens: '3000'
    object_id: Sphere_104_992
name: 3d1
path: /local/3d11/
objfile: 22y.obj
mtlfile: 22y.mtl
globalLightPower: '0.6'
shadow: 'no'
camera_position:
  x: 791.9386950468642
  'y': 1746.4040837825655
  z: 1455.1351218556897
camera_rotate:
  x: -0.9211033431646594
  'y': 0.3647281492210426
  z: 0.43895857315563036
object_groups:
  - object_group: mediarm
    objects:
      - object_id: sweethome3d_window_pane_69_1003
      - object_id: sweethome3d_window_pane_69_998
      - object_id: CeilingFan6900_4_4_1085
      - object_id: sweethome3d_window_pane_1007
  - object_group: drlight
    objects:
      - object_id: sweethome3d_window_pane_69_1033
      - object_id: sweethome3d_window_pane_69_1028
      - object_id: sweethome3d_window_pane_69_1043
      - object_id: sweethome3d_window_pane_69_1038
  - object_group: sitout
    objects:
      - object_id: Sphere_104_984
      - object_id: sweethome3d_window_pane_69_1068
      - object_id: sweethome3d_window_pane_69_1328
  - object_group: kitchen
    objects:
      - object_id: sweethome3d_window_pane_69_1018
      - object_id: sweethome3d_window_pane_69_1023
      - object_id: CeilingFan6900_4_4_1089
      - object_id: sweethome3d_window_pane_69_1013
  - object_group: prayerlight
    objects:
      - object_id: sweethome3d_window_pane_69_1058
      - object_id: sweethome3d_window_pane_69_1053
      - object_id: sweethome3d_window_pane_69_1048
      - object_id: sweethome3d_window_pane_69_1063
card_mod:
  style: |
    ha-card {
      border: solid 3px white; box-shadow: none;
    }
adizanni commented 3 years ago

Can you please load the new release I have delivered ? 0.9.18hf. If it fixes your issue it means that enabling shadow is only for those having a good GPU

sheminasalam commented 3 years ago

It works now. Thanks