This is not exactly an answer to the question you asked but… All Shelly devices work out of the box with local control over wifi. I’ve got a handful of them and they work great with the HA integration.
Additionally, any device that supports HomeKit should also work locally with the HA HomeKit Controller integration (I think it was recently renamed to “HomeKit Devices” or something like that). This integration causes your HA to work like a HomeKit hub (no Apple devices required), and the HomeKit spec requires that devices work over local control.
In both cases for me, I have all these devices banned from talking to the internet at my router so they can’t phone home. Apart from my Ecobee thermostats not being able to keep time without drifting, they all work great.
Good luck!
Resilio Sync is fully cross-platform P2P app for syncing files/folders: https://www.resilio.com/individuals/
I’ve been using it for years and love it.
Edit: Sorry, it’s not FOSS. My bad for not reading the question thoroughly.