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

Cannot import SweetHome3D project #179

Closed krzpl closed 4 months ago

krzpl commented 4 months ago

Cannot import even simple project with one object Info from HA card: "Finished with errors: check the console log"

Log: Uncaught error from Chrome 124.0.0.0 on Windows 10 Error Object.onError (/hacsfiles/floor3d-card/floor3d-card.js:2288:34179) XMLHttpRequest. (/hacsfiles/floor3d-card/floor3d-card.js:2231:436056) Uncaught error from Chrome 124.0.0.0 on Windows 10 Error /hacsfiles/floor3d-card/floor3d-card.js:2356:4523 Object.onLoad (/hacsfiles/floor3d-card/floor3d-card.js:2231:531795) XMLHttpRequest. (/hacsfiles/floor3d-card/floor3d-card.js:2231:435962) Uncaught error from Chrome 124.0.0.0 on Windows 10 Error /hacsfiles/floor3d-card/floor3d-card.js:2288:34333 Object.onLoad (/hacsfiles/floor3d-card/floor3d-card.js:2231:531795) XMLHttpRequest. (/hacsfiles/floor3d-card/floor3d-card.js:2231:435962)

Newest version of HA: 2024.4.3 Newest version of floor3d-card 1.5.3 Newest version of SweetHome3D: 7.3 Checked with native export to OBJ format and with newest ExportToHASSPlugin.sh3p plugin (this same error)

CmdFelipeLira commented 4 months ago

Hi @krzpl !

I had the same problem and I fix it just removing all the objects and group objects automatically created after the import process. Check it and I hope this solve this problem.

krzpl commented 4 months ago

Unfortunately without result. Some other bug should exist

CmdFelipeLira commented 4 months ago

Please share the card settings screens, if possible. I think that could be something about the directory (folder with .obj .mtl and other files) and object references.

krzpl commented 4 months ago

2024-04-18_16h10_50

2024-04-18_16h09_49

adizanni commented 4 months ago

Please share the entire yaml code of your card by clicking on the code editor

adizanni commented 4 months ago

You have to remove the object groups they are referring to the sample model

krzpl commented 4 months ago

2024-04-20_10h03_43

adizanni commented 4 months ago

Have you removed the object groups ?

krzpl commented 4 months ago

2024-04-21_20h59_21

object groups cannot be removed, should exist

adizanni commented 4 months ago

I mean remove the object groups coming from the sample project of course the object_groups field has to stay....

krzpl commented 4 months ago

2024-04-22_16h18_03 2024-04-22_16h20_51

Sample objects removed but problem still exist

adizanni commented 4 months ago

You removed too much. Now you need to redeploy the card with HACS or copy back the files in the floor3d-card folder. What I meant, in your card configuration you need to remove all references to the sample project. This is done by either remove the object groups in the UI editor or remove all object groups in the yaml configuration (you have to keep the object_groups keyword). I suggest you recreate a card from scratch and you use the UI editor to remove the object groups and entities that refer to the sample project

adizanni commented 4 months ago

I'm sorry but I have no time to help you with visual aids

krzpl commented 4 months ago

OK, now I understand what should be removed. After that my own project was imported correctly :) Problem was with some default object imported automatically Thank you for support, problem solved