I think your M106 lines would stay the same (or change very little). You will need to add a M950 line to define each fan. So in my case, this line defines fan #0 (F0) as the "fan0" header on the Duet (but you are free to define fan #0 as any fan header you like). Then M106 can reference fan #0 by specifying P0. Code: M950 F0 C"fan0"
Does this help: https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_M106 ? As Andy says, you need to create each fan using M950 before you can control it using M106.
Ok the below seems to work. Could you sanity check it incase I'm missing something? ; Fans M950 F0 C"fan0" Q10 ; create fan 0 on pin fan0 and set its frequency M106 P0 C"fan0" S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"duex.fan3" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 C"duex.fan3" S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"fan1" Q10 ; create fan 2 on pin duex.fan3 and set its frequency M106 P2 C"fan1" S0 H-1 ; set fan 2 name and value. Thermostatic control is turned off M950 F3 C"fan2" Q500 ; create fan 3 on pin duex.fan4 and set its frequency M106 P3 C"fan2" S1 H2 T45 ; set fan 3 name and value. Thermostatic control is turned on
That config looks entirely plausible, but of course I don't know whether it is optimal for your system. I presume you have established that fans 0 and 1 need a very low (10Hz) PWM frequency.