{"id":1676,"date":"2017-11-15T20:24:03","date_gmt":"2017-11-15T20:24:03","guid":{"rendered":"http:\/\/www.horter.de\/blog\/?p=1676"},"modified":"2023-01-13T15:30:43","modified_gmt":"2023-01-13T15:30:43","slug":"fhem-gpio-pins-abfragen-und-reagieren","status":"publish","type":"post","link":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/","title":{"rendered":"FHEM &#8211; GPIO Pins abfragen und reagieren"},"content":{"rendered":"<p>Unser INT vom I2C-Bus liegt auf dem GPIO17\u00a0vom Raspberry PI.<\/p>\n<p>Mit diesen Zeilen definieren wir in FHEM den GPIO als Interrupt-Eingang. In der letzten Zeile wird festgelegt, was passieren soll, wenn der GPIO17 &#8222;LOW&#8220; wird.<\/p>\n<p>In unserem Beispiel wird die angelegte Eingangskarte auf Adresse 0x38 eingelesen.<\/p>\n<pre>define GPIO17 RPI_GPIO 17\r\nattr GPIO17 active_low yes\r\nattr GPIO17 direction input\r\nattr GPIO17 interrupt both\r\nattr GPIO17 room i2c\r\nattr GPIO17 userReadings lese_DI {fhem (\"get modulE38 read\")}<\/pre>\n<p>Hat man mehrere Eingangskarten, die gelesen werden sollen, muss die unterste Zeile entsprechend erweitert werden.<\/p>\n<pre>lese_DI {\r\nfhem (\"get modulE38 read\")\r\nfhem (\"get modulE39 read\")\r\nfhem (\"get modulE40 read\")\r\n}<\/pre>\n<p>Man kann einen GPIO auch \u00fcber ein Pollintervall abfragen. Am GPIO4 h\u00e4ngt der Taster vom I2C-Repeater.<\/p>\n<pre>define GPIO04 RPI_GPIO 4\r\nattr GPIO17 room i2c\r\nattr GPIO04 poll_intervall 0.002<\/pre>\n<p>Und am GPIO27 ist die gr\u00fcne LED des Repeaters angeschlossen. Um die LED als Ausgang zu definieren tr\u00e4gt man folgende Zeilen ein.<\/p>\n<pre>define GPIO27 RPI_GPIO 27\r\nattr GPIO27 room i2c\r\nattr GPIO27 direction output<\/pre>\n<p>Auf der Oberfl\u00e4che sollte es dann in etwa so aussehen. Wird der Taster auf dem Repeater gedr\u00fcckt toggelt der GPIO4.<\/p>\n<p>\u00c4ndert sich ein Bitmuster an der angeschlossenen Eingangskarte toggelt der GPIO17<\/p>\n<p>Der GPIO27 schaltet die gr\u00fcne LED auf dem Repeater ein und aus.<\/p>\n<p><a href=\"https:\/\/www.horter.de\/blog\/fhem_gpio\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-27887 size-full\" src=\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2020\/01\/fhem_gpio.png\" alt=\"\" width=\"548\" height=\"692\" srcset=\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2020\/01\/fhem_gpio.png 548w, https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2020\/01\/fhem_gpio-238x300.png 238w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Im Modul E38 kann dann das Attribut &#8222;poll_interval&#8220; gel\u00f6scht werden. Die Eing\u00e4nge werden trotzdem gelesen. \ud83d\ude42<\/p>\n<p><a href=\"https:\/\/www.horter.de\/blog\/fhem_notify_int\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-26517 size-full alignnone\" src=\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2020\/01\/fhem_notify_int.png\" alt=\"\" width=\"400\" height=\"342\" srcset=\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2020\/01\/fhem_notify_int.png 400w, https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2020\/01\/fhem_notify_int-300x257.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unser INT vom I2C-Bus liegt auf dem GPIO17\u00a0vom Raspberry PI. Mit diesen Zeilen definieren wir in FHEM den GPIO als Interrupt-Eingang. In der letzten Zeile wird festgelegt, was passieren soll, wenn der GPIO17 &#8222;LOW&#8220; wird. In unserem Beispiel wird die&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\">mehr lesen<\/a><\/p>\n","protected":false},"author":3,"featured_media":1580,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[211,255],"tags":[],"class_list":["post-1676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fhem","category-raspberry-pi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FHEM - GPIO Pins abfragen und reagieren - Horter &amp; Kalb Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FHEM - GPIO Pins abfragen und reagieren - Horter &amp; Kalb Blog\" \/>\n<meta property=\"og:description\" content=\"Unser INT vom I2C-Bus liegt auf dem GPIO17\u00a0vom Raspberry PI. Mit diesen Zeilen definieren wir in FHEM den GPIO als Interrupt-Eingang. In der letzten Zeile wird festgelegt, was passieren soll, wenn der GPIO17 &#8222;LOW&#8220; wird. In unserem Beispiel wird die... mehr lesen\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\" \/>\n<meta property=\"og:site_name\" content=\"Horter &amp; Kalb Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-15T20:24:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-13T15:30:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"124\" \/>\n\t<meta property=\"og:image:height\" content=\"138\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"JH\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"JH\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\"},\"author\":{\"name\":\"JH\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2\"},\"headline\":\"FHEM &#8211; GPIO Pins abfragen und reagieren\",\"datePublished\":\"2017-11-15T20:24:03+00:00\",\"dateModified\":\"2023-01-13T15:30:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\"},\"wordCount\":190,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png\",\"articleSection\":[\"FHEM\",\"Raspberry PI\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\",\"url\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\",\"name\":\"FHEM - GPIO Pins abfragen und reagieren - Horter &amp; Kalb Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png\",\"datePublished\":\"2017-11-15T20:24:03+00:00\",\"dateModified\":\"2023-01-13T15:30:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage\",\"url\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png\",\"contentUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png\",\"width\":124,\"height\":138},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Start\",\"item\":\"https:\/\/www.horter.de\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FHEM &#8211; GPIO Pins abfragen und reagieren\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.horter.de\/blog\/#website\",\"url\":\"https:\/\/www.horter.de\/blog\/\",\"name\":\"Horter & Kalb Blog\",\"description\":\"SPS, I2C und mehr\",\"publisher\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.horter.de\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.horter.de\/blog\/#organization\",\"name\":\"Horter & Kalb Blog\",\"url\":\"https:\/\/www.horter.de\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png\",\"contentUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png\",\"width\":400,\"height\":400,\"caption\":\"Horter & Kalb Blog\"},\"image\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2\",\"name\":\"JH\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg\",\"contentUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg\",\"caption\":\"JH\"},\"url\":\"https:\/\/www.horter.de\/blog\/author\/j-horter\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FHEM - GPIO Pins abfragen und reagieren - Horter &amp; Kalb Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/","og_locale":"de_DE","og_type":"article","og_title":"FHEM - GPIO Pins abfragen und reagieren - Horter &amp; Kalb Blog","og_description":"Unser INT vom I2C-Bus liegt auf dem GPIO17\u00a0vom Raspberry PI. Mit diesen Zeilen definieren wir in FHEM den GPIO als Interrupt-Eingang. In der letzten Zeile wird festgelegt, was passieren soll, wenn der GPIO17 &#8222;LOW&#8220; wird. In unserem Beispiel wird die... mehr lesen","og_url":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/","og_site_name":"Horter &amp; Kalb Blog","article_published_time":"2017-11-15T20:24:03+00:00","article_modified_time":"2023-01-13T15:30:43+00:00","og_image":[{"width":124,"height":138,"url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png","type":"image\/png"}],"author":"JH","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"JH","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#article","isPartOf":{"@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/"},"author":{"name":"JH","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2"},"headline":"FHEM &#8211; GPIO Pins abfragen und reagieren","datePublished":"2017-11-15T20:24:03+00:00","dateModified":"2023-01-13T15:30:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/"},"wordCount":190,"commentCount":2,"publisher":{"@id":"https:\/\/www.horter.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage"},"thumbnailUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png","articleSection":["FHEM","Raspberry PI"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/","url":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/","name":"FHEM - GPIO Pins abfragen und reagieren - Horter &amp; Kalb Blog","isPartOf":{"@id":"https:\/\/www.horter.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage"},"image":{"@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage"},"thumbnailUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png","datePublished":"2017-11-15T20:24:03+00:00","dateModified":"2023-01-13T15:30:43+00:00","breadcrumb":{"@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#primaryimage","url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png","contentUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2017\/11\/fhem_logo.png","width":124,"height":138},{"@type":"BreadcrumbList","@id":"https:\/\/www.horter.de\/blog\/fhem-gpio-pins-abfragen-und-reagieren\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Start","item":"https:\/\/www.horter.de\/blog\/"},{"@type":"ListItem","position":2,"name":"FHEM &#8211; GPIO Pins abfragen und reagieren"}]},{"@type":"WebSite","@id":"https:\/\/www.horter.de\/blog\/#website","url":"https:\/\/www.horter.de\/blog\/","name":"Horter & Kalb Blog","description":"SPS, I2C und mehr","publisher":{"@id":"https:\/\/www.horter.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.horter.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/www.horter.de\/blog\/#organization","name":"Horter & Kalb Blog","url":"https:\/\/www.horter.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png","contentUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png","width":400,"height":400,"caption":"Horter & Kalb Blog"},"image":{"@id":"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2","name":"JH","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg","contentUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg","caption":"JH"},"url":"https:\/\/www.horter.de\/blog\/author\/j-horter\/"}]}},"_links":{"self":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts\/1676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/comments?post=1676"}],"version-history":[{"count":19,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts\/1676\/revisions"}],"predecessor-version":[{"id":28146,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts\/1676\/revisions\/28146"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/media\/1580"}],"wp:attachment":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/media?parent=1676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/categories?post=1676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/tags?post=1676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}