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

Development Question #544

Closed
jneilliii opened this issue Apr 5, 2020 · 8 comments
Closed

Development Question #544

jneilliii opened this issue Apr 5, 2020 · 8 comments
Labels
support Something isn't working with the users setup

Comments

@jneilliii
Copy link
Contributor

Sorry for the stupid question in regards to setting up a development environment on windows. I swear I've gotten this to work before but for the life of me I cannot get it to work now. Node.js is installed along with angular and angular CLI. When I attempt to start the server it seems to compile fine but when going to the webpage it just loads the background color and the logo screen for a second and then freezes up. Developer console in the browser shows this.

image

The way in which I ran it is opening a cmd prompt and going to the base folder where main.js file is and run ng serve --open.

Any advice is greatly appreciated.

@jneilliii jneilliii added the support Something isn't working with the users setup label Apr 5, 2020
@jneilliii
Copy link
Contributor Author

I figured out the error was from a previous version config file and after adding the missing info I was able to get it to load. The weird thing was when I modified files it would recompile in real-time and then the interface would crash out about not being able to read the config. If I changed the config and changed it back it would reload the web interface without issue. Still would like to know a little more on how to develop/debug for future changes potentially.

@UnchartedBull
Copy link
Owner

So the way I normally run this is with npm run start:big, this will open Electron on your local machine and will open the Angular App within that Electron App (so as close to production as possible). This also uses ng serve, which provides the live server functionality. So as soon as any of the files of the Angular app are being changed the command will automatically recompile and reload the website. So this is completely normal behaviour :). Debugging is currently exclusively done via the Chrome (or Electron) Developer Tools. Didn't had the nerve yet to setup the remote VSCode Debugger.

If you have config errors like that, make sure to check out config.service.ts, this should tell you what OctoDash wants to have for i.e. defaultTemperatureFanSpeed. If you have any more questions let me know.

@UnchartedBull
Copy link
Owner

Closing this for now. If you want more information let me know :)

@jeremy-3dproject
Copy link

Hello, First, thanks to @UnchartedBull for this great application ! Thanks also for this issue that tell me how to make modifications on the source files and try it on Windows développement Tools.

I have made some modifications on the sources file and want to transfert them into the raspberry PI to run it directly on the lcd screen and not on the Windows environnement. Unfortunately I was a beginer in this subject and Don't know how to do this…

The modifications I have made will be shared with you if they are working correctly. (adding a dual extruder setup, mesh bed leveling calibration wizard, nozzle cleaning feature,, etc...)

Do I need to create a .deb file to install it on the PI ? If yes, how can i do this ?

Thanks in advance and have a nice weekend !

Jérémy

@UnchartedBull
Copy link
Owner

UnchartedBull commented Jul 26, 2020

You can simply create a .deb file by running npm run pack (takes some time). This will then create all the .deb files (armv7l, arm64 and amd64) which can then be copied over to your Pi with scp. :) You only need to copy the file for your CPU architecture (probably armv7l)

@jneilliii
Copy link
Contributor Author

jneilliii commented Jul 26, 2020

Did electron fix their build runners? When I tried to do this from windows a couple of weeks ago it kept failing on the electron side.

Yep, still fails. Relative issue and error below. Apparently you can build fine from mac or linux or wine inside windows.

  • scheduling remote build  target=deb arch=x64
  • cannot get, wait  error=Get "https://service.electron.build/find-build-agent?no-cache=1fhr61u": dial tcp 51.15.76.176:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
                      attempt=0
                      waitTime=2

@jeremy-3dproject
Copy link

jeremy-3dproject commented Jul 26, 2020 via email

@UnchartedBull
Copy link
Owner

You can also build just fine from WSL if you don't fancy VMs.

I would be more than happy to have a look at your code and merge a PR into master (if you like) as long as it breaks nothing. Feel free to create one, otherwise feel free to create a derivative from the main project, although I saw a few issues popping up regarding dual extrusion, so I would greatly appreciate your input here.

Regarding the SD Card issue: Should be possible, there is an API available for that https://docs.octoprint.org/en/master/api/printer.html?highlight=sd#post--api-printer-sd. Init probably is the endpoint you're looking for. Easiest way probably would be to check whether the sd folder was opened and just sending a short request to that API first.

Feel free to share your repository and create PRs :) I promise that I'll look at them (it might just take a litte)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Something isn't working with the users setup
Projects
None yet
Development

No branches or pull requests

3 participants