Extract the received value from downlink messages

That’s text. This decodes to the character 5, followed by the character 0, followed by another 0.

Maybe Change Timermillis() period on downlink for STM32L0 - #6 by arjanvanb can get you started, but: you should really encode the number in a binary way, and not send ASCII characters.

(And aside, given the data rather than payload_raw, and the lacking dev_id: are you using the deprecated TTN Node-RED library?)