Move from Windows to linux

Started out with Windows getting to learn openhab now that I’m more confident in the way it works I’m ready to make the move to a raspberry pi 3 and Raspbian. Any ideas on the best way to do this?.. setup from scratch or can I migrate everything as is. I also have a gen5 aeon labs zstick I’ll be moving over so I’m not sure if that will work or not.

I would recommend setting it up fresh using an apt-get installation as descried in the docs. After this you can copy your item-, sitemap- and rule files into the new installatin. Regarding the Raspberry, you have to know that this not the most stable setup. Especially the SD card might make troubles after a while… solution options are discussed here

1 Like

The Pi 3 is a good host, but as reyem mentioned, there can be issues with corrupted SD cards. There are things you can do to mitigate this in the long run but in the short run, so long as you have a much larger SD card than you need (16 GB or more) the SD corruption problem shouldn’t become one for awhile, giving you time to learn Linux.

I’d also recommend starting fresh with either a an apt-get installed or, even better with openHABian which is a preconfigured Raspbian with OH 2. If you start with openHABian you know you will be starting with a well known and tested install.

You can move your Items, Things, Rules, etc. over no problem. The controller will work just fine, just be aware that device addressing is different in Linux than Windows. Also, for your battery powered devices, you will have to wake them up again so the zwave binding can discover the information it needs about the device. Just use the same procedure you used when you first installed and configured them.

Also, I don’t know how the Channel IDs are generated, they may change so double check and if so you will have to update your Items with the new Channel IDs.


I do have a usb to ssd sata adapter and have read that this would be the ideal solution. Would just having the openhab install on a large usb flash drive or on a ssd be a good solution? I definitely would rather not have issues. I know that with windows its been working very well so far and ive easily migrated from one windows install to another without issues. Is the issue that the logs get so large they just fill up the sd card? couldnt there just be a rule created that archives the log every week and then clears it out after a few months?

Also and maybe i didnt understand this corretly when i move the zstick over to the new openhab2 install and setup the addon will i have to dissconnect the devices from the zstick and add them again or will they be brought in since they are already joined to the stick?

The issue is how flash memory works. You can only write to the same physical bits a limited number of times. The cards and USB drives are designed to spread your writes out all over the card so everywhere wears evenly. But if you do a lot of writing eventually the card wears out. This is particularly a problem for programs like openHAB because not only does it write a lot of logs, but one of its key features, persistence, also wires a ton to disk. Even if you religiously clear the logs and only use the bare minimum persistence, your SD card will wear out eventually.

You can mitigate that by using a really large SD Card which gives you more writes before it circles around and starts rewriting on the same bits again. But the only full proof approaches is to move the writes off of the SD Card. There are lots of approaches to do this, ideas mentioned on this thread are just a few.

You will not have to re-pair your devices to the controller. You will have to manually wake up your battery powered devices so the binding can interrogate them fur needed information though.

Edit: oh my autocorrect, you are my nemesis. “Ideas ashtrays mangrove”… Sigh


So would the best solution be to have some kind of USB to data adapter and use a large ssd like 128gb or even a spinning laptop HD to keep that from being an issue. How long would you say a 32gb as card would go before failing?

It is impossible to say how long a card will last. some people have had a card wear out in an afternoon while others have never had a card wear out.

That is one approach. Others use a network for system. Some put logs on a tmpfs partition which is a RAM disk. Some take these approaches to their logical extreme and run the Pi completely read only. Like I said on another thread, lots of options.

For now I would get at least a 16 gig and card and focus on learning Linux enough to get around. Once you have OH running well and a good maintenance routine down, then look at alternative ways to run the Pi to minimize the writes on the SD card. You should have months to years on average before the card wears out unless you run with debug logging on all the time.

As @rlkoshak already proposed, I would also just start with a simple setup using a SD card ( 16GB should be enough ) and learn to know the system. After that you can still change your setup to one of the options. My raspberry actually never had a corruption on the SD causing the SD to be unusable after this. “Just” the filesystem was damaged. So I always could reformat and reinstall everything on the same SD card. Therefore I have 2 recommendations if you want to limit your troubles:

  1. To keep your filesystem on the SD card intact I can just recommend to always properly shutdown the raspberry before you power it off. ( I often forget this when I switch off power at the fuse box, when installing a new in-wall zwave switch :wink: )
  2. After you have a working setup you like, make a backup of the whole SD card. There are many tutorials for this. For example this for windows users: