{"id":24112,"date":"2024-09-30T12:51:12","date_gmt":"2024-09-30T10:51:12","guid":{"rendered":"https:\/\/www.wjst.de\/blog\/?p=24112"},"modified":"2025-06-16T08:08:52","modified_gmt":"2025-06-16T06:08:52","slug":"steuerung-von-lufter-und-trockner-im-keller","status":"publish","type":"post","link":"https:\/\/www.wjst.de\/blog\/sciencesurf\/2024\/09\/steuerung-von-lufter-und-trockner-im-keller\/","title":{"rendered":"Steuerung von L\u00fcfter und Trockner im Keller"},"content":{"rendered":"<p>Nach einigen<a href=\"https:\/\/www.wjst.de\/blog\/sciencesurf\/2022\/04\/ein-fahrrad-abstandswarner\/\">\u00a0fr\u00fcheren Projekten auf Basis des Raspberry Pi Zero<\/a> kommt hier nun ein viertes mit dem Temperatur und Luftfeuchte im Keller und der Aussenluft bestimmt wird. Es funktioniert auf Basis des h\u00e4ufig verwendeten <a href=\"https:\/\/www.sparkfun.com\/products\/16467\">SHTC3 Sensors<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-24113\" src=\"https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2024\/09\/Bildschirmfoto-2024-09-30-um-12.46.11-620x458.jpg\" alt=\"\" width=\"620\" height=\"458\" srcset=\"https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2024\/09\/Bildschirmfoto-2024-09-30-um-12.46.11-620x458.jpg 620w, https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2024\/09\/Bildschirmfoto-2024-09-30-um-12.46.11-677x500.jpg 677w, https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2024\/09\/Bildschirmfoto-2024-09-30-um-12.46.11-768x567.jpg 768w, https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2024\/09\/Bildschirmfoto-2024-09-30-um-12.46.11-rotated.jpg 1241w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Da die physikalische I2C Adresse des SHTC3 nicht ge\u00e4ndert werden kann, brauchen wir zus\u00e4tzlich ein <a href=\"https:\/\/learn.sparkfun.com\/tutorials\/qwiic-mux-hookup-guide\/all#p\">Mux Board<\/a>, das mit einer L\u00f6tbr\u00fccke auf dem ADR0 Jumper die Adresse von 0x70 auf 0x71 \u00e4ndert.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n#!\/usr\/bin\/env python3\r\n\r\nimport csv\r\nimport board\r\nimport busio\r\nimport adafruit_shtc3\r\nfrom adafruit_tca9548a import TCA9548A\r\n\r\ndef main():\r\n  # Initialize the iic bus\r\n  i2c = busio.I2C(board.SCL, board.SDA)\r\n\r\n  # Initialize the TCA9548A multiplexer\r\n  mux = TCA9548A(i2c, address=0x71)\r\n\r\n  # Initialize the SHTC3 sensor on MUX channel 0\r\n  shtc3_channel_0 = adafruit_shtc3.SHTC3(mux&#x5B;0])\r\n\r\n  # Initialize the SHTC3 sensor on MUX channel 1\r\n  shtc3_channel_1 = adafruit_shtc3.SHTC3(mux&#x5B;1])\r\n\r\n  with open(&quot;\/home\/admin\/www\/taupunkt.log&quot;,&quot;a+&quot;) as out_file:\r\n    tsv_writer = csv.writer(out_file, delimiter=&#039;\\t&#039;)\r\n    temperature0, relative_humidity0 = read_shtc3(shtc3_channel_0)\r\n    temperature1, relative_humidity1 = read_shtc3(shtc3_channel_1)\r\n    dt = time.strftime(&#039;%Y-%m-%d %H:%M:%S&#039;)\r\n    tsv_writer.writerow(&#x5B;dt,\r\n      temperature0,relative_humidity0,\r\n      temperature1,relative_humidity1])\r\n\r\nif __name__ == &#039;__main__&#039;:\r\nmain()\r\n<\/pre>\n<p>Damit kann nun <a href=\"https:\/\/www.kellerlueftung24.de\/epages\/17633109.sf\/de_DE\/?ObjectPath=\/Shops\/17633109\/Products\/10-72\/SubProducts\/10-72-03\">nach Bedarf ein L\u00fcfter<\/a> angesteuert werden, mit unter 40\u20ac Bauteilen statt mit 570\u20ac Fertigl\u00f6sung. Als smarte Steckdosen gibt es zB die <a href=\"https:\/\/www.raspberry-pi-geek.de\/ausgaben\/rpg\/2016\/03\/wlan-steckdose-mit-dem-raspberry-pi-steuern\/\">Edimax Smartplug SP1101W<\/a> auf der ein Webserver l\u00e4uft der curl Befehle annimmt.<\/p>\n\n<p>&nbsp;<\/p>\n<div class=\"bottom-note\">\n  <span class=\"mod1\">CC-BY-NC Science Surf , accessed 22.04.2026<\/span>\n <\/div>","protected":false},"excerpt":{"rendered":"<p>Nach einigen\u00a0fr\u00fcheren Projekten auf Basis des Raspberry Pi Zero kommt hier nun ein viertes mit dem Temperatur und Luftfeuchte im Keller und der Aussenluft bestimmt wird. Es funktioniert auf Basis des h\u00e4ufig verwendeten SHTC3 Sensors. &nbsp; &nbsp; Da die physikalische I2C Adresse des SHTC3 nicht ge\u00e4ndert werden kann, brauchen wir zus\u00e4tzlich ein Mux Board, das &hellip; <a href=\"https:\/\/www.wjst.de\/blog\/sciencesurf\/2024\/09\/steuerung-von-lufter-und-trockner-im-keller\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Steuerung von L\u00fcfter und Trockner im Keller<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[3728,4917,1690,839,3245],"class_list":["post-24112","post","type-post","status-publish","format-standard","hentry","category-computer-software","tag-raspberry","tag-zero","tag-pi","tag-python","tag-temperature"],"_links":{"self":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/24112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/comments?post=24112"}],"version-history":[{"count":9,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/24112\/revisions"}],"predecessor-version":[{"id":25327,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/24112\/revisions\/25327"}],"wp:attachment":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/media?parent=24112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/categories?post=24112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/tags?post=24112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}