OH4 Problem with NTP Binding

I migrated from OH3 to OH4.2.3 on Raspberry 3.
I did a fresh install of OH4 and restored the OH3 configuration. Now I find the time is 2 hours behind the correct time. I checked Setting:local setup, I checked the etc/default/openhab file and everything is correct. I noticed that the Binding ntp is in error and I don’t understand why… below I put an image of the setting. Can anyone help me?

This generally does not work, especially between major OH releases. The restore does not detect nor perform any automated upgrade steps that occur during the upgrade. The recommended approach is to restore your backup to the same version it was taken from and then do an upgrade.

I can’t say this is the cause of the communication error on the Thing or not. I’ve not seen anyone else report issuers with the NTP binding so my first thought is there was some automated upgrade step that got skipped.

What time is 2 hours behind? the NTP binding is only going to control the time shown in a DateTime Item linked to one of its channels. If you are seeing the wrong time in your logs, rules, or on the machine itself, the problem is not related to the binding. There are several threads on the forum you should be able to find with a search. The tl;dr is:

  • check the timezone of the OS
  • if that checks out you may need to pass the timezone as an argument to Java when starting OH
    Details are in the several threads you should be able to find.

Thanks for the reply, I understood the reason, the RPI did not go to the internet. The difference between the old and the new configuration is that in the old RPI I used the eth0 card while in the new one I use the wlan0 while I do not use the eth0. In the RPI the eth0 is used to go to the internet in fact at the command route -n you see this:

image

executing the following command:
openhabian@openhabian:~ sudo route del default gw 192.168.0.1 dev eth0

image

this works, but if I restart the RPI it goes back to how it was before and does not work anymore.

can you tell me how to route the internet in the wlan0 card?

I can’t but I’m sure there are many posts on the Raspberry Pi forums that can. I’ve never had to deal with this problem before.

as a work around in case you don’t find a solution you can create a linux cron job to run the command…
In case it needs to run specific amount of time after the reboot something like

@reboot /bin/sleep 600 && COMMAND

may help.

Hi, have a look here this explains how to persist static routes for Debian a well as other flavors of Linux.
https://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html#deb