LaserWeb / LaserWeb4

Collaborative effort on the next version of LaserWeb / CNCWeb
GNU Affero General Public License v3.0
714 stars 193 forks source link

Status Light Integration #512

Closed Benjin454 closed 6 years ago

Benjin454 commented 6 years ago

This is a request for status light integration(With raspberry pi and lw.comm-server). For example. When the laser is on, a amber light would turn on. When a grbl alarm is triggered, a red light would flash. When the system is idle, a green light would be on. More technically put maybe a python script running in the background monitoring the status of the machine. "flipping a relay"(Turning a light on) based on the status of the machine. Simply put, sending status messages to a python script.

edwrdsp00002_30_pe_004

220px-stacklightinstall1

My Contribution/Side notes: If someone can get a python script to the point where its printing out each Machine status, I can then add the GPIO relay commands in place of the "print" commands(Rough python example below). I can then test and connect everything, getting the GPIO(Lights turning on and off with relays) side of things working.

If someone can get a python script to communicate with laserweb/grbl to report the machine status: screen shot 2018-08-29 at 4 56 33 pm

I can then get the GPIO portion working:

screen shot 2018-08-29 at 4 56 22 pm

cprezzi commented 6 years ago

This is an equal request as #511. I don't want to have hardware dependency in lw.comm-server. In 95% of use-cases the lw.comm-server is compiled into the electron app for a Windows, OSX or Linux executable, which has no GPIO options.

But you are free to make a fork and add this feature yourself. The server is NodeJS :)

By the way: You can connect the server with multiple clients at the same time. So you could programm a script that connects to the server as a client (via websockets) to get all the status messages and do what you like :)