<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cron on ads' corner</title><link>https://andreas.scherbaum.la/tags/cron/</link><description>Recent content in Cron on ads' corner</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 04 Sep 2024 00:00:00 +0200</lastBuildDate><atom:link href="https://andreas.scherbaum.la/tags/cron/index.xml" rel="self" type="application/rss+xml"/><item><title>Hugo Blog: Find postings without comment id</title><link>https://andreas.scherbaum.la/post/2024-09-04_hugo-blog-find-postings-without-comment-id/</link><pubDate>Wed, 04 Sep 2024 00:00:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2024-09-04_hugo-blog-find-postings-without-comment-id/</guid><description>&lt;p&gt;In a previous blog posting I explained hwo to add comments using your &lt;em&gt;Mastodon&lt;/em&gt; account. It so happens that I occasionally forget to add the origin &lt;em&gt;Mastodon&lt;/em&gt; comment ID to the posting. So I wrote a script, and a cron job &amp;hellip;&lt;/p&gt;</description></item><item><title>Restic backup</title><link>https://andreas.scherbaum.la/post/2020-12-27_restic-backup/</link><pubDate>Sun, 27 Dec 2020 23:47:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2020-12-27_restic-backup/</guid><description>&lt;p&gt;Was asked quite a few times how I do my backups with &lt;em&gt;Restic&lt;/em&gt;.&lt;/p&gt;&#10;&lt;p&gt;For more than 10 years I was using &amp;ldquo;&lt;a href="https://github.com/andreasscherbaum/duplicity-backup"&gt;Duplicity&lt;/a&gt;&amp;rdquo; for backups, but in 2019 I changed to &lt;a href="https://restic.net/"&gt;Restic&lt;/a&gt;. The main reason for the change was that &lt;em&gt;Duplicity&lt;/em&gt; still can&amp;rsquo;t handle &amp;ldquo;Big Data&amp;rdquo;, as in: larger directories. In 2009 someone opened an &lt;a href="https://bugs.launchpad.net/duplicity/+bug/385495"&gt;issue&lt;/a&gt; on the &lt;em&gt;Duplicity&lt;/em&gt; bugtracker, and this problem still exists as of today. For about two years I was shifting around the problem, excluding files, trying to make the sigfile smaller. But at some point I decided that it is enough and I need to change the tool.&lt;/p&gt;</description></item><item><title>openHAB: faster loading of rules files</title><link>https://andreas.scherbaum.la/post/2020-10-24_openhab-faster-loading-of-rules-files/</link><pubDate>Sat, 24 Oct 2020 19:36:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2020-10-24_openhab-faster-loading-of-rules-files/</guid><description>&lt;p&gt;&lt;em&gt;openHAB&lt;/em&gt; rules files are lazy loaded. When a rule is used the first time, the entire rule file is loaded and compiled, which apparently is single-threaded and takes a couple seconds. Even on a reasonable powerful Rasperry Pi 4. This happens both after restarting &lt;em&gt;openHAB&lt;/em&gt; and after changing the rules file. It also means that whatever the rule in question is supposed to do has to wait a couple seconds when requested for the first time. Imagine you have a light switch, enter a room, press the switch, and it takes 5-10 seconds until the light comes on.&lt;/p&gt;&#10;&lt;p&gt;To work around this problem, I add a piece of code in all rules files which triggers an immediate action right after loading the file. This way the rules file is already pre-loaded (which again takes a couple seconds, but likely at a time when the rule is not needed right now).&lt;/p&gt;</description></item><item><title>Audio reminders in openHAB</title><link>https://andreas.scherbaum.la/post/2020-10-15_audio-reminders-in-openhab/</link><pubDate>Thu, 15 Oct 2020 21:20:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2020-10-15_audio-reminders-in-openhab/</guid><description>&lt;p&gt;A while ago someone mentioned &amp;ldquo;reminders&amp;rdquo; used in their home audio system, and I took that idea and implemented something similar in &lt;a href="https://andreas.scherbaum.la/tags/openhab"&gt;openHAB&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The basic idea is that I can send scheduled notifications to any audio sink &lt;em&gt;openHAB&lt;/em&gt; is using, possibly more than one audio sink for one message. Also I want to differentiate between a simple audio sound, and text output.&lt;/p&gt;</description></item><item><title>openhab2: check if alive</title><link>https://andreas.scherbaum.la/post/2020-04-28_openhab2-check-if-alive/</link><pubDate>Tue, 28 Apr 2020 15:42:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2020-04-28_openhab2-check-if-alive/</guid><description>&lt;p&gt;As mentioned in my previous &lt;a href="https://andreas.scherbaum.la/post/2020-04-08_openhab-habpanel-configuration-gets-destroyed-habpanel-stays-blank/"&gt;openHAB blog post&lt;/a&gt;: it seems to be too much to ask to have a reliable and working display in the kitchen.&lt;/p&gt;&#10;&lt;p&gt;Another problem I found is that the &lt;a href="https://andreas.scherbaum.la/post/2019-01-25_weather-forecast-in-openhab-based-on-openweathermap-using-ansible/"&gt;weather data&lt;/a&gt; occasionally does not update. Everything seems to work, no errors in the log, just no updated data. Of course this results in outdated weather info in the kitchen, and the threat that &amp;ldquo;someone&amp;rdquo; will buy a regular weather station and render my 7&amp;quot; &lt;em&gt;Raspberry&lt;/em&gt; display useless.&lt;/p&gt;</description></item><item><title>Apache Karaf client in openHAB, and the "Session has been closed" error</title><link>https://andreas.scherbaum.la/post/2020-04-21_apache-karaf-client-in-openhab-and-the-session-has-been-closed-error/</link><pubDate>Tue, 21 Apr 2020 20:39:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2020-04-21_apache-karaf-client-in-openhab-and-the-session-has-been-closed-error/</guid><description>&lt;p&gt;Don&amp;rsquo;t you love it when things suddenly stop working?&lt;/p&gt;&#10;&lt;p&gt;In my &lt;a href="https://andreas.scherbaum.la/categories/openhab"&gt;openHAB&lt;/a&gt; installation I have a check which verifies that the weather data is up to date. Otherwise it restarts the openhab2 service. And this check stopped working &amp;hellip; Leaving the kitchen display not updated for a longer time. The same display where I expect the entire installation to &amp;ldquo;just work&amp;rdquo;, and don&amp;rsquo;t create so many different problems. Seems to be a hard problem to have an &lt;em&gt;openHAB&lt;/em&gt; installation without any trouble &amp;hellip;&lt;/p&gt;</description></item><item><title>Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)</title><link>https://andreas.scherbaum.la/post/2020-01-29_reboot-the-raspberry-pi-on-network-failures-brcmfmac-brcmf_cfg80211_scan-scan-error-110/</link><pubDate>Wed, 29 Jan 2020 01:41:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2020-01-29_reboot-the-raspberry-pi-on-network-failures-brcmfmac-brcmf_cfg80211_scan-scan-error-110/</guid><description>&lt;p&gt;In one of my &lt;a href="https://andreas.scherbaum.la/post/2020-01-18_occasional-habpanel-disconnect-from-the-openhab-server/"&gt;earlier blog posts&lt;/a&gt; I reported that occasionally the &lt;em&gt;HABpanel&lt;/em&gt; will disconnect from the server. Turns out it&amp;rsquo;s not &lt;em&gt;HABpanel&lt;/em&gt;, but it&amp;rsquo;s the Pi itself which is causing the trouble. Part of the problem why it took me so long to investigate is that the display is in the kitchen, and someone had to have a look and spot the small red error message. To work around that problem, I hooked the device up in the network monitoring, and had an alarm triggered when the device is not reachable. Sure enough, that happens occasionally.&lt;/p&gt;&#10;&lt;p&gt;Because I moved &lt;code&gt;/var/log&lt;/code&gt; to a small RAM disk to &lt;a href="https://andreas.scherbaum.la/post/2019-01-13_avoid-wear-out-of-ssd-cards-in-an-openhab-system/"&gt;avoid wearing out the SDcard&lt;/a&gt;, all logs are lost once the device is rebooted. Had to bring keyboard and mouse to the kitchen in order to save the logfiles once the device was no longer reachable over the network.&lt;/p&gt;&#10;&lt;p&gt;Turns out it&amp;rsquo;s a well-known problem with the network chip on the &lt;em&gt;Raspberry Pi&lt;/em&gt;. One of the &lt;em&gt;GitHub&lt;/em&gt; &lt;a href="https://github.com/raspberrypi/linux/issues/2453"&gt;issues is open since 2018&lt;/a&gt;, the &lt;a href="https://github.com/raspberrypi/linux/issues/3155"&gt;other one since 2019&lt;/a&gt;. So no hope for a real quick fix :-(&lt;/p&gt;</description></item><item><title>Dim the Raspberry Pi screen</title><link>https://andreas.scherbaum.la/post/2020-01-26_dim-the-raspberry-pi-screen/</link><pubDate>Sun, 26 Jan 2020 14:26:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2020-01-26_dim-the-raspberry-pi-screen/</guid><description>&lt;p&gt;The new &lt;em&gt;Raspberry&lt;/em&gt; display works nice, but the screen is too bright. At night in the kitchen it enlightens the entire room - unnecessarily. Since I&amp;rsquo;m using the original &lt;a href="https://www.raspberrypi.org/products/raspberry-pi-touch-display/"&gt;Raspberry Pi 7&amp;quot; touch display&lt;/a&gt;, the brightness can be controlled in &lt;code&gt;/sys/class/backlight/rpi_backlight/brightness&lt;/code&gt;. This &amp;ldquo;file&amp;rdquo; can hold a value from &lt;code&gt;0&lt;/code&gt; (&lt;em&gt;display off&lt;/em&gt;) to &lt;code&gt;255&lt;/code&gt; (&lt;em&gt;full bright&lt;/em&gt;).&lt;/p&gt;&#10;&lt;p&gt;My first idea was to use a light sensor. But the display itself does not have such a sensor, and if I connect one to the &lt;em&gt;Pi&lt;/em&gt;, I somehow need to connect the sensor in a way that it can &amp;ldquo;see&amp;rdquo; the light in the room. Which means the sensor is clearly visible next to the display.&lt;/p&gt;&#10;&lt;p&gt;The next idea is a cron job, which dims the display, depending on the time of the day. A bit brighter over the day, and almost dark in the night. Cron job works fine, but let&amp;rsquo;s make this an exercise in writing more code by using &lt;em&gt;systemd&lt;/em&gt; timers. Because why not making it more complicated &amp;hellip;&lt;/p&gt;</description></item><item><title>Occasional HABpanel disconnect from the openHAB server</title><link>https://andreas.scherbaum.la/post/2020-01-18_occasional-habpanel-disconnect-from-the-openhab-server/</link><pubDate>Sat, 18 Jan 2020 16:20:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2020-01-18_occasional-habpanel-disconnect-from-the-openhab-server/</guid><description>&lt;p&gt;The new display showing &lt;em&gt;HABpanel&lt;/em&gt; works quite nice. But occasionally the fullscreen browser will lose the network connection. As far as I can see, it&amp;rsquo;s not a &lt;a href="https://andreas.scherbaum.la/post/2020-01-13_raspberry-pi-disable-wi-fi-powersave-and-stay-connected-all-the-time/"&gt;Wi-Fi problem of the Raspberry Pi&lt;/a&gt;, but still annoying: in the morning the browser shows a small red warning that the connection to the &lt;a href="https://www.openhab.org/"&gt;openHAB&lt;/a&gt; server is lost, time is still correct, but temperature and the status of other devices is outdated. To fix that, I have to leave fullscreen mode, hit reload - and then there is no keyboard for &lt;a href="https://andreas.scherbaum.la/post/2020-01-14_automatically-start-a-fullscreen-browser-on-a-raspberry-pi-show-openhab-habpanel/"&gt;going into fullscreen mode&lt;/a&gt; again (that&amp;rsquo;s using the &lt;code&gt;F11&lt;/code&gt; key).&lt;/p&gt;</description></item><item><title>webhook service with TLS and Let's Encrypt certificate</title><link>https://andreas.scherbaum.la/post/2019-12-15_webhook-service-with-tls-and-lets-encrypt-certificate/</link><pubDate>Sun, 15 Dec 2019 19:15:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2019-12-15_webhook-service-with-tls-and-lets-encrypt-certificate/</guid><description>&lt;p&gt;For a number of services, I need a system/service which can receive web hooks, and act when such a trigger is received.&lt;/p&gt;</description></item><item><title>Weather Forecast in openHAB based on OpenWeatherMap, using Ansible</title><link>https://andreas.scherbaum.la/post/2019-01-25_weather-forecast-in-openhab-based-on-openweathermap-using-ansible/</link><pubDate>Fri, 25 Jan 2019 21:00:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2019-01-25_weather-forecast-in-openhab-based-on-openweathermap-using-ansible/</guid><description>&lt;p&gt;After setting up &lt;a href="https://andreas.scherbaum.la/post/2019-01-24_install-openweathermap-in-openhab-using-ansible/"&gt;OpenWeatherMap in openHAB&lt;/a&gt;, I had another project on my list: send a forecast for the next day.&lt;/p&gt;&#10;&lt;p&gt;That is rather easy to do with a &lt;a href="https://www.openhab.org/docs/configuration/rules-dsl.html#time-based-triggers"&gt;Cron&lt;/a&gt; &lt;a href="https://www.openhab.org/docs/configuration/rules-dsl.html"&gt;rule&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Run your own Dynamic DNS server</title><link>https://andreas.scherbaum.la/post/2014-04-08_run-your-own-dynamic-dns-server/</link><pubDate>Tue, 08 Apr 2014 18:00:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2014-04-08_run-your-own-dynamic-dns-server/</guid><description>&lt;p&gt;Dyn, the company behind the widely known dynamic &lt;em&gt;DNS&lt;/em&gt; service &lt;em&gt;DynDNS&lt;/em&gt;, will &lt;a href="https://www.theregister.com/2014/04/07/dyn_kills_free_dynamic_dns/"&gt;shut&lt;/a&gt; &lt;a href="https://web.archive.org/web/20140407192532/http://dyn.com/blog/why-we-decided-to-stop-offering-free-accounts/"&gt;down&lt;/a&gt; it&amp;rsquo;s free service effectively May 7th, 2014. Of course there are plenty of other free or freemium services out there, but history will repeat itself and these services will vanish over time, or change their business modell.&lt;/p&gt;&#10;&lt;p&gt;A while ago I spent an afternoon to implement my own dynamic &lt;em&gt;DNS&lt;/em&gt; service.&lt;/p&gt;</description></item><item><title>Cleanup and reuse unused Copy&amp;Paste disk space occupied by VMware</title><link>https://andreas.scherbaum.la/post/2013-09-09_cleanup-and-reuse-unused-copypaste-disk-space-occupied-by-vmware/</link><pubDate>Mon, 09 Sep 2013 16:08:37 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2013-09-09_cleanup-and-reuse-unused-copypaste-disk-space-occupied-by-vmware/</guid><description>&lt;p&gt;Whenever you &lt;em&gt;Copy&amp;amp;Paste&lt;/em&gt; (or &lt;em&gt;Cut&amp;amp;Paste&lt;/em&gt;) something into or from a &lt;em&gt;VMware&lt;/em&gt; instance, the software first copies the files into a temporary directory and later on sends the copy/move job to &lt;em&gt;Windows&lt;/em&gt;. Since the &lt;em&gt;Windows&lt;/em&gt; task is asynchronous, &lt;em&gt;VMware&lt;/em&gt; has no chance to find out when this actually finishes - so it is supposed to clean up this temporary directory at boot time.&lt;/p&gt;&#10;&lt;p&gt;However, waiting for the next reboot can clog up quite some disk space (when I develop something I often have to copy many files around between several virtual machines and the desktop) - despite that &lt;em&gt;Windows&lt;/em&gt; still likes to &lt;a href="https://en.wikipedia.org/wiki/Blue_screen_of_death"&gt;BSoD&lt;/a&gt; on me from time to time. And sometimes &lt;em&gt;VMware&lt;/em&gt; does not get the cleanup right at reboot and the files are still there.&lt;/p&gt;</description></item><item><title>sudo: sorry, you must have a tty to run sudo</title><link>https://andreas.scherbaum.la/post/2009-10-19_sudo-sorry-you-must-have-a-tty-to-run-sudo/</link><pubDate>Mon, 19 Oct 2009 13:16:12 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2009-10-19_sudo-sorry-you-must-have-a-tty-to-run-sudo/</guid><description>&lt;p&gt;It took me a while to find out, why this backup script would not start. Finally, I found this error message: &lt;code&gt;sudo: sorry, you must have a tty to run sudo&lt;/code&gt;. The sudo call is required to execute &lt;code&gt;clustat&lt;/code&gt; and find out, which machine is the current master.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;sudo&lt;/code&gt; is configured to execute &lt;code&gt;clustat&lt;/code&gt; without password and works fine on the command line - so what&amp;rsquo;s wrong here?&lt;/p&gt;</description></item><item><title>Manage Serendipity installations with Spartacus</title><link>https://andreas.scherbaum.la/post/2008-09-13_manage-serendipity-installations-with-spartacus/</link><pubDate>Sat, 13 Sep 2008 17:59:20 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2008-09-13_manage-serendipity-installations-with-spartacus/</guid><description>&lt;p&gt;I have to manage a few &lt;em&gt;Serendipity&lt;/em&gt; (&lt;em&gt;s9y&lt;/em&gt;) installations. Only one of them is my personal blog, the others are customer installations, all on different servers. Apart from new &lt;em&gt;Serendipity&lt;/em&gt; versions, there&amp;rsquo;s also the problem with updated plugins. How can one know about available updates without opening each blog in a browser window, open administration, select &lt;code&gt;Configure Plugins&lt;/code&gt; and check for new sidebar and event plugins?&lt;/p&gt;</description></item><item><title>Cron mails from root@localhost</title><link>https://andreas.scherbaum.la/post/2007-09-07_cron-mails-from-rootlocalhost/</link><pubDate>Fri, 07 Sep 2007 13:55:48 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2007-09-07_cron-mails-from-rootlocalhost/</guid><description>&lt;p&gt;If your &lt;code&gt;cron&lt;/code&gt; keeps sending mails from &lt;code&gt;root@localhost&lt;/code&gt; (which is bad, if the mails are forwarded to another system), check your mailserver settings. In &lt;a href="https://www.postfix.org/"&gt;Postfix&lt;/a&gt;, your &lt;a href="https://www.postfix.org/postconf.5.html#myhostname"&gt;$myhostname&lt;/a&gt; setting should point to an existing and valid &lt;code&gt;domainname&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>