Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Praktische Anwendungen (Showcase)
  4. Wemos D1 mini

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    3.7k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.5k

Wemos D1 mini

Scheduled Pinned Locked Moved Praktische Anwendungen (Showcase)
16 Posts 6 Posters 4.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • kmxakK Offline
    kmxakK Offline
    kmxak
    Most Active
    wrote on last edited by
    #6

    Hast du den dht22 einzeln? den gibt es für den wemos auch auf platine

    espeasy hat bereits mqtt und die funktionen für den dht22 integriert

    Gruß Alex

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dippi
      wrote on last edited by
      #7

      Hi

      ja ich hab den DHT einzeln erst nach dem bestellen hab ich gesehen das es den auch auf einer Platine gibt das werde ich dann bestellen wenn ich mal einen zu laufen gebracht habe.

      espeasy hab ich schon gesucht aber nicht dahintergekommen wie das geht.

      könntest du mich dabei anleiten ?

      Gruß

      Dippi

      1 Reply Last reply
      0
      • WalW Offline
        WalW Offline
        Wal
        Developer
        wrote on last edited by
        #8

        Ich nutze das schon lange mit dem MQTT-Adapter.

        `#include <esp8266wifi.h>
        #include <pubsubclient.h>
        #include <dht.h>
        #include <spi.h>
        #include <wire.h>
        #include <adafruit_gfx.h>
        #include <adafruit_ssd1306.h>
        
        // If using software SPI (the default case):
        #define OLED_MOSI   D7 //Connect to D1 on OLED
        #define OLED_CLK    D5 //Connect to D0 on OLED 
        #define OLED_DC     D1 //Connect to DC on OLED
        #define OLED_CS     D8 //Connect to CS on OLED
        #define OLED_RESET  D3 //Connect to RES on OLED
        Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
        dht DHT;
        #define DHT22_PIN D2
        
        const char* ssid = "deine_ssid";
        const char* wpakey = "dein_key";
        const char* mqtt_server = "iobroker_server_ip";
        const char* login = "name";
        const char* password = "passwort";
        
        WiFiClient espClient;
        PubSubClient client(espClient);
        long lastMsg = 0;
        char msg[50];
        char msgt[50];
        int counter;
        String clientName;
        uint8_t mac[6];
        
        String macToStr(const uint8_t* mac){
        
          String result;
        
          for (int i = 0; i < 6; ++i) {
            result += String(mac[i], 16);
        
            if (i < 5){
              result += ':';
            }
          }
          return result;
        }
        
        void setup_wifi() {
          delay(5);
        
          WiFi.begin(ssid, wpakey);
          clientName += "wemos_";    
          WiFi.macAddress(mac);
          clientName += macToStr(mac);
        
          while (WiFi.status() != WL_CONNECTED) {
            delay(500);
          }
        }
        
        void callback(char* topic, byte* payload, unsigned int length) {
        }
        
        void reconnect() {
          while (!client.connected()) {
            if (client.connect((char*) clientName.c_str(), login, password)) {
            } else {
              delay(5000);
            }
          }
        }
        
        void setup() {
          display.begin(SSD1306_SWITCHCAPVCC);
        
          // Clear the buffer.
          display.clearDisplay();
          display.display();
        
          setup_wifi();
          client.setServer(mqtt_server, 1883);
          client.setCallback(callback);
        }
        
        void ReadDHT() {
          int chk = DHT.read22(DHT22_PIN);     
          dtostrf(DHT.temperature, 2, 1, msgt);
          sprintf(msg,"%02x:%02x:%02x:%02x:%02x:%02x/sensor/temperatur/DHT22",mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
          if (client.connected()){
            client.publish(msg,msgt);
          }
          display.clearDisplay();
          display.setTextSize(3);
          display.setTextColor(WHITE);
          display.setCursor(0,0);
          display.print(msgt);
          display.print((char)247);
          display.println("C");
          display.display();
        
          dtostrf(DHT.humidity, 2, 1, msgt);
          sprintf(msg,"%02x:%02x:%02x:%02x:%02x:%02x/sensor/humidity",mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
          if (client.connected()){
            client.publish(msg,msgt);
          }
          display.setTextSize(3);
          display.setTextColor(WHITE);
          display.setCursor(0,32);
          display.print(msgt);
          display.println("%");
          display.display();
        }
        
        void loop() {
          if (!client.connected()) {
            reconnect();
          }
          client.loop();
        
          long now = millis();
          if (now - lastMsg > 6000) {
            lastMsg = now;
            ReadDHT();
          }
        }</adafruit_ssd1306.h></adafruit_gfx.h></wire.h></spi.h></dht.h></pubsubclient.h></esp8266wifi.h>`
        
        Hardware:
        
        Wemos mini
        
        DHT22
        
        SSD1306 Display
          [2551_wemos.jpg](/assets/uploads/files/2551_wemos.jpg)  
          [2551_dsc_0107.jpg](/assets/uploads/files/2551_dsc_0107.jpg)  
          [2551_float.jpg](/assets/uploads/files/2551_float.jpg)  [/i]
        

        Gruß
        Walter

        DoorIO-Adapter
        wioBrowser-Adapter und wioBrowser

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dippi
          wrote on last edited by
          #9

          Hallo

          ich hab im iobroker den mqtt Adapter per github installiert, und versuche jetzt den code per Arduino auf den Wemos zu übertragen aber bekomme beim Kompilieren folgende Fehlermeldung:

          Arduino: 1.6.5 (Windows 7), Platine: "WeMos D1 R2 & mini, 80 MHz, 921600, 4M (3M SPIFFS)"

          DHT22.ino:2:26: fatal error: PubSubClient.h: No such file or directory

          compilation terminated.

          Fehler beim Kompilieren.

          Wo liegt der Fehler die WLan Daten und die Zugangs Daten vom PI hab ich eingegeben.

          Noch was kann ich den DHT22 auch zu testzwecken auch ohne Wiederstand anschließen ?

          Gruß

          Dippi

          1 Reply Last reply
          0
          • K Offline
            K Offline
            knopers1
            wrote on last edited by
            #10

            dir fehlt einfach die PubSubClient.h

            unter anderem ist die Datei auch für dei Verbindung am MQTT Server verantwortlich. Damit kämpfe ich zur Zeit….

            Ich habe einige aus den Netz schon ausprobiert. zB.

            https://github.com/knolleary/pubsubclient

            Der ganze Inhalt soll in den Arduino library Ordner herein... Die PubSubClient.h befindet sich in Ordner src...

            @Wall

            Kannst Du deine lib hier zu verfügung stellen?

            es muß ein Ordner Pubsubclient sein mit dem Inhalt aus dem Bild.
            1526_unbenannt4.png

            HP Microserver Gen8, RPI-4, IoBroker,

            1 Reply Last reply
            0
            • WalW Offline
              WalW Offline
              Wal
              Developer
              wrote on last edited by
              #11

              Habe sie aus dem Bibliotheksverwalter installiert.

              ArduinoIDEversion 1.8.1

              PubSubClientversion 2.6.0
              2551_pub.jpg
              2551_pubsubclient.zip

              Gruß
              Walter

              DoorIO-Adapter
              wioBrowser-Adapter und wioBrowser

              1 Reply Last reply
              0
              • K Offline
                K Offline
                knopers1
                wrote on last edited by
                #12

                danke Dir!

                HP Microserver Gen8, RPI-4, IoBroker,

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dippi
                  wrote on last edited by
                  #13

                  Hallo

                  ArduinoIDEversion 1.8.1 find ich nicht

                  PubSubClientversion 2.6.0 ist installiert

                  PubSubClient.h das Verzeichnis hab ich runtergeladen und im Library Ordner eingefügt.

                  1 Reply Last reply
                  0
                  • WalW Offline
                    WalW Offline
                    Wal
                    Developer
                    wrote on last edited by
                    #14

                    ArduinoIDEversion 1.8.1 ist deine Benutzeroberfläche mit der du den Wemos programmierst, aktuell ist 1.8.3.

                    Wenn du die PubSubClient 2.6.0 über die IDE installiert hast brauchst du den Ordner nicht mehr kopieren.

                    Gruß
                    Walter

                    DoorIO-Adapter
                    wioBrowser-Adapter und wioBrowser

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dippi
                      wrote on last edited by
                      #15

                      ah ok ich hab die Version 1.8.3 installiert

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        cybertron
                        wrote on last edited by
                        #16

                        Hallo zusammen,

                        ich versuche gerade meine Wetterstation auf einem Wemos D1 mini Pro umzusetzten.

                        Dabei habe ich die html-Seiten aus Platzgründen in den SPIFF (Filesystem des Pro) ausgelagt.

                        Grundsätzlich funktioniert das erst einmal recht gut.

                        Die ersten erstellten html-Files konnte ich vom PC mit jedem beliebigen Browser aufrufen.

                        Sobald dies aber etwas umfangreicher werden, zeigt kein Browser (IE, Firefox, Chrome) am PC die Seiten mehr an.

                        Mit dem Safari auf dem iPhone geht es jedoch problemlos.

                        Vielleicht hat von Euch ja jemand eine Idee?

                        Ich bin was html angeht ein blutiger Anfänger und suche mir derzeit alles zusammen und arbeite nach dem Prinzp "try & error"

                        Dieser Code wird einwandfrei überall angezeigt

                         `<title>Wemos D1 mini Pro - WeatherStation V1.0</title>
                        
                        >
                        
                        ##  [myHostname] 
                        
                         **[functionName]** on IP:  [myIPAddress] 
                        
                        <form method="get" action="/reboot">  
                        
                        <fieldset>
                        	<legend>Reboot</legend>
                        
                        Das Geraete wird jetzt **neu gestartet!**
                        
                        Bitte druecke den Button zum Ausfuehren des Reboots...
                        
                        </fieldset>
                        
                        <fieldset>
                        <legend>Reboot ausfuehren</legend>
                        
                        </fieldset>
                        
                        </form>` 
                        
                         `[swVersion]` 
                        
                        Dieser hingegen nur auf dem Iphone:
                        
                        

                        `<title>Wemos D1 mini Pro - WeatherStation V1.0</title>

                        [myHostname]

                        [functionName] on IP: [myIPAddress]

                        <fieldset>
                        <legend>Aktuelle Systemwerte</legend>

                        Aktuelle Systemzeit: [localSystime]

                        freier Systemspeicher: [memfree]

                        Mess-Intervall: [measureInterval]

                        </fieldset>

                        <fieldset>
                        <legend>Netzwerk-Einstellungen</legend>

                        SSID [SSID]

                        IP-Adresse: [myIPAddress]

                        SubNet-Mask: [myIPSubnet]

                        Gateway: [myIPGateway]

                        DNS-Server: [myIPDns]

                        NTP-Server: [actualNTP]

                        ZeitZone: [timeZone]

                        </fieldset>

                        <fieldset>
                        <legend>CCU-Einstellungen</legend>

                        IP der CCU: [hostCCU]

                        CCU-Port: [hostportCCU]

                        Uebertagunsintervall: [transmitInterval]

                        </fieldset>

                        <fieldset>
                        <legend>Menu</legend>

                        			 |
                        
                        			 |
                        
                        			 |
                        
                        			 |
                        
                        			 |
                        
                        			 |
                        
                        			 |
                        
                        			 |
                        

                        </fieldset>`

                        [swVersion]

                        Gruss

                        Silvio

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        702

                        Online

                        32.7k

                        Users

                        82.4k

                        Topics

                        1.3m

                        Posts
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                        ioBroker Community 2014-2025
                        logo
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Home
                        • Recent
                        • Tags
                        • Unread 0
                        • Categories
                        • Unreplied
                        • Popular
                        • GitHub
                        • Docu
                        • Hilfe