When running RepRapFirmware 3.01 all sensors connected to the Duet can be read via the object model. This information can be retrieved by the M409 Gcode command and by the rr_model HTTP call.