I have created a component for controlling GRBL CNC machines (including popular 3018). It allows to integrate it with Home Assistant and most importantly to act as remote TCP-UART bridge, so you can send the G-code thorough the net using telnet protocol.
For details, see the GitHub project page.