Getting Weather binding to work

Hi,
i just started wir openhab, using homematic and weather binding. I use a raspi and used this (https://openhabdoc.readthedocs.io/de/latest/Autostart/) description to run openhab as a serverice. For some reason, the weather binding is only working if i run openhab manually with sudo. When I run the service, the homematic binding is working but the weather is not updated.

Thanks for any idea.

Take a look at the java line:

java -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=$HTTP_PORT -Djetty.port.ssl=$HTTPS_PORT -Djetty.home=. -Dlogback.configurationFile=configurations/logback.xml -Dfelix.fileinstall.dir=addons -Djava.library.path=lib -Djava.security.auth.login.config=./etc/login.conf -Dorg.quartz.properties=./etc/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Djava.awt.headless=true -jar $cp -console &> /dev/null

from the openhab-script and the same line from start.sh (depends on the exact version of openhab you have installed).
Maybe there are parameters which have changed slightly.

For debian-based systems (like raspbian is) it’s a good idea to use the apt- method described inthe wiki, although there are a few pitfalls (automatic rights-setting, ugly!!!)

I compared both files but could not find any major differences beside the debug_opts line.

start_debug.sh

#!/bin/sh

cd `dirname $0`

# set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/
eclipsehome="server";

# set ports for HTTP(S) server
HTTP_PORT=8080
HTTPS_PORT=8443

# get path to equinox jar inside $eclipsehome folder
cp=$(find $eclipsehome -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1);

# debug options
debug_opts="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n"

echo Launching the openHAB runtime in debug mode...
java $debug_opts \
    -Dosgi.clean=true \
    -Declipse.ignoreApp=true \
    -Dosgi.noShutdown=true \
    -Djetty.port=$HTTP_PORT \
    -Djetty.port.ssl=$HTTPS_PORT \
    -Djetty.home=. \
    -Dlogback.configurationFile=configurations/logback_debug.xml \
    -Dfelix.fileinstall.dir=addons \
    -Dfelix.fileinstall.filter=.*\\.jar \
    -Djava.library.path=lib \
    -Dorg.quartz.properties=./etc/quartz.properties \
    -Djava.security.auth.login.config=./etc/login.conf \
    -Dequinox.ds.block_timeout=240000 \
    -Dequinox.scr.waitTimeOnBlock=60000 \
    -Dfelix.fileinstall.active.level=4 \
    -Djava.awt.headless=true \
    -jar $cp $* \
    -console

start.sh

#!/bin/sh

cd `dirname $0`

# set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/
eclipsehome="server";

# set ports for HTTP(S) server
HTTP_PORT=8080
HTTPS_PORT=8443

# get path to equinox jar inside $eclipsehome folder
cp=$(find $eclipsehome -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1);

echo Launching the openHAB runtime...
java \
    -Dosgi.clean=true \
    -Duser.timezone=Europe/Madrid \
    -Declipse.ignoreApp=true \
    -Dosgi.noShutdown=true  \
    -Djetty.port=$HTTP_PORT  \
    -Djetty.port.ssl=$HTTPS_PORT \
    -Djetty.home=.  \
    -Dlogback.configurationFile=configurations/logback.xml \
    -Dfelix.fileinstall.dir=addons -Dfelix.fileinstall.filter=.*\\.jar \
    -Djava.library.path=lib \
    -Djava.security.auth.login.config=./etc/login.conf \
    -Dorg.quartz.properties=./etc/quartz.properties \
    -Dequinox.ds.block_timeout=240000 \
    -Dequinox.scr.waitTimeOnBlock=60000 \
    -Dfelix.fileinstall.active.level=4 \
    -Djava.awt.headless=true \
    -jar $cp $* \
    -console

You don’t have to compare start.sh and start_debug.sh but start.sh and the autostart script you are using. I suppose it’s /usr/bin/openhab as the current raspian image make use of systemd.
As fas as I can see, there are two parameters missing:

-Dfelix.fileinstall.filter=.*\\.jar \
-Dfelix.fileinstall.active.level=4 \

Now I added this two parameters to /usr/bin/openhab and restarted the service but the system is still showing old values. After some time the website is available and i can change the state of my homematic components. However the time shown on the website is several days old and the weather information is also old.
to figure out if something on the raspi is configured wrong I installed openhab via apt-get and copied the item, sitemap and config file. It had the same behavior. As a second step i copied the entire openhab directory to a windows machine and started the system which ended up in the same effect.

Any idea?

Do you use persistence for all items? a newly started openHAB should display uninitialized or - for items, not updated yet.
Is it openHAB 1 or 2?

I use Openhab 1.8.3.
When I start openHAB, the items are displayed with -. After openHAB is connected to homematic, it shows the room temperature and I can also change the state of some items. At the moment I test openHAB on a Windows system. Here the weathedata is refreshed. But still the timestamp that I show on the main site ist 9 days old. It seems like the system is loading some old data.