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
Proposals for technical extension of cnc.js #75
Comments
A watch directory will help you to import new files faster. I may add this feature in a future release.
Macros are supported in v1.6.
Yes! I'm planning on adding update notifications to inform new updates.
I think the above three can be combined into one by selecting custom menu items to trigger scripts from UI. |
Yes that sounds really nice! I use a precomposed raspberry image with installed cnc.js. I think i made a own image. Than it's easyer to update. Custom menu is a good idea. I think much people using only cnc.js on the raspberry for the own cnc machine. I think I add a kiosk mode which will only show a browser with cnc.js and that runs on the raspberry with a small touch lcd. |
Could really use the shutdown and reboot option for my raspberry pi though the GUI. |
By now the Electron app (i.e. executable installer .exe, .dmg) should be able to perform an update internally, but I have not yet implemented it to the app. It might be added in a future version. For Node.js installation, I can try to force the update by running Do you have any recommendations for this? Trigger a custom script to update package might be a solution to it. |
mhmm... sorry I have no solution for this. I understand the problems with the installation path because a update script could help I think. This is the update-script from octoprint: https://github.com/foosel/OctoPrint/blob/master/src/octoprint/plugins/softwareupdate/scripts/update-octoprint.py but its python and no node. It can not help. First of all the software have to check the path where it is installed. On a raspberry I got with npm install -g cncjs@latest always the error with the serialmodule... I have to perform a sudo npm install -g cncjs --unsafe-perm. I hope anybody of other users have a solution? Should we open a new enhancement issue? |
OctoPrint's update script use git to update its source code, but that's not the case with the cnc software. How about passing a command-line option to specify a path to the update script? For example:
Then the web interface will be able to perform an update when the update script is available to use. |
After a fresh installation the path is "/usr/lib/node_modules/cncjs/bin" - the script can check the path for the executable and if not found the user can input the real path. Or in the update page on the site the user can change the path in a form. |
The watch directory support is added in the 1.8.5 release. You can check out the usage below: Usage
Instead of passing command line options for {
"watchDirectory": "/path/to/dir",
"allowRemoteAccess": false
} Then you can browse the watch directory to select a G-code file to load: |
The support for running shell commands was added in 95698eb, and later it will be published in 1.8.10 release. An example configuration (i.e. {
"state": {
"checkForUpdates": true
},
"commands": [
{
"text": "Reboot",
"command": "/sbin/reboot"
},
{
"text": "Shutdown",
"command": "/sbin/shutdown"
}
],
"macros": [],
"users": []
} |
To perform an upgrade, you can run {
"commands": [
{
"text": "Update (root user)",
"command": "sudo npm install -g cncjs@latest --unsafe-perm; pkill -a -f cnc"
},
{
"text": "Update (non-root user)",
"command": "npm install -g cncjs@latest; pkill -a -f cnc"
}
]
} |
@cheton hi, i have installed cncjs using npm and would like to add a custom widget to it. Going by the tutorial i have to create a directory under src/widgets but i can't find the "src" directory. |
Hi @cheton how do i add a custom widget to an npm installation of cncjs because i can't find the "src" directory even in node_modules |
The "src/widgets" folder you mentioned is located in cncjs-widget-boilerplate: You can follow the development guide to mount the default widget for testing https://github.com/cncjs/cncjs-widget-boilerplate#development DevelopmentRun You can specify a mount path to test your widgets with CNCjs: $ cncjs -vv --mount /widget:/path/to/cncjs-widget-boilerplate/dist |
Mounting from a remote server is also supported: $ cncjs --mount /widget:https://cncjs.github.io/cncjs-widget-boilerplate/v1/ Just walk through the instructions to learn how to load a custom widget: |
Hi cheton,
I'm not using cnc.js V. 1.3 so long like mach3 because I have some suggestions for new versions of your cnc.js.
This is would I suggest and that would be really nice add ons or widgets.
Is there something similar integrated shame on my. I haven't found that allready :D
Christoph
The text was updated successfully, but these errors were encountered: