@necrorat To get started with the basic structure of plugins, check out the SBC third-party docs. Currently you have two API libraries to write an SBC plugin with:
.NET using
DuetAPIClient
Python using
dsf-python
If you go with .NET, I suggest you have a look at the DuetPiManagementPlugin to see how G-codes like M955 and M596 could be intercepted. For Python, check out the custom M-code example instead.