So, I finaly powered the Pi through the printer's PSU.
As expected : it works !
I suspected a lot of noise based on the fact that the Pi and the printer have non-shared ground; as well mentionned here, Creality's printers emits a lot of noise (due to motors, mainly). I never encountered the issue because it's the first time I play with real electricity :D. Arduino+Raspi have no issues for obvious reasons.
So, here's what I've done :
- buy some XT60 Y-connector
- cut one child of the XT60, goes to a LM2596 to get a 5V from the 24V
- power the Pi from this new 5V line
- Bonus : power a relay module with this 5V too, pinned to GPIO40 of the Pi
- Strap the USB power pin (because uhubctrl doesn't work well with Raspi 3b+)
- Install PSU Control and now I can even power off my printer from Octoprint
Octoprint is really a fantastic product. Thanks to the Terminal command, your help and a bit of reading, I spent some wonderful hours debugging this (as many, I love the path more than the destination ;)). Thanks also to Ragheera, I've sourced the relay/duck thing from their print on Thingiverse, they even shared an electronic schema ! (https://www.thingiverse.com/thing:3483446).
Last but not least, it may be time now to look at plugin writing. PSU Control is cool, I may want to be able to extend it with commands like ... trigger a uhubctl command when receiving a M80
I think I've reached a goal now. I'm in debt, so I'll watch the forums and offer help if possible.
Thanks again !