Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue: api use can cause main UI to not update status

See original GitHub issue

Version 1.8.15

I am writing a new remote pendant piece to implement jog functionality for 3D Connection Space Mouse, using the ps3 pendant as a basis for figuring out the api. When I subscribe to the “Grbl:state” event, the UI no longer updates.

` socket.on(‘connect’, function() { console.log('Socket IO [Connected]: ’ + socket_address + ‘:’ + socket_port);

	// List Serial Ports
    socket.on ('serialport:list', function (data) {
	    console.log('Listed Serial Ports: ');

		// List Ports
		for (var i = 0; i < data.length; i++) {
			console.log("[" + i + "] Seral Port List: " + data[i].port);


    socket.on('Grbl:state', function(data){

	// Open port
	socket.emit('open', controller_serial_port, { baudrate: Number(controller_serial_baud) });
	console.log('Opened Serial Port: ' + controller_serial_port + ':' + controller_serial_baud);

Specifically, I can send axis movement commands from the main UI; however, the state never changes to reflect the change in the position of the machine. The status report I am receiving in the remote pendant app does show the correct status information.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

liqdfirecommented, Feb 11, 2017

@cheton I agree with you on the need for creating a standard api for external modules to be able to connect and interact with the CNC Engine.

I have been working on getting a dev environment setup, though I run windows and most of the build scripts in the project are bash scripts. Even with bash on windows the setup has not exactly been clean. I am going to setup a Ubuntu vm this evening and set it up on that.

Here are some of my thoughts from tinkering so far:

  1. The need to send the serial port with each command feels a bit like a leaky abstraction. Which serial port is in use would be better off encapsulated in the cnc engine and just reported as part of the engine state.

  2. The need to call “open serial” as an external components that are not wanting to control the connection feels a bit odd, in fact outside of the main UI, I am not sure I would want to relinquish control of the serial port to plugins. This would give a buggy external component too much ability to kill a long running cnc job.

  3. Having a difference in grbl:state and tinyg2:state being reported from the engine might be better off abstracted down into a common cnc engine state. This would make adding additional controllers cleaner, as it would not require a new UI widget for each controller, and would keep external modules like a pendant or status screen from breaking if it was not maintained when a new controller was added.

I am more than happy to assist with any work you need on this project.

chetoncommented, Feb 13, 2017

Fixed in 1.8.16

I also added several features to cncjs-pendant-boilerplate, you can enter command-line mode to directly send commands to Grbl.


Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating an Issue via the JIRA REST APIs - Atlassian Developer
This page describes the JIRA REST API for updating an issue. For the related tutorial, see JIRA REST API Example - Edit issues....
Read more >
How to update Issue status as done through rest api?
For starters, you're using the wrong API. The status can only be updated via transition, which means you want a POST /rest/api/2/issue/ISSUEKEY/ ...
Read more >
Unable to update status,comment but able to update summary
Hi guys, I am using a curl PUT command to update JIRA issue status, it is returning the HTML 204 response but no...
Read more >
[BUG]: Conductor v3.3.1 ui not showing updates #2507 - GitHub
I have set up Conductor v3.3.1 by cloning the main repo and then using ... I can see the status of the task...
Read more >
Windows Update Agent API - Win32 apps - Microsoft Learn
Defines the types of logic that is used to determine whether a particular update will be automatically selected when the user views available ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found