Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not save zip file #1

Closed
thundergreen opened this issue Jul 4, 2021 · 38 comments
Closed

Does not save zip file #1

thundergreen opened this issue Jul 4, 2021 · 38 comments

Comments

@thundergreen
Copy link

I succesfully installed the plugin and it is well showing under tools --> export ... but the zip file will never be exported. I already restarte Sweet home 3d

@adizanni
Copy link
Owner

adizanni commented Jul 4, 2021

Hello Thundergreen, as I already told to others, I'm moving in an uncharted territory with this plugin. I'm not a Java developer and plugin working depends on many external factors. So please be patient. Try to run Sweethome from the cmd line first (cmd in windows, terminal in Linux). If the zip is not generarated it means there is an error. The stack trace of the error will appear in the cmd console. Please copy paste here the stack trace. If there is no stack trace I suggest to send me your model via file share. I'm going to be off a few days but when back I will fix the issue. The problem is that I discover every day new model object types that have to be managed for the export to work well. This morning I have released a patch to manage Levels....

@jesserockz
Copy link

Here you go:

As soon as I hit the save button it closes the dialog and nothing else happens.

Arch Linux
Sweet home 3D 6.5
OpenJDK version 16.0.1

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "com.eteks.sweethome3d.model.Content.openStream()" because "<parameter1>" is null
	at com.eteks.sweethome3d.tools.TemporaryURLContent.copyToTemporaryURLContent(Unknown Source)
	at com.eteks.sweethome3d.j3d.ModelManager.loadModel(Unknown Source)
	at com.eteks.sweethome3d.j3d.ModelManager.loadModel(Unknown Source)
	at com.eteks.sweethome3d.j3d.HomePieceOfFurniture3D.loadPieceOfFurnitureModel(Unknown Source)
	at com.eteks.sweethome3d.j3d.HomePieceOfFurniture3D.createPieceOfFurnitureNode(Unknown Source)
	at com.eteks.sweethome3d.j3d.HomePieceOfFurniture3D.<init>(Unknown Source)
	at com.eteks.sweethome3d.j3d.Object3DBranchFactory.createObject3D(Unknown Source)
	at com.eteks.sweethome3d.plugin.exporthass.ExportHass$ExportHassAction.exportHomeStructure(ExportHass.java:145)
	at com.eteks.sweethome3d.plugin.exporthass.ExportHass$ExportHassAction.execute(ExportHass.java:103)
	at com.eteks.sweethome3d.swing.HomePane$ActionAdapter.actionPerformed(Unknown Source)
	at com.eteks.sweethome3d.swing.ResourceAction$AbstractDecoratedAction.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1022)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1066)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6382)
	at java.desktop/java.awt.Container.processEvent(Container.java:2264)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

@adizanni
Copy link
Owner

adizanni commented Jul 10, 2021

Do you confirm you put the file into a knonw folder and your file name (zip) is not empty ?

@firstchair
Copy link

firstchair commented Jul 21, 2021

At first, great that you're creating this! Are there logs saved somewhere during the export?
Note: the solution for me was to remove a group of objects

@adizanni
Copy link
Owner

adizanni commented Jul 21, 2021

No not yet, I will do a release this week-end to be sure I can have better troubleshooting. Of course to share your sh3d model file with the faulty objects can help. There are a lot of object types I'm not yet managing and they may cause unhandled exceptions. Please be patient.....

@adizanni
Copy link
Owner

I think it would help to send me the sh3d file with the objects that were causing errors, there are so many cases and I have to manage them all for the export to work fine, the more I have examples the more the plugin will be stable

@squirrel289
Copy link

squirrel289 commented Aug 19, 2021

Here you go:

As soon as I hit the save button it closes the dialog and nothing else happens.

Arch Linux
Sweet home 3D 6.5
OpenJDK version 16.0.1

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "com.eteks.sweethome3d.model.Content.openStream()" because "<parameter1>" is null
	at com.eteks.sweethome3d.tools.TemporaryURLContent.copyToTemporaryURLContent(Unknown Source)
	at com.eteks.sweethome3d.j3d.ModelManager.loadModel(Unknown Source)
	at com.eteks.sweethome3d.j3d.ModelManager.loadModel(Unknown Source)
	at com.eteks.sweethome3d.j3d.HomePieceOfFurniture3D.loadPieceOfFurnitureModel(Unknown Source)
	at com.eteks.sweethome3d.j3d.HomePieceOfFurniture3D.createPieceOfFurnitureNode(Unknown Source)
	at com.eteks.sweethome3d.j3d.HomePieceOfFurniture3D.<init>(Unknown Source)
	at com.eteks.sweethome3d.j3d.Object3DBranchFactory.createObject3D(Unknown Source)
	at com.eteks.sweethome3d.plugin.exporthass.ExportHass$ExportHassAction.exportHomeStructure(ExportHass.java:145)
	at com.eteks.sweethome3d.plugin.exporthass.ExportHass$ExportHassAction.execute(ExportHass.java:103)
	at com.eteks.sweethome3d.swing.HomePane$ActionAdapter.actionPerformed(Unknown Source)
	at com.eteks.sweethome3d.swing.ResourceAction$AbstractDecoratedAction.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1022)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1066)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6382)
	at java.desktop/java.awt.Container.processEvent(Container.java:2264)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Receiving identical issue in a very different operating environment:
macOS 11.1
SweetHome3D 6.6a
Oracle Java 1.8.0_291

EDIT:
Upgraded to java 1.8.0_301 with same results.

Attached is the sh3d I am using.
home.sh3d.zip

@uspass
Copy link

uspass commented Aug 20, 2021

That's because your sh3d has 2 levels. The plugin can't do that. If you delete Level 1, it exports OK.

cheers,
us

@adizanni
Copy link
Owner

Hello thanks uss.

Squirrel, I confirm, today I'm not supporting multiple level in the plugin. This may change in the future even though, the rendering of multiple floors is not really good for the card, it works better on single floors.

@squirrel289
Copy link

Thank you for the info, that's helpful to know. Given that, I tried deleting the second level and still received the same error so I tried exporting new model using the 4BR demo house and still see the same.

I've attached the demo house for reference.
Test.sh3d.zip

@chrisvor
Copy link

Hi. I also have a SH3D file containing two floors with multiple layers on each (some on same elevation, just to have lights and doors separately from the main house plan. Following this issue, I have copied all the objects on the ground floor into a new SH3D file that only has one layer, and used your tool to create the ZIP. All worked fine. However, when I repeated the same thing for the first floor, into a new SH3D file, the tool does not produce the ZIP file. Using windows 10. I tried starting the application from the command line, but I dont get any error log output

@adizanni
Copy link
Owner

Hello all, I'm able to reproduce the issue in Windows 10 but the linux version is working.
I'm going to need a little time as debugging for windows ain't easy.

@chrisvor
Copy link

Hello all, I'm able to reproduce the issue in Windows 10 but the linux version is working.
I'm going to need a little time as debugging for windows ain't easy.

Great! Thank you for your great work!

@adizanni
Copy link
Owner

adizanni commented Aug 24, 2021

Hello all, I'm back now, in fact my previous post is not correct. The plugin was not working because I was using a previous version. Instead of following my procedure in the readme (I will modify it) please follow these steps in windows:

  1. Close sweethome3d application
  2. Download the latest version of the plugin here
  3. Open the folder located here: "C:\Users\[your user name]\AppData\Roaming\eTeks\Sweet Home 3D\plugins" (replace [your user name] with your actual user name)
  4. Copy the file downloaded in step 2 to the folder identified in step 3
  5. Restart sweethome3d,

In this release I have added a final message box to show that the export was succesful. If you do not see the message box it means you have other problems. But now it will be more difficult for me to debug (until I will put some logs, but this plugin is really developed in best effort). Please try!!!

@squirrel289
Copy link

Is there an equivalent change on directions on MacOS 11.1?

@adizanni
Copy link
Owner

I cannot test in MacOS but, as far as I know, it is really similar to Linux. Try to search for the file name ExportToHassPlugin.sh3p. In Linux this is located in /home/username/.eteks/sweethome3d/plugin. I have the impression that the double-click on the plugin file is not always working in windows (I cannot tell in MacOS and in Linux it has never worked so you need to copy the file manually).

@adizanni
Copy link
Owner

adizanni commented Aug 24, 2021

Wait a moment, your sh3d model is not working in my linux either. It may be a grouped object causing an exception. Try to start with a simple model and see if it is working,..... ..... No no correction I removed the roof an it is now working. So I confirm without the roof level the your model is working in both Linux and Windows; unfortunately I cannot test on MacOS

@ahd71
Copy link

ahd71 commented Aug 25, 2021

I can confirm that I can export a model until i group two objects, then it is not possible anymore. I use groups a lot for organization so would be great when this would be handled, and as others have said, I really appreciate the time you have put into this. keep up the good work!

@chrisvor
Copy link

Yes I just noticed that my "first floor" had a groupped object and it was not exporting. As soon as I ungrouped them, the export succeeded. So it's definitely an issue with the groups

@adizanni
Copy link
Owner

Hello Christos, yes I'm going to try to manage the groups this can even give some ideas to avoid the # feature (see the README) or the object grouping in the card

@adizanni
Copy link
Owner

Loaded a new version that should fix the group problem. The group itself is not exported but all its children furniture are correctly exported

@adizanni
Copy link
Owner

adizanni commented Sep 8, 2021

In absence of a feedback I close the issue. Re-open it if you still experience the issue

@adizanni adizanni closed this as completed Sep 8, 2021
@jesserockz
Copy link

Working for me recently as I had a small concrete slab level under the house to raise the floor off ground =)

@Vlastelin40
Copy link

It exports everything,but for some reason it does not load into HA

@Vlastelin40
Copy link

Windows 7

@adizanni
Copy link
Owner

adizanni commented Sep 9, 2021

Hello Vlastelin, you need to give me more info:

console logs
yaml config of the card
obj/mtl file or sh3d file (if needed)

@Vlastelin40
Copy link

Vlastelin40 commented Sep 9, 2021 via email

@Vlastelin40
Copy link

Vlastelin40 commented Sep 12, 2021 via email

@adizanni
Copy link
Owner

The right path for the obj and mtl files is /local/(www folder in config where you have copied the files). No hacsfiles

@Vlastelin40
Copy link

Vlastelin40 commented Sep 12, 2021 via email

@Vlastelin40
Copy link

Vlastelin40 commented Sep 12, 2021 via email

@Abhome
Copy link

Abhome commented Jan 11, 2022

Hello all, I'm back now, in fact my previous post is not correct. The plugin was not working because I was using a previous version. Instead of following my procedure in the readme (I will modify it) please follow these steps in windows:

  1. Close sweethome3d application
  2. Download the latest version of the plugin here
  3. Open the folder located here: "C:\Users[your user name]\AppData\Roaming\eTeks\Sweet Home 3D\plugins" (replace [your user name] with your actual user name)
  4. Copy the file downloaded in step 2 to the folder identified in step 3
  5. Restart sweethome3d,

In this release I have added a final message box to show that the export was succesful. If you do not see the message box it means you have other problems. But now it will be more difficult for me to debug (until I will put some logs, but this plugin is really developed in best effort). Please try!!!

thank you for your amazing work. I'm not able to get the plugin to work. can you help?

@adizanni
Copy link
Owner

Hello @Abhome do you see the plugin menu at least ? The plugin is very experimental and it works only when all the conditions are met, and still I do not know what are all the conditions :). Can you please tell me:

  1. Which Sweethome version are you using
  2. I guess it is Windows based
  3. Do you see the Export To Hass menu entry in the Tools menu of Sweethome
  4. Have you groups or levels in the model you are trying to export
  5. Any other info, screenshot you think is relevant.....

@Abhome
Copy link

Abhome commented Jan 11, 2022

Just update the sweet home to version 6.6a, and it solves the problem; thank you for your help.

@Abhome
Copy link

Abhome commented Jan 11, 2022

Sorry to bother you. My question is, can I bind an entity with the white light source? How can I find the object id of the white light source?

@adizanni
Copy link
Owner

The white light source has no effect for the export to home assistant . In SweetHome3D it is used just to do realistic rendering effect. In the floor3d-card you bind directly to the lamp object in order to render the light

@Abhome
Copy link

Abhome commented Jan 11, 2022

I'm using a white source light for my led strip. Do you have any solution for the led strip?

@adizanni
Copy link
Owner

I have not yet implemented this type of light from Three.js. It is not an easy coding. In the mean time I suggest you create a "fake" strip light by putting small objects (ex cubes) in a line in your model and in the card you create an object group that contains all the cubes. After you bind your strip ha light to the object group you will be able to do a stripe like effect. Of course this is consuming a lot of light sources: I remind you that, if you want realistic lights with shadows, the number of lights is limited by the max number of textures that your GPU can handle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants