Another migration to PI4

I apologize for the banal and perhaps repetitive question. I have a raspbian 4.1.0 release build si PI3 system. I bought a PI4 with 2gb for a system upgrade. I currently use SD card mirroring with external USB adapter. I have read various posts on the forum regarding hardware switches, but I don’t have clear ideas about them. the question is this…if I insert the SD directly into the RP4, will the system boot correctly with the same configurations? risk of corrupting the configuration currently present on RPI3? or do I need to make changes? thanks in advance for the help

Maybe. It depends on the OS installed. When the RPi 4 first came out there were hardware incompatibilities that made it so Raspberry Pi OS versions from before the RPi 4 came out would not work on the RPi 4.

If you installed on the RPi 3 before the RPi 4 came out, even if you’ve done updates since then, I wouldn’t expect the SD card to work in an RPi 4.

Always backup before doing something like this.

Given you are running the latest release version of OH, it should be pretty straight forward to backup your current config and restore it on the RPi 4 after a new install of openHABian. I don’t know what else you are running so you might need to restore stuff anyway.

If you are not running on Debian bookworm already, this looks like a great opportunity to upgrade. I believe openHABian now supports bookworm.

Thanks for the help, everything seems to be working fine. I’m just going crazy to configure static IP. I didn’t remember having all these difficulties with version 11 (bullseye)

I’m just going crazy to configure static IP

I used to do that to because I had no better option but you can do better.

However, if you can, you should not use static IPs.
They results in many problems and extra work. That being said, I am NOT saying you should not have a fixed IP for your OpenHAB server, read on…

My recommandation is:

  • leave your RPi in DHCP
  • tell your router about the Mac Address of your RPi and either let your router’s DHCP provide a random address from its pool, OR setup a static IP in your router so that your RPi always gets the SAME IP, when its DHCP requires a “new” address. This way, you control everything in your router.
  • finally, make sure your router does handle the hostname of your RPi (it will be openhabian by default but you can rename easily using openhabian-config).

So in the end, you can reach your OH via its hostname, ie openhabian, or openhabian.yourdomain.com or whatever hostname you set set and whether the IP of the server changes or now is up to your router/DHCP server.

It is also better this way if you ever decide to setup Firewall rules.

There are many benefits:

  • your RPi remains in DHCP, it does not need to know about an address that may also potentially conflicts with otehr devices
  • if you need to clone your RPi, your router will provide ANOTHER IP since your Mac Address changed … so you can have both systems running in parallel during the migration
  • you can still decide and change your mind, from your router about the fact that your OH has a fixed IP or not (I would recommend a fixed IP…)

I made the jump a few days back from OH v2… to OH v4 from a RPi 2 to a RPi 4 !

The migration was suprisingly easy. I indeed made a backup and a restore and most of it was there.
Really nice !

The only isues I ran into were:

  • http://openhabian:81 did NOT work and did not show me the progress. I test an OH 4 install on my old RPi 2 and I did get the logs there. No buig deal, everything worked anyway.
  • I initially tried adding MANY addons during the startuo wizard… that’s a bad idea. It did hang in the middle and I could not recover. I would recommend sticking with the default 5 addons ONLY and adding the others once the wizard is done.
  • I have a AEON Stick Gen 5 (not +) and I did partly run into the known issues. I did work sometimes, not always. The hardware mod (unsolder R33 from 5V and reroute to 3.3V) did work well

Conclusion: a pretty smooth migration considering the jump from OH2 to OH4 and from RPi2 to RPi4 at the same time.

2 Likes

Bookworm complete changed the networking stack. But @Will has the right idea. It’s better to create a static lease on the DHCP server than to assign a static IP at the device.

openhabian.local should work too. .local is assumed to be in the local subnet. There’s a RFC out to add another non-routable domain (.internal I think) but I don’t know how close it is to being adopted.

That’s a really big jump! I’m glad it worked out well for you! It’s nice to hear when it works because happy people usually don’t post to the forum so it looks like everyone has a bad experience.

Yes, totally fair. I wanted to mention it because I did expect some troubles, not because of OH but because it is simply a double big jump. In the end, I was suprised how smooth it ended up being. I was also suprised that most of my rules / items worked just right off and the other issues showed up in the logs.

So yes, in short, VERY happy.

I also keep seeing you and a few other answering MANY questions and spreading good tips, thanks for that !

My migration was smooth also because I bumped into some warnings before running into the issues (ie Aeon Stick Gen 5 + RPi 4).

Read the docs, please. They explicitly state that configuring static IPs is not supported and what you should do instead.

BTW that wasn’t any different in bullseye.

thank you all for the support. I managed to migrate and it’s a joy to see that everything works well. I’ll be doing some tests in the next few days and there’s a lot of work to do. I managed to set the static IP of my RPI with the NMTUI command. Thanks again!