<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>http://wiki.fhem.de/w/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi%3A_RTC_Hat</id>
	<title>Raspberry Pi: RTC Hat - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.fhem.de/w/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi%3A_RTC_Hat"/>
	<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Raspberry_Pi:_RTC_Hat&amp;action=history"/>
	<updated>2026-04-22T16:18:47Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in FHEMWiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Raspberry_Pi:_RTC_Hat&amp;diff=40802&amp;oldid=prev</id>
		<title>Geoker: Ergänzender Hinweis für die integrierte RTC des Raspi 5. Hätte mir heute arbeit gespart ;)</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Raspberry_Pi:_RTC_Hat&amp;diff=40802&amp;oldid=prev"/>
		<updated>2026-02-19T09:40:06Z</updated>

		<summary type="html">&lt;p&gt;Ergänzender Hinweis für die integrierte RTC des Raspi 5. Hätte mir heute arbeit gespart ;)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 19. Februar 2026, 11:40 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== RTC Hat ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== RTC Hat ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Das RTC Hat stellt eine Aufsteckplatine mit einer &amp;#039;&amp;#039;&amp;#039;Real Time Clock&amp;#039;&amp;#039;&amp;#039; (batteriegestützte Echtzeituhr) zur Verfügung. Es ist optimal geeignet, um den Pi beim Start und vor dem Start von FHEM mit einer exakten Uhrzeit zu versorgen und sei daher allen PI-Nutzern wärmstens empfohlen. Wie [[Raspberry_Pi#Echtzeituhr|beschrieben]], hat FHEM starke Probleme beim Start mit einer falschen Uhrzeit, die durch eine RTC vermieden werden.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Das RTC Hat stellt eine Aufsteckplatine mit einer &amp;#039;&amp;#039;&amp;#039;Real Time Clock&amp;#039;&amp;#039;&amp;#039; (batteriegestützte Echtzeituhr) zur Verfügung. Es ist optimal geeignet, um den Pi beim Start und vor dem Start von FHEM mit einer exakten Uhrzeit zu versorgen und sei daher allen PI-Nutzern wärmstens empfohlen. Wie [[Raspberry_Pi#Echtzeituhr|beschrieben]], hat FHEM starke Probleme beim Start mit einer falschen Uhrzeit, die durch eine RTC vermieden werden.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;Hinweis: Der &#039;&#039;&#039;Raspi5&#039;&#039;&#039; hat eine integrierte RTC. Diese hält mit dem integrierten Kondensator jedoch nur wenige Stunden. Die einfachste Lösung, dies bei Bedarf zu verlängern, ist es eine Knopfzelle mit einem JST-Kabel anzustecken. Diese gibt es vorkonfektioniert für wenige Euro.&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Bestellquellen ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Bestellquellen ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1fhemwiki:diff:1.41:old-25379:rev-40802:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Geoker</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Raspberry_Pi:_RTC_Hat&amp;diff=25379&amp;oldid=prev</id>
		<title>Morgennebel: Initiale Seite</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Raspberry_Pi:_RTC_Hat&amp;diff=25379&amp;oldid=prev"/>
		<updated>2018-02-19T09:38:03Z</updated>

		<summary type="html">&lt;p&gt;Initiale Seite&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== RTC Hat ==&lt;br /&gt;
Das RTC Hat stellt eine Aufsteckplatine mit einer &amp;#039;&amp;#039;&amp;#039;Real Time Clock&amp;#039;&amp;#039;&amp;#039; (batteriegestützte Echtzeituhr) zur Verfügung. Es ist optimal geeignet, um den Pi beim Start und vor dem Start von FHEM mit einer exakten Uhrzeit zu versorgen und sei daher allen PI-Nutzern wärmstens empfohlen. Wie [[Raspberry_Pi#Echtzeituhr|beschrieben]], hat FHEM starke Probleme beim Start mit einer falschen Uhrzeit, die durch eine RTC vermieden werden.&lt;br /&gt;
&lt;br /&gt;
== Bestellquellen ==&lt;br /&gt;
Die üblichen Online-Händler, z.B.&lt;br /&gt;
&lt;br /&gt;
# https://smile.amazon.de/gp/product/B071HYN28Z MakerHawk RPI DS3231 RTC Modul Himbeer pi Echtzeituhrmodul mit Münzbatterie&lt;br /&gt;
&lt;br /&gt;
Wichtig ist die Auswahl eines RTC-Modules, daß die Batterie separat verpackt mitliefert - sonst ist diese bereits teilweise genutzt und muß schnell ausgetauscht werden.&lt;br /&gt;
&lt;br /&gt;
== Hardware-Installation ==&lt;br /&gt;
Dauer ca. 1 Minute:&lt;br /&gt;
&lt;br /&gt;
# Raspberry PI herunterfahren, vom Strom trennen&lt;br /&gt;
# Batterie in das RTC Hat einsetzen&lt;br /&gt;
# RTC Hat auf die Steckleister aufstecken (siehe Bilder beim Amazon-Link)&lt;br /&gt;
# Raspberry Pi wieder anschalten&lt;br /&gt;
&lt;br /&gt;
Dies funktioniert auch in Kombination mit dem [[Raspberry_Pi:_UPS_Hat|UPS Hat]].&lt;br /&gt;
&lt;br /&gt;
== Software-Installation ==&lt;br /&gt;
Das RTC Hat stellt eine I2C-Schnittstelle zur Verfügung. Bei der Nutzung des &amp;#039;&amp;#039;&amp;#039;Raspbian&amp;#039;&amp;#039;&amp;#039;-Images kann dieses mittels des Kommandos &amp;#039;&amp;#039;&amp;#039;raspi-config&amp;#039;&amp;#039;&amp;#039; in den erweiterten Optionen konfiguriert werden.&lt;br /&gt;
&lt;br /&gt;
Manuell erfolgt die Konfiguration durch:&lt;br /&gt;
&lt;br /&gt;
  apt-get install i2ctools i2c-dev libi2c-dev&lt;br /&gt;
&lt;br /&gt;
sowie durch editieren der /etc/modules und laden der Module i2c-bcm2708 und i2c-dev:&lt;br /&gt;
&lt;br /&gt;
  root@pi-hole:~# more /etc/modules&lt;br /&gt;
  # /etc/modules: kernel modules to load at boot time.&lt;br /&gt;
  #&lt;br /&gt;
  # This file contains the names of kernel modules that should be loaded&lt;br /&gt;
  # at boot time, one per line. Lines beginning with &amp;quot;#&amp;quot; are ignored.&lt;br /&gt;
  &lt;br /&gt;
  i2c-bcm2708&lt;br /&gt;
  i2c-dev&lt;br /&gt;
&lt;br /&gt;
sowie /boot/config.txt:&lt;br /&gt;
&lt;br /&gt;
  [...]&lt;br /&gt;
  # Uncomment some or all of these to enable the optional hardware interfaces&lt;br /&gt;
  dtparam=i2c_arm=on&lt;br /&gt;
  dtparam=i2c1=on&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
Nach einem Reboot können die Werte dann ausgelesen werden.&lt;br /&gt;
&lt;br /&gt;
== RTC Nutzung ==&lt;br /&gt;
&lt;br /&gt;
Zur Aktivierung (Nutzung) des RTC Hats sind mehrere Kommandos als root auf der Kommandozeile einzugeben:&lt;br /&gt;
&lt;br /&gt;
   echo ds1307 0x68 &amp;gt; /sys/class/i2c-adapter/i2c-0/new_device&lt;br /&gt;
&lt;br /&gt;
(dabei ist 0x68 die Adresse des RTC Hats auf dem I2C Bus) sowie zur &amp;#039;&amp;#039;&amp;#039;/boot/config.txt&amp;#039;&amp;#039;&amp;#039; die Zeile&lt;br /&gt;
&lt;br /&gt;
  dtoverlay=i2c-rtc,ds1307&lt;br /&gt;
&lt;br /&gt;
hinzuzufügen.&lt;br /&gt;
&lt;br /&gt;
Auch sollte &amp;#039;&amp;#039;&amp;#039;/etc/default/hwclock&amp;#039;&amp;#039;&amp;#039; modifiziert werden:&lt;br /&gt;
&lt;br /&gt;
  root@pi-hole:/etc/default# more hwclock &lt;br /&gt;
  # Defaults for the hwclock init script.  See hwclock(5) and hwclock(8).&lt;br /&gt;
  &lt;br /&gt;
  # This is used to specify that the hardware clock incapable of storing&lt;br /&gt;
  # years outside the range of 1994-1999.  Set to yes if the hardware is&lt;br /&gt;
  # broken or no if working correctly.&lt;br /&gt;
  #BADYEAR=no&lt;br /&gt;
  &lt;br /&gt;
  # Set this to yes if it is possible to access the hardware clock,&lt;br /&gt;
  # or no if it is not.&lt;br /&gt;
  HWCLOCKACCESS=yes&lt;br /&gt;
  &lt;br /&gt;
  # Set this to any options you might need to give to hwclock, such&lt;br /&gt;
  # as machine hardware clock type for Alphas.&lt;br /&gt;
  #HWCLOCKPARS=&lt;br /&gt;
  &lt;br /&gt;
  # Set this to the hardware clock device you want to use, it should&lt;br /&gt;
  # probably match the CONFIG_RTC_HCTOSYS_DEVICE kernel config option.&lt;br /&gt;
  HCTOSYS_DEVICE=rtc0&lt;br /&gt;
&lt;br /&gt;
Nach einem Neustart steht das RTC Modul dann zur Verfügung. Der Befehl&lt;br /&gt;
&lt;br /&gt;
   hwclock -w&lt;br /&gt;
&lt;br /&gt;
schreibt die aktuelle Systemzeit in das RTC Hat. Dies sollte nach einem &amp;#039;&amp;#039;&amp;#039;ntpdate&amp;#039;&amp;#039;&amp;#039; Befehl&lt;br /&gt;
erfolgen. Danach aktualisiert sich das RTC Hat durch den laufenden ntpd.&lt;br /&gt;
&lt;br /&gt;
Ein Test kann durch einen Neustart ohne Netzwerkkabel/WIFi erfolgen. Hat der RPI ohne Netzwerk-Zugang eine korrekte Uhrzeit funktioniert das RTC Hat wie gewünscht.&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Raspberry Pi]]&lt;/div&gt;</summary>
		<author><name>Morgennebel</name></author>
	</entry>
</feed>