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
448 stars 65 forks source link

Floor3d-card.js #147

Closed DEDEit closed 1 year ago

DEDEit commented 1 year ago

Hi everyone. I tried to configure everything following the instructions and also the videos but I can't get it to start. I thought it was an error of my rendering so I also tried with a rendering found online (tested and working) but it doesn't work. This is what the console shows, can you help me? (The JS file is the latest and I cleared my browser cache)

Thank you [answers in Italian are very welcome xD ]

image

ha-icon.ts:161 Icon mdi:google-home was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version 2022.10. value @ ha-icon.ts:161 floor3d-card.js:2289 FLOOR3D-CARD Version 1.5.1
core.d18ed81d.js:1 WebSocket connection to 'ws://homeassistant:8123/api/websocket' failed: i @ core.d18ed81d.js:1 core.d18ed81d.js:1 WebSocket connection to 'ws://homeassistant:8123/api/websocket' failed: i @ core.d18ed81d.js:1 core.d18ed81d.js:1 WebSocket connection to 'ws://homeassistant:8123/api/websocket' failed: i @ core.d18ed81d.js:1 core.d18ed81d.js:1 WebSocket connection to 'ws://homeassistant:8123/api/websocket' failed: i @ core.d18ed81d.js:1 core.d18ed81d.js:1 WebSocket connection to 'ws://homeassistant:8123/api/websocket' failed: i @ core.d18ed81d.js:1 ha-icon.ts:161 Icon mdi:google-home was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version 2022.10. value @ ha-icon.ts:161 floor3d-card.js:2289 New Card floor3d-card.js:2289 floor3d-card: Set Config Start floor3d-card.js:2289 floor3d-card: Set Config End floor3d-card.js:2289 Get Card Size Called floor3d-card.js:2289 First updated start floor3d-card.js:2289 Start Build Renderer floor3d-card.js:2289 Max Texture Image Units: 16 floor3d-card.js:2289 Max Texture Image Units: number of lights casting shadow should be less than the above number floor3d-card.js:2289 Path: /local/plancia3d/Piano 1/ floor3d-card.js:2289 End Build Renderer floor3d-card.js:2289 First updated end floor3d-card.js:2357 Material loaded start floor3d-card.js:2357 Material loaded end floor3d-card.js:2289 Object loaded start floor3d-card.js:2289 Ïnit Objects, Levels and Raycasting floor3d-card.js:2289 Found level 0 floor3d-card.js:2289 End Init Objects. Number of levels found: 1 floor3d-card.js:2289 Shadow Off floor3d-card.js:2357 Add Objects Start floor3d-card.js:2357 TypeError: Cannot read properties of undefined (reading 'geometry') at floor3d-card.js:2357:6241 at Array.forEach () at ku._add3dObjects (floor3d-card.js:2357:5052) at ku._onLoaded3DModel (floor3d-card.js:2289:35562) at Object.onLoad (floor3d-card.js:2232:531112) at XMLHttpRequest. (floor3d-card.js:2232:435196) floor3d-card.js:2357 Error: Object issue for Entity: TypeError: Cannot read properties of undefined (reading 'geometry') at floor3d-card.js:2357:11114 at Array.forEach () at ku._add3dObjects (floor3d-card.js:2357:5052) at ku._onLoaded3DModel (floor3d-card.js:2289:35562) at Object.onLoad (floor3d-card.js:2232:531112) at XMLHttpRequest. (floor3d-card.js:2232:435196) floor3d-card.js:2357 Uncaught Error at floor3d-card.js:2357:4593 at Object.onLoad (floor3d-card.js:2232:531137) at XMLHttpRequest. (floor3d-card.js:2232:435196)

adizanni commented 1 year ago

Hello @DEDEit, can you add your card configuration in YAML ?

DEDEit commented 1 year ago

Hello @DEDEit, can you add your card configuration in YAML ?

Yep:

type: custom:floor3d-card path: /local/plancia3d/Piano 1 name: Home objfile: 1p.obj lock_camera: 'no' header: 'yes' click: 'no' overlay: 'no' backgroundColor: '#aaaaaa' hideLevelsMenu: 'no' globalLightPower: '0.8' shadow: 'no' extralightmode: 'no' show_axes: 'no' sky: 'no' overlay_bgcolor: transparent overlay_fgcolor: black overlay_alignment: top-left overlay_width: '33' overlay_height: '20' north: x: 0 z: -1 camera_position: x: 609.3072605703628 'y': 905.5330092468828 z: 376.66437610591277 camera_rotate: x: -1.0930244719682243 'y': 0.5200808414019678 z: 0.7648717152512469 camera_target: x: 37.36890424945437 'y': 18.64464320782064 z: -82.55051697031719 object_groups:

adizanni commented 1 year ago

You have to remove the object groups and entities that are coming from the sample. They refer to objects that are not in your model and they cause the card to raise errors.

DEDEit commented 1 year ago

You have to remove the object groups and entities that are coming from the sample. They refer to objects that are not in your model and they cause the card to raise errors.

Works great! Thank you for your amazing job

adizanni commented 1 year ago

Hey @DEDEit , toglimi una curiosità, ho visto molti italiani abbonarsi improvvisamente al mio canale durante il week end. Puoi dirmi qual'e stata l'origine di tutto ciò ?

Out of curiosity, I ve seen many Italians subscribing to my YouTube channel during the week end. Do you know what is the reason of this sudden interest from a specific community ? Thanks

DEDEit commented 1 year ago

Hey @DEDEit , toglimi una curiosità, ho visto molti italiani abbonarsi improvvisamente al mio canale durante il week end. Puoi dirmi qual'e stata l'origine di tutto ciò ?

Out of curiosity, I ve seen many Italians subscribing to my YouTube channel during the week end. Do you know what is the reason of this sudden interest from a specific community ? Thanks

Personalmente stavo cercando un sistema per poter integrare il progetto fatto e finito su Sweethome3d qualche anno fa, ho visto alcune guide ma nulla di "live", cercando e ricercando poi ho trovato questa repository. Esisteva una metodo alternativo per il salvataggio delle schermate stanza per stanza con la sovrapposizione di immagini ma molto lungo e minuzioso. C'è da aggiungere che qualche giorno fa un membro del gruppo su facebook di "home assistant italia" ha fatto una guida utilizzando la tua integrazione. Ho avuto qualche problema ma poco supporto e allora ho deciso di disturbare il diretto interessato. Ti lascio il link alla guida che è stata condivisa su facebook:

http://domoticamente.it/plancia-3d-interattiva-e-realistica/

Personally I was looking for a system to be able to integrate the project done and finished on Sweethome3d a few years ago, I saw some guides but nothing "live", searching and searcing again then I found this repository. There was a method for saving screens room by room with the overlay of images but very long and detailed. It should be added that a few days ago a member of the "home assistant italy" facebook group made a guide using your integration. I had some problems but little support and so I decided to disturb the person concerned. I leave you the link to the guide that was shared on facebook:

http://domotically.it/plancia-3d-interattiva-e-realistica/

adizanni commented 1 year ago

Caspita e un lavorone di documentazione. Penso che quel post abbia fatto scaturire un numero di visite e contatti, insolito. Non avevo pensato di pubblicizzare la card nei forum di lingua, non sono alla ricerca di gloria o di soldi, solo il riconoscimento del lavoro e magari qualcuno con abilità di programmazione che possa contribuire in modo continuativo (comunque grazie dei coffee).

DEDEit commented 1 year ago

Caspita e un lavorone di documentazione. Penso che quel post abbia fatto scaturire un numero di visite e contatti, insolito. Non avevo pensato di pubblicizzare la card nei forum di lingua, non sono alla ricerca di gloria o di soldi, solo il riconoscimento del lavoro e magari qualcuno con abilità di programmazione che possa contribuire in modo continuativo (comunque grazie dei coffee).

CI mancherebbe, grazie a te per il magnifico lavoro svolto, ho pubblicizzato un po il tuo canale con la speranza di poterti aiutare a crescere. Sono un tecnico informatico ma non un programmatore purtroppo, sono a disposizione per eventuali test o per qualsiasi cosa sia nelle mie capacità :)