Hello Jochen,
thank you for this PDF. Don’t know my mistake - perhaps only IDs starting with “8” (Gemeinden) are allowed to be fetched. With your given ID, my command was working.
To make your Script runable:
create directory: “mkdir /etc/openhab2/html/dwd/”
and file: “touch /etc/openhab2/html/dwd/warnings.xml”
make it read and writeable to everyone (e.g. for user openhab and cron) “chmod 666 /etc/openhab2/html/dwd/warnings.xml”
Then, saved your script to /usr/local/bin/dwdweather.sh, and added “#!/bin/bash” at the first line. After chmod +x /usr/local/bin/dwdweather.sh i can run the script as the user “user”.
With and for this user, i created a cron entry: “crontab -e”, and there: “*/5 * * * * /usr/local/bin/dwdweather.sh”
“crontab -l” list the entry.
I run the script manually “/usr/local/bin/dwdwetter.sh” and watch the timestamp of warnings.xml. It is updated. But cron is not running the script … the timestamp remains. What could be wrong?
Where to you use this script? With HabPanel?
Have … good weather! ![]()