I updated an existing OctoPrint filament sensor plug-in to support QiDi X-Plus and X-Max. The updated plug-in will pause the printer and cool down the extruder to wait for you replace the filament.

https://github.com/tronfu/Filament_sensor_simplified

I’m using this plugin with a raspberrypi running OctoPrint connected to the UART on the QiDi X-Plus’s motherboard. The filament sensor that I’m using is a TriangleLab Filament Runout Sensor: https://www.amazon.com/dp/B07DHD8WHF...p_mob_ap_share

You should be able to use other filament sensors as long as they can be connected to the GPIO pins on a raspberrypi.