You have done a great job!
Despite the fact that I am very far from programming, and I still couldn’t get the Deviare hook to work, I was able to do semi-automatic mode based on the codes provided (by writing a hotkey to "s"). So, now, after each stage, I just need to click on one button (but this already greatly facilitates the scanning process).
I also had to slightly modify the firmware code for my less common control board HE3D (from the Ciclop laser scanner).