Check filament runout from printer sensor

Hi! My printer is a CR10-S5, that includes a filament run out sensor connected directly to the board.

It works well when printing from the sd card, but is not working when printing from octoprint/octopi.

It would be great if octoprint detects the filament out from the board and issues the M600 code.

It will if the firmware reports that. In order for that to happen HOST_ACTION_COMMANDS and HOST_PROMPT_SUPPORT needs to be enabled in Marlin.