openHAB solves many problems!

For what it’s worth, I hav very little Linux knowledge and also thought it would be hard to do. But once you have Raspian and Tuya-convert installed, it’s very straightforward.

Here’s another option that doesn’t involve flashing.