Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. [gelöst] ESP8266 /NodeMCU V3 nur 2 serielle Ausgänge?

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] ESP8266 /NodeMCU V3 nur 2 serielle Ausgänge?

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      klassisch Most Active @Slowman last edited by

      @slowman Wie koppelst Du die PIR-Sensoren an den ESP8266? Welche Spannung haben die und weche Ausgänge? die ESP8266 vertragen nur 3.3V an den GPIO?

      Slowman 1 Reply Last reply Reply Quote 0
      • Slowman
        Slowman @klassisch last edited by Slowman

        @klassisch

        Mit 5V Vin läuft er zuverlässig 3 Stück an einem habe ich schon laufen, bei 3V mag er ab und zu nicht. Da ich ja den Nodemcu über USB betreibe. Habe diese an den GPIO4; 5; 12 laufen.
        Link: https://esphome.io/cookbook/pir.html

        K 1 Reply Last reply Reply Quote 0
        • K
          klassisch Most Active @Slowman last edited by

          @slowman Ok, der hat 5V Versorgung und 3.3V Ausgang. Das passt und wahrscheinlich kannst Du dann auch das Pullup bei diesen Pins weglassen.

          Fortunately, the sensor signal has a voltage of 3.3V max, so we can directly connect it to a free GPIO pin on the ESP board.

          Ich denke, habe auch so einen an einem ESP8266 laufen - seit Jahren...

          1 Reply Last reply Reply Quote 1
          • Dutchman
            Dutchman Developer Most Active Administrators @Slowman last edited by Dutchman

            @slowman sagte in ESP8266 /NodeMCU V3 nur 2 serielle Ausgänge?:

            @klassisch

            Danke für deine Antwort. Wollte bzw. schaue gerade bei Tasmota nach, ob ich da alle 4 Kontakte hinbekomme, wenn es da klappt. Muss es ja auch bei ESPHome klappen.
            Wemos D1 Mini habe ich auch noch welche rumliegen, aber da kann ich auch keine 4 Kontakte anklemmen. Paketbox und Briefkasten soll dies verwendet werden, Einwurf/Entnahme. Bisher habe ich einen Shelly BWM drin und der wacht nicht immer auf 🙄

            Hast du dir mal die Beispiele auf meiner Doku Seite angeschaut ?

            https://drozmotix.github.io/languages/de/Adapter/ESPHome/05.configExample.html#beispiel-konfiguration

            
            # Example configuration for an GPIO output    
            output:
              - platform: gpio
                pin: 12
                inverted: true
                id: gpio_12
                
            # Example configuration linking a switch to the previous defined output
            switch:
              - platform: output
                name: "Generic Output"
                output: 'gpio_12'
            
            

            Weitere Details sind auf ESPHome.io dokumentiert

            Slowman 1 Reply Last reply Reply Quote 1
            • Slowman
              Slowman @Dutchman last edited by

              @dutchman

              output:
                - platform: gpio
                  pin: GPIO5  
                  id: 'gpio_5'
                
              switch:
                - platform: output
                  name: "Generic Output"
                  output: gpio_5
              

              Da bleibt install grau

              K 1 Reply Last reply Reply Quote 0
              • K
                klassisch Most Active @Slowman last edited by

                @slowman Ich dachte, Du wolltest 4 Eingänge für Deine Reed Kontakte bzw. PIR-Module haben? Oder Ausgänge? Denke, der Threadtitel ist noch etwas irreführend.

                Da war Deine Konfiguration oben gar nicht so verkehrt.
                Zu den Pins habe ich ja schon was geschrieben und verlinkt. Nimm die, bei denen es keine Restrictions gibt. Also GPIO12, GPIO13 und die I2C Pins (GPIO4, GPIO5), wenn Du I2C nicht brauchst.
                Bei den PIR-Modulen kannst Du auf pullup verzichten. Bei den Reedkontakten würde ich die nehmen und die Kontakte schalten nach GND. Falls die SW Pullups rumzicken halt schnell Widerstande angelötet.
                Ob Du als device_class motion oder windows nimmst, ist wohl Geschmacksache.

                Slowman 1 Reply Last reply Reply Quote 0
                • Slowman
                  Slowman @klassisch last edited by

                  @klassisch

                  OK, ich dachte es geht doch mit 4 einzelnen Reedkontakten, was dutchman da geschrieben hat. Deshalb der Versuch. Wie ich die Konstallation 2 Reedkontakte und 2 Pir einrichte, habe ich schon fertig und funzt. Das mit den 4 Kontakten wäre platzparender 😊

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    klassisch Most Active @Slowman last edited by

                    @slowman sagte in ESP8266 /NodeMCU V3 nur 2 serielle Ausgänge?:
                    Wie ich die Konstallation 2 Reedkontakte und 2 Pir einrichte, habe ich schon fertig und funzt.

                    Glückwunsch! Klasse.

                    Das mit den 4 Kontakten wäre platzparender 😊

                    Kein Thema. Einfach das

                    mode: INPUT_PULLUP
                    

                    noch rein und Reedkontakte anschließen. Also alle 4 Eingänge gleich parametrisieren.

                    1 Reply Last reply Reply Quote 0
                    • S
                      stimezo Forum Testing @klassisch last edited by

                      @klassisch sagte in ESP8266 /NodeMCU V3 nur 2 serielle Ausgänge?:

                      Bei Wemos haben einige GPIO schon welche eingabaut

                      Die sind nicht auf dem Wemos, sondern im ESP intern.

                      Gruß
                      Christian

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        klassisch Most Active last edited by

                        Bei mir wurde gerade dieses yaml erfolgreich übersetzt_

                        esphome:
                          name: four-digital-inputs-sensor
                          platform: ESP8266
                          board: d1_mini
                        
                        
                        status_led:
                        #  pin: GPIO2
                           pin:
                             number: D4
                             inverted: true
                        
                        <<: !include includes.yaml
                        
                        
                        captive_portal:
                        
                        # Enable logging
                        logger:
                        
                        # Enable Home Assistant API
                        # done in the common includes.yaml file
                        
                        # Example configuration entry
                        
                        
                        binary_sensor:
                          - platform: gpio
                            name: "Paket arrived"
                            pin: 
                              number: GPIO4
                              mode: INPUT_PULLUP
                            device_class: motion
                        
                         
                        
                          - platform: gpio
                            name: "Paket geholt"
                            pin: 
                              number: GPIO5
                              mode: INPUT_PULLUP
                            device_class: motion
                        
                            
                          - platform: gpio
                            name: "Brief"
                            pin: 
                              number: GPIO12
                              mode: INPUT_PULLUP
                            device_class: motion
                        
                            
                        
                          - platform: gpio  
                            name: "Post geholt"
                            pin: 
                              number: GPIO13
                              mode: INPUT_PULLUP
                            device_class: motion
                        
                        sensor:
                          - platform: uptime
                            name: Uptime Sensor
                        
                        #RSSI
                          - platform: wifi_signal
                            name: "WiFi Signal Sensor"
                            update_interval: 10min
                        
                        
                            
                        ota:
                          safe_mode: false
                          port: 8266 
                          #3232 for ESP32
                          #8266 for ESP8266
                        
                        

                        In der Datei includes.yaml stehen bei mir die Wifi credention sowie der api Befehl und das api Password. Das wird in allen yaml referenziert und sieht bei mir in etwa so aus

                        # Standards and Secrets for ESPHome
                        wifi:
                          ssid: "MySSID"
                          password: "MyTopSecrectWifiPWD"
                          domain: .
                        # domain . may be not correct, but works with firtzbox
                        # the domain is to support mDNS for flashing and logging
                        #  domain: .fritz.box
                        # . or .fritz.box worked for me, the default .local did not   
                          
                        
                        
                          # Enable fallback hotspot (captive portal) in case wifi connection fails
                          ap:
                           ssid: "ESPHomeBackup"
                           password: "kebvfzt879jkjnbcf"
                        
                        # Example configuration entry
                        web_server:
                          port: 80
                        
                          # Example configuration entry
                        time:
                          - platform: sntp
                            id: sntp_time
                            servers: "191.168.178.1"
                            timezone: DE
                            # display time
                            #it.strftime(0, 0, id(font), "%Y-%m-%d %H:%M", id(time).now());  
                        
                        
                        # api for use with MQTT and/or ioBroker
                        api:
                            password: 'ohhVerySecret'
                        
                        # Attention: When logged Incorrect Password: enter PWD do not stre but terminate instance and start again https://forum.iobroker.net/post/621511
                        
                        
                            # Example configuration entry
                        #mqtt:
                        #  broker: 192.168.178.99
                        
                        
                        1 Reply Last reply Reply Quote 1
                        • K
                          klassisch Most Active @stimezo last edited by

                          @stimezo Ja, da hast Du recht. Es gibt auf dem Wemos noch ein oder zwei Pins mit externer Beschaltung. Aber ich habe eh keine NodeMCU, sondern nur Wemos und auch bei den ESP32 die "Wemos-Bauform, zweireihig" oder wie die auch immer heißt.

                          Slowman 2 Replies Last reply Reply Quote 0
                          • Slowman
                            Slowman @klassisch last edited by

                            @klassisch

                            Danke, werde das morgen früh gleich testen 👍

                            1 Reply Last reply Reply Quote 0
                            • Slowman
                              Slowman @klassisch last edited by Slowman

                              @klassisch

                              Vielen Dank für deine Hilfe, es funktioniert 👯 Bin schon fast daran verzweifelt, bis ich bei Google, was gefunden habe. Der Editor ist ja so ein penibles Programm, das man auch die Leerzeichen beachten muss.

                              Screenshot 2021-08-14 at 10-29-51 poststation Web Server.png

                              K 1 Reply Last reply Reply Quote 1
                              • K
                                klassisch Most Active @Slowman last edited by

                                @slowman Prima, daß es funktioniert und vielen Dank für die Rückmeldung.
                                mit dem Adapter von @Dutchman kannst Du die Ergebnisse direkt in den Objekten von ioBroker sehen. Beispiel:
                                de9749cb-9e4c-40e9-82bf-3b2fce2ae046-grafik.png
                                Wenn Du die Signale invertieren willst, dann kannst Du es einfach so machen

                                      mode: INPUT_PULLUP
                                      inverted: true
                                

                                Und ja, ich halte YAML für nervig und überflüssig.
                                JSON kann genau das gleiche. Man muß dann halt ein paar {},;[] als Strukturelement tippen. Aber dafür muß man keine Spaces zählen.
                                Völlig unklar, wozu man YAML erfinden mußte, wenn es doch JSON gibt. Vielleicht wollte sich da einfach jemand profilieren.

                                Wenn man sich aber damit mal abgefunden hat, ist das ESPHome System eine feine Sache.

                                Slowman 1 Reply Last reply Reply Quote 0
                                • Slowman
                                  Slowman @klassisch last edited by

                                  @klassisch

                                  Ich benutze schon dutchman seine Integration von ESPHome ins ioBroker. Aber danke für den Hinweis. Ich scheitere meistens am Englisch 🙄 Aber DeepL hilft mir dabei 😇

                                  Dutchman 1 Reply Last reply Reply Quote 1
                                  • Dutchman
                                    Dutchman Developer Most Active Administrators @Slowman last edited by

                                    @slowman sagte in [gelöst] ESP8266 /NodeMCU V3 nur 2 serielle Ausgänge?:

                                    @klassisch

                                    Ich benutze schon dutchman seine Integration von ESPHome ins ioBroker. Aber danke für den Hinweis. Ich scheitere meistens am Englisch 🙄 Aber DeepL hilft mir dabei 😇

                                    freut mich 🙂

                                    Slowman 1 Reply Last reply Reply Quote 0
                                    • Slowman
                                      Slowman @Dutchman last edited by Slowman

                                      @dutchman

                                      Habe mit dem ESP8266 irgendwie Probleme im esphome 😞

                                      Er steigt ständig aus, ist aber Online, wenn ich ihn über das Webinterface aufrufe.

                                      Mal jetzt den aktuellen Stand

                                      Instanzen
                                      Screenshot 2021-08-24 at 09-17-13 instances - ioBroker.png

                                      esphome Reiter

                                      Screenshot 2021-08-24 at 09-18-13 esphome-0 - ioBroker.png

                                      Webinterface über esphome Link

                                      Screenshot 2021-08-24 at 09-18-54 poststation Web Server.png

                                      Er ist on, wird aber vom esphome immer wieder vergessen und oh da ist ja was. Mehrmals das Passwort bei den Instanzen neu eingegeben.

                                      Log:

                                      esphome.0
                                      	2021-08-24 09:14:05.446	info	ESPHome client 192.168.2.121 connected
                                      esphome.0
                                      	2021-08-24 09:14:02.267	info	ESPHome client poststation on ip 192.168.2.121 initialized
                                      esphome.0
                                      	2021-08-24 09:14:02.199	info	poststation announced Switch "Poststation Restart"
                                      esphome.0
                                      	2021-08-24 09:14:02.163	info	poststation announced Sensor "WiFi Signal Sensor"
                                      esphome.0
                                      	2021-08-24 09:14:02.128	info	poststation announced connectivity "WLan System Status"
                                      esphome.0
                                      	2021-08-24 09:14:02.114	info	poststation announced motion "Briefkasten wurde geleert"
                                      esphome.0
                                      	2021-08-24 09:14:02.113	info	poststation announced motion "Paket wurde geholt"
                                      esphome.0
                                      	2021-08-24 09:14:02.113	info	poststation announced motion "Paketeinwurf"
                                      esphome.0
                                      	2021-08-24 09:14:02.062	info	poststation announced motion "Briefeinwurf"
                                      esphome.0
                                      	2021-08-24 09:14:02.028	info	ESPHome Device info received for poststation
                                      esphome.0
                                      	2021-08-24 09:14:02.010	info	ESPHome client 192.168.2.121 connected
                                      esphome.0
                                      	2021-08-24 09:13:35.320	warn	ESPHome client poststation disconnected
                                      esphome.0
                                      	2021-08-24 09:13:35.320	warn	Client 192.168.2.121 Connection Lost, will reconnect automatically when device is available!
                                      esphome.0
                                      	2021-08-24 09:13:31.879	warn	ESPHome client poststation disconnected
                                      esphome.0
                                      	2021-08-24 09:13:31.879	warn	Client 192.168.2.121 Connection Lost, will reconnect automatically when device is available!
                                      esphome.0
                                      	2021-08-24 09:08:35.008	info	ESPHome client poststation on ip 192.168.2.121 initialized
                                      

                                      Habe selbst nochmal geflasht, aber Ergebnis bleibt gleich. Weiß nicht mehr voran es liegen kann.

                                      PS: Habe ja noch andere ESP8266 laufen, die zicken nicht rum.

                                      FredF 1 Reply Last reply Reply Quote 0
                                      • FredF
                                        FredF Most Active Forum Testing @Slowman last edited by

                                        @slowman Briefkasten Überwachung? Der ESP ist dann wohl weiter weg und verliert das WLAN

                                        Slowman 1 Reply Last reply Reply Quote 0
                                        • Slowman
                                          Slowman @FredF last edited by

                                          @fredf

                                          Hmmm.... die Empfangsstärke ist doch sehr gut, habe zwischen 78-83dBm immer. Ist vom Repeater ca. 10m weg mit nur ein zwei Büschen im Weg.

                                          FredF Dutchman 2 Replies Last reply Reply Quote 0
                                          • FredF
                                            FredF Most Active Forum Testing @Slowman last edited by

                                            @slowman Bringe den ESP doch mal näher ran, wie verhält er sich dann?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            925
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            6
                                            41
                                            2193
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo