-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Integrate dockerised "online" version of SweetHome3D #173
Comments
Hello @solidgonk, very good idea. It will be difficult to port the plugin though, unless they have the Java engine working behind the scene at server level. |
So, I've updated the Dockerfile to build a Tomcat-based image:
Build and run the container:
New URL: |
I realise what you meant now - the sh3p needs to go somewhere, and there's no obvious way to load it into the JS version. That said, there's a couple of promising leads that might help with integrating plug-in functionality, which I'll look into when/if I get the time or interest: https://gitlab.com/nicolalandro/study-sweethome3djs http://www.sweethome3d.com/support/forum/viewthread_thread,6708_offset,20 |
I was assuming you knew exactly what I was talking about, this plugin: https://github.com/adizanni/ExportToHASS . |
Actually, the use case I was proposing was to keep the card as is, and just use the dockerised JS version as an HA addon for modelling. This could potentially allow any minor changes to be directly imported into the viewer card through a mounted location, given that HA's addon architecture is already based around docker containers. This would make minor updates (like adding a plant, refrigerator or sensor) much more trivial. Of course, integrating the JS viewer directly into the card would be neat, but it ain't broke, and it's already got a solid user base at this stage. I realise now that this would require the plugin to be compiled or integrated into the JS version, which probably isn't a small undertaking. There's a comment here from 2017 indicating that there is no plug-in capability in 7.1, but it might be worthwhile nudging the community over there to see what comes out. I admit that I'm not a JS or Java expert, but that does seem like a limiting factor. (IMO, SweetHome3DJS has an opportunity to become the draw.io of 3D home design. It's no-frills, but it's stable, concise, and could easily supplant paid applications like SketchUp, as well as a whole host of junk 3D home and garden design applications that have barely innovated since the era of CD-ROM software. The self-hosting community would jump on it if there was a smooth pathway towards home automation visualisation.) |
In theory you do not need a dockerized solution, I can create a custom card with the SH3D editor inside, I've just to see how to manage the persistence of the models. Following that, I have to analyze if I can easily port the plugin to JavaScript, based on the services provided by the JS API. Stay tuned. |
By doing my researches, I have now understood your point about a dockerized service. In fact the full SH3D JS solution is a client server model. The server is needed in order to implement the homerecorder API which deals with saving and loading SH3D models in the server. A custom card does not provide this capability as it is fully based on a client communicating with the Home Assistant back-end. The only viable solution is to make a HA add-on with the docker scripts as you were proposing. I'm now looking into this documentation. Still the ExportToHASS plugin needs to be ported and I'm looking into this additional option. If you have already done some progress do not hesitate to share, I realized how good your idea is, thanks |
Hello @solidgonk , I took a few hours work but I managed to create the addon based on your idea: https://github.com/adizanni/sh3d-ha. Give it a try in your test system and let me know ..... |
I close it as implemented even though some test should be done |
Just installed - bravo! I haven't been able to get the export working, but I'll raise an issue in the new repo. |
Create a SweetHome3DJS docker image to allow direct editing from a browser, rather than moving between desktop apps.
The SweetHome3DJS project seems to be close enough to feature parity with the desktop app and runs pretty well. If one could just install a dockerised add-on version of it in HA to make changes, it might be easier in some cases to run it in a browser than from a desktop. That way the relevant conversion plugins could also be loaded automatically, and the hopefully streamline the process.
Project folder on SourceForge:
https://sourceforge.net/projects/sweethome3d/files/SweetHome3DJS/
Describe the solution you'd like
A dockerised version of SweetHome3D that can be installed as an add-on.
Describe alternatives you've considered
Desktop version of SweetHome3D.
Additional context
See attached for a Dockerfile I whipped together that downloads the latest version and prepares an image to host sweethome3dJS (remove the .txt, it was the only way to upload it):
Dockerfile
Put that in a folder, and run the following (change the 8080 to something else if required)
docker build -t sweethome3djs-app .
docker run -p 8080:80 sweethome3djs-app
The text was updated successfully, but these errors were encountered: