If it’s a standard openHABian that means zram is enabled which puts the $OH_USERDATA folder into RAM. It’s only written to disk on a graceful shutdown of the zram daemon (or a system reboot). So it might be possible you’ve set up all these configs, pull the power and all your changes are gone.
It might be possible to implement the USBIP client inside the container to avoid that problem. I’ve never tried it but it would solve this particular problem. But this feels like an XY Problem and chasing a solution to the wrong problem.
The last time I saw this looked at, WSL didn’t support hardware passthrough and neither did Docker for Windows. Has this changed?
Yanking the power even without zram on these machines is a bad idea. If the device happens to be actively writing to flash memory at the time power is lost you lose not only that one file, but any file that shares that sector. With wear leveling, that can be anything, parts of the kernel, file system tables, config files unrelated to OH, etc. You can end up with a corrupted system as a result.
Even with SDDs and HDDs, yanking the power without a graceful shutdown is a bad idea. So indeed, something to gracefully shutdown the machine is a must.
From what I understand, perhaps it is related to ZRAM. If what ZRAM wrote to disk is somehow off or has been corrupted from the lose of power, you are basically restoring that corruption to the ZRAM disk when you restart and any changes you made are being lost because you are yanking the power instead of gracefully shutting down.
I suspect corruption over stale state because, to my knowledge, the binding doesn’t really store any ephemeral state on disk. It’s all on RAM. But there are files it loads at startup from disk and if those are corrupted, recreating the Things would fix the problem.
I don’t think your problem is specific to Zwave. It’s a file system problem. It’s just the luck of the draw that you are seeing the problem on Zwave.
tl;dr: you can’t just yank the power from the RPi. If that’s a requirement for you, you need to find some other platform to host OH on. Hard resets are simply not supported on a machine running on flash memory and especially not supported on a machine running zram as you’ll lose everything.
You can’t get there from here. You’ll either need to figure out how to get the machine to safely shutdown or you’ll have to use a different platform.