Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Praktische Anwendungen (Showcase)
    4. ESP8266-wifi-light- AC 230V Dimmer benötige Hilfe…

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    ESP8266-wifi-light- AC 230V Dimmer benötige Hilfe…

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      knopers1 last edited by

      ich komme nicht wirklich weiter….

      Der MQTT Adapter ist ständig gelb. Manchmal aber werden die Daten angenommen.

      Meistens wenn ich den Wemo reboote... Habt Ihr eine Idee?

      Laut Sketch sollten aber 4 Sachen auftauchen:

      // MQTT Settings

      const char* mqtt_state_topic = "office/light1/state";

      const char* mqtt_brightness_topic = "office/light1/brightness";

      const char* mqtt_fade_topic = "office/light1/fade";

      const char* pir_state_topic = "office/light1/motion";

      Die Zeile mit der Bewegung ist nicht da… Ist es evtl.der Grund dafür?

      Im Log kommt das hier:

      mqtt.0	2017-07-02 02:40:20.484	info	Client [] subscribes on topic "office/light1/fade"
      mqtt.0	2017-07-02 02:40:20.481	info	Client [] subscribes on topic "office/light1/brightness"
      mqtt.0	2017-07-02 02:40:20.470	info	Client [] subscribes on topic "office/light1/state"
      mqtt.0	2017-07-02 02:40:20.412	info	Client [] connected
      mqtt.0	2017-07-02 02:39:45.887	info	Starting MQTT authenticated server on port 1883
      mqtt.0	2017-07-02 02:39:43.945	info	starting. Version 1.3.2 in /opt/iobroker/node_modules/iobroker.mqtt, node: v6.11.0
      host.orangepiplus2e	2017-07-02 02:39:40.906	info	instance system.adapter.mqtt.0 started with pid 9953
      

      EDIT:

      ich habe noch etwas herausgefunden. Das Schalten wird ja angenommen.

      http://192.168.1.150/?s=1 oder http://192.168.1.150/?s=0 bringt dem MQTT Adapter ON und OFF!

      Der Adapter bleibr aber trotdem gelb.
      1526_unbenannt.png
      1526_unbenannt1.png
      1526_unbenannt2.png

      1 Reply Last reply Reply Quote 0
      • Wal
        Wal Developer last edited by

        > const char* mqtt_server = "192,168,1,100";
        Dumme Frage, IP mit Komma anstatt mit Punkten getrennt, funktioniert das ?

        1 Reply Last reply Reply Quote 0
        • K
          knopers1 last edited by

          Hi, habe beides versucht, mit Punkt und Komma… Die IP wird meistens mit dem Punkt getrennt. Habe aber einige Sketche, wo eine Komma dazwischen ist.

          Ich kann Dir echt nicht sagen wieso das so ist. Anderes funktioniert es einfach nicht....

          ****Der MQTT Adapter scheint ein Problem zu haben sobald ich den Wemo einschalte..

          Im LOG kommen ganz viele Warnungen jetzt. Grundsätzlich läuft das Teil, nur eben nicht mit MQTT-Server.

          Gibt es noch eine möglichkeit die Werte mit dem Widget zu verstellen ohne den MQTT Adapter ???****

          ! host.orangepiplus2e 2017-07-02 12:10:02.316 info instance system.adapter.mqtt.0 terminated with code 0 (OK)
          ! mqtt.0 2017-07-02 12:10:02.223 info Adapter is disabled => stop
          ! mqtt.0 2017-07-02 12:10:02.210 info Client [] closed
          ! host.orangepiplus2e 2017-07-02 12:10:02.120 info stopInstance system.adapter.mqtt.0 killing pid 4985
          ! host.orangepiplus2e 2017-07-02 12:10:02.117 info stopInstance system.adapter.mqtt.0
          ! host.orangepiplus2e 2017-07-02 12:10:02.089 info object change system.adapter.mqtt.0
          ! mqtt.0 2017-07-02 12:10:01.774 warn Cannot resolve topic name for ID: system.adapter.rflink.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:10:01.772 warn Cannot resolve topic name for ID: system.adapter.rflink.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:10:00.410 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:10:00.406 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:59.872 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_48.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:59.834 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_58.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:58.764 warn Cannot resolve topic name for ID: system.adapter.admin.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:58.761 warn Cannot resolve topic name for ID: system.adapter.admin.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:58.749 warn Cannot resolve topic name for ID: system.adapter.javascript.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:58.747 warn Cannot resolve topic name for ID: system.adapter.javascript.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:57.796 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_68.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:57.758 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_55.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:55.965 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:55.956 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:55.073 warn Cannot resolve topic name for ID: system.adapter.ping.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:55.067 warn Cannot resolve topic name for ID: system.adapter.ping.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:55.059 warn Cannot resolve topic name for ID: system.adapter.cloud.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:55.057 warn Cannot resolve topic name for ID: system.adapter.cloud.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:54.727 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_36.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:54.307 warn Cannot resolve topic name for ID: system.adapter.web.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:54.305 warn Cannot resolve topic name for ID: system.adapter.web.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:53.864 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:53.862 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.385 warn Cannot resolve topic name for ID: hm-rpc.0.CENTRAL.PONG (object not found)
          ! mqtt.0 2017-07-02 12:09:50.366 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_48.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:50.336 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_58.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:50.316 warn Cannot resolve topic name for ID: system.adapter.yr.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.294 warn Cannot resolve topic name for ID: system.adapter.yr.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.274 warn Cannot resolve topic name for ID: system.adapter.history.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.254 warn Cannot resolve topic name for ID: system.adapter.history.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.234 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_68.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:50.214 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_55.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:50.192 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_36.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:50.172 warn Cannot resolve topic name for ID: system.adapter.rflink.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.153 warn Cannot resolve topic name for ID: system.adapter.rflink.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.133 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.114 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.093 warn Cannot resolve topic name for ID: system.adapter.admin.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.073 warn Cannot resolve topic name for ID: system.adapter.admin.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.054 warn Cannot resolve topic name for ID: system.adapter.javascript.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.035 warn Cannot resolve topic name for ID: system.adapter.javascript.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:50.015 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.993 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.974 warn Cannot resolve topic name for ID: system.adapter.ping.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.955 warn Cannot resolve topic name for ID: system.adapter.ping.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.936 warn Cannot resolve topic name for ID: system.adapter.cloud.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.916 warn Cannot resolve topic name for ID: system.adapter.cloud.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.897 warn Cannot resolve topic name for ID: system.adapter.web.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.877 warn Cannot resolve topic name for ID: system.adapter.web.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.858 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:49.838 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:48.881 warn Cannot resolve topic name for ID: system.adapter.history.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:48.880 warn Cannot resolve topic name for ID: system.adapter.history.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:46.736 warn Cannot resolve topic name for ID: system.adapter.rflink.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:46.734 warn Cannot resolve topic name for ID: system.adapter.rflink.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:45.386 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:45.382 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:43.763 warn Cannot resolve topic name for ID: system.adapter.admin.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:43.749 warn Cannot resolve topic name for ID: system.adapter.admin.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:43.739 warn Cannot resolve topic name for ID: system.adapter.javascript.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:43.737 warn Cannot resolve topic name for ID: system.adapter.javascript.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:40.932 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:40.930 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:40.067 warn Cannot resolve topic name for ID: system.adapter.ping.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:40.059 warn Cannot resolve topic name for ID: system.adapter.ping.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:40.051 warn Cannot resolve topic name for ID: system.adapter.cloud.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:40.049 warn Cannot resolve topic name for ID: system.adapter.cloud.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:39.299 warn Cannot resolve topic name for ID: system.adapter.web.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:39.294 warn Cannot resolve topic name for ID: system.adapter.web.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:39.164 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_48.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:39.147 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_58.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:38.853 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:38.850 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:37.120 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_68.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:37.091 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_55.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:36.151 warn Cannot resolve topic name for ID: hm-rpc.0.CENTRAL.PONG (object not found)
          ! mqtt.0 2017-07-02 12:09:35.054 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_36.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:33.870 warn Cannot resolve topic name for ID: system.adapter.history.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:33.866 warn Cannot resolve topic name for ID: system.adapter.history.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:31.749 warn Cannot resolve topic name for ID: system.adapter.rflink.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:31.746 warn Cannot resolve topic name for ID: system.adapter.rflink.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:30.376 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:30.372 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:28.705 warn Cannot resolve topic name for ID: system.adapter.admin.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:28.697 warn Cannot resolve topic name for ID: system.adapter.admin.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:28.687 warn Cannot resolve topic name for ID: system.adapter.javascript.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:28.684 warn Cannot resolve topic name for ID: system.adapter.javascript.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:25.921 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:25.917 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:25.069 warn Cannot resolve topic name for ID: system.adapter.ping.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:25.067 warn Cannot resolve topic name for ID: system.adapter.ping.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:25.059 warn Cannot resolve topic name for ID: system.adapter.cloud.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:25.058 warn Cannot resolve topic name for ID: system.adapter.cloud.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:24.316 warn Cannot resolve topic name for ID: system.adapter.web.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:24.312 warn Cannot resolve topic name for ID: system.adapter.web.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:23.843 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:23.840 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:19.854 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_48.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:19.812 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_58.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:18.802 warn Cannot resolve topic name for ID: system.adapter.history.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:18.798 warn Cannot resolve topic name for ID: system.adapter.history.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:17.786 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_68.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:17.765 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_55.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:16.745 warn Cannot resolve topic name for ID: system.adapter.rflink.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:16.742 warn Cannot resolve topic name for ID: system.adapter.rflink.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:15.711 warn Cannot resolve topic name for ID: ping.0.orangepiplus2e.192_168_1_36.ms (object not found)
          ! mqtt.0 2017-07-02 12:09:15.398 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:15.396 warn Cannot resolve topic name for ID: system.adapter.fritzbox.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:13.701 warn Cannot resolve topic name for ID: system.adapter.admin.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:13.685 warn Cannot resolve topic name for ID: system.adapter.admin.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:13.682 warn Cannot resolve topic name for ID: system.adapter.javascript.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:13.679 warn Cannot resolve topic name for ID: system.adapter.javascript.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:10.915 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:10.913 warn Cannot resolve topic name for ID: system.adapter.hm-rpc.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:10.090 warn Cannot resolve topic name for ID: system.adapter.ping.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:10.089 warn Cannot resolve topic name for ID: system.adapter.ping.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:10.076 warn Cannot resolve topic name for ID: system.adapter.cloud.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:10.074 warn Cannot resolve topic name for ID: system.adapter.cloud.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:09.333 warn Cannot resolve topic name for ID: system.adapter.web.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:09.330 warn Cannot resolve topic name for ID: system.adapter.web.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:08.832 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:08.830 warn Cannot resolve topic name for ID: system.adapter.hm-rega.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:03.808 warn Cannot resolve topic name for ID: system.adapter.history.0.outputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:03.806 warn Cannot resolve topic name for ID: system.adapter.history.0.inputCount (object not found)
          ! mqtt.0 2017-07-02 12:09:02.227 info Client [] subscribes on topic "office/light1/fade"
          ! mqtt.0 2017-07-02 12:09:02.225 info Client [] subscribes on topic "office/light1/brightness"
          ! mqtt.0 2017-07-02 12:09:02.211 info Client [] subscribes on topic "office/light1/state"
          ! mqtt.0 2017-07-02 12:09:02.159 info Client [] connected[/spoiler]

          1 Reply Last reply Reply Quote 0
          • Wal
            Wal Developer last edited by

            Versuch erst einmal ein Minimalprogramm mit dem MQTT-Client/Server-Plugin:

            `#include <esp8266wifi.h>
            #include <pubsubclient.h>
            
            const char* ssid = "deine_ssid";
            const char* wpakey = "dein_key";
            const char* mqtt_server = "deine_server_ip";
            const char* login = "dein_loginname";
            const char* password = "dein_passwort";
            
            WiFiClient espClient;
            PubSubClient client(espClient);
            long lastMsg = 0;
            char msg[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() {
              setup_wifi();
              client.setServer(mqtt_server, 1883);
              client.setCallback(callback);
            }
            
            void loop() {
              if (!client.connected()) {
                reconnect();
              }
              client.loop();
            
              long now = millis();
              if (now - lastMsg > 6000) {
                lastMsg = now;
                sprintf(msg,"%02x:%02x:%02x:%02x:%02x:%02x/sensor",mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
                if (client.connected()){
                  client.publish(msg,"test");
                }
              }
            }</pubsubclient.h></esp8266wifi.h>`
            
            die Led muß grün sein und das Ganze sieht so aus, wie auf dem Bild.
            
            Wegen PubSubClient siehe [http://forum.iobroker.net/viewtopic.php ... 064#p73692](http://forum.iobroker.net/viewtopic.php?f=35&amp;t=7064#p73692)
              [2551_mqtt1.jpg](/assets/uploads/files/2551_mqtt1.jpg)  
              [2551_mqtt2.jpg](/assets/uploads/files/2551_mqtt2.jpg)  
              [2551_mqtt3.jpg](/assets/uploads/files/2551_mqtt3.jpg)  [/i]
            
            1 Reply Last reply Reply Quote 0
            • K
              knopers1 last edited by

              ok, danke …

              versuche mal und berichte...

              1 Reply Last reply Reply Quote 0
              • K
                knopers1 last edited by

                ok,

                das Testprogram funktoniert. Der Server verbindet auch und nimmt die grüne LED an.

                Testsensor ist auch sichtbar….

                Dann scheint mein Sketch nicht komaptibel zu sein...

                1 Reply Last reply Reply Quote 0
                • Wal
                  Wal Developer last edited by

                  Ich habe den Sketch geladen und ohne Hardware (weil nicht vorhanden) getestet, die MQTT-LED leuchtet grün und die Devices werden erstellt. Ich denke der Sketch funktioniert.

                  1 Reply Last reply Reply Quote 0
                  • K
                    knopers1 last edited by

                    puhh, danke WAL

                    dann bin ich jetzt total verwirrt.. Sketch ist i.o (zumindest bei Dir), und der MQTT Adapter scheint bei mir auch normal zu Arbeiten. (habe dein Testsketch erforgreich getestet)

                    Trotzdem bekomme ich beides nicht zusammen zu laufen, bei Dir geht es. Zum kotzen :?

                    1 Reply Last reply Reply Quote 0
                    • K
                      knopers1 last edited by

                      ich habe nur auch zur Zeit den Wemo ohne Hardware dran… Ich vermute trotzdem nen Fehler im Sketch.

                      Serieller Momitor spuckt nur noch die Meldung vom bridgness aus (siehe Bild)

                      Das Ende vom Lied ist, dass der ganze Adapter träger wird, bis sogar der ganze Admin nicht zu bedienen ist.

                      Unter Objekte/mqtt.0 werden die Daten mehrmalls in der sek. aktualisiert. Der ganze Adapter wird mit den Datensätzen bombardiert.... Man sieht schön in der seriellen Konsole wie schnell die Daten ausgespuckt werden. Ist es bei dir nicht der Fall? Hast Du versucht einen Wert zu ändern und beobachtet ob der Wert in MQTT Adapter aktualisiert wird?

                      Versuche zB. damit: (nur die IP passend Umstellen)

                      http://192.168.1.150/?s=1&b=170
                      1526_unbenannt3.png

                      1 Reply Last reply Reply Quote 0
                      • Wal
                        Wal Developer last edited by

                        Habe es getestet und rufe den Webserver vom Wemos mit deinem Befehl auf und es kommt aber immer nur eine Antwort.

                        Du pollst wahrscheinlich den Befehl und der Wemos antwortet andauernd bis er sich oder iobrocker aufhängt. 2551_mqtt.jpg

                        1 Reply Last reply Reply Quote 0
                        • K
                          knopers1 last edited by

                          Danke Walter,

                          was meinst Du mit pollen ???

                          Kannst Du mir sagen welche WEMO Version Du hast???

                          Evtl. liegt es dadran…. ich habe ein D1 mini... Nicht dass es nur mit einem LolIn funktioniert. Die Teile haben auch die Bezeichnung 8266.... :?

                          Ich setze nur ein Befehl ab (z.B Befehl aus der firefox http://192.168.1.150/?s=1&b=170), der Wemo ist noch ohne Hardware mit dem mini USB Kabel an dem Laptop dran angeschlossen, wovon die Befehle abgesetzt werden.

                          Hast Du eine Idee was ich falsch machen kann?

                          Bei Dir scheint es zu laufen.
                          1526_htb1hkwqmpxxxxb9xxxxq6xxfxxxv.jpg
                          1526_nodemculolin.jpg

                          1 Reply Last reply Reply Quote 0
                          • Wal
                            Wal Developer last edited by

                            Ich nutze einen Wemos Bild unten, siehe http://forum.iobroker.net/viewtopic.php … 064#p73637

                            Pollen nennt man Timer gesteuerte Anfragen, um eine Antwort zu bekommen.

                            Zum Bleistift: Automatisch alle 5 sec. deine Url absetzen, um die Werte vom Wemos zu bekommen.

                            Du siehst in deinem Log MQTT In Anfragen die dauernd vom Wemos empfangen und mit MQTT Out beantwortet werden.

                            In meinem Log siehst du nur MQTT Out's, was bedeutet, das eine Url Anfrage kein MQTT In ist.

                            MQTT In's werden nur von einem MQTT-Server gesendet, um eine Antwort vom MQTT-Client zu bekommen.

                            Evtl. hast du ein Skript in ioBroker laufen, die die Anfragen sendet oder du hast einen MQTT-Server wie z.B. mosquitto auf einem Raspberry zusätzlich laufen ?

                            1 Reply Last reply Reply Quote 0
                            • K
                              knopers1 last edited by

                              Danke Walter,

                              bin jetzt Stück weiter… und zwar: :mrgreen:

                              Habe mit der Einstellung unter MQTT-Adapter gespielt (verändert) und die IN Anfragen kommen nicht mehr..

                              Um deine Frage oben zu beantworten, nein, ich habe keine Scripte, oder zwei installierte mosquitto auf der OrangePi.

                              Die Komplikationen kommen von der Einstellung des MQTT-Adapters...

                              Nachdem ich es verstellt habe,(weis allerdings mitlerweile nicht mehr was dort vorher eingehakt war), werden die Daten ohne Probleme richtung MQTT übertragen.

                              Die IN Anfragen kommen nicht mehr. Siehe Bilder!

                              Allerdings laut LED Status des Adapters, bin ich noch nicht verbunden. Die LED leuchtet GELB.

                              Weiss Du wie ich den Adapter gescheit einstellen kann?

                              EDIT2: Der Parameter: Sende auch Zustände (ack=true): in den Einstellungen des Adapters bringt die IN Meldungen, was den ganzen Adapter lahm legt.

                              Es funktioniert alles, bis auf die gelbe LED die leuchtet. Idee en ?
                              1526_unbenannt1.jpg
                              1526_unbenannt2.jpg
                              1526_unbenannt3.jpg
                              1526_unbenannt4.jpg

                              1 Reply Last reply Reply Quote 0
                              • Wal
                                Wal Developer last edited by

                                Meine MQTT-Einstellungen siehst du weiter oben, mit diesen funktioniert es bei mir ohne Probleme.

                                1 Reply Last reply Reply Quote 0
                                • K
                                  knopers1 last edited by

                                  Danke Walter,

                                  obwohl der Adapter immer noch gelb ist, werden alle Daten an den MQTT übertragen. Scheint wohl am Sketch zu liegen.

                                  Bin momentan noch parallel an einem RGB Kontroller dran, und dort keine Probleme… Dort nimmt der Adapter sofort die grüne LED an.

                                  Jetzt warte ich noch auf die AC Dimmer Schaltung aus China und werde weitermachen sobald alle Teile da sind.

                                  Danke vorerst.

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    Bobberle last edited by

                                    Hi knopers1,

                                    wollte fragen ob du nun deine AC Dimmer Schaltung bekommen hast und diese mit dem ESP8266 testen konntest,

                                    da ich gerne auch sowas machen würde 😄

                                    Gruß,

                                    Bobberle

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      knopers1 last edited by

                                      habe das Projekt aufs Eis gelegt da die Null-Linien-Erkennung an der Schaltung nicht sauber funktionierte.

                                      AC Dimmer zu bauen ist nicht einfach! Du mußt die Schaltung so aufbauen dass der Null-Durchgang der AC Spg. sauber erkannt wird, sonst kannst Du den Triac nicht einmal zünden, oder Du trennst nicht sauber die Halbwellen ab.

                                      Ohne Oszi ist es schwierig…. 😢

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

                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      1.0k
                                      Online

                                      31.7k
                                      Users

                                      79.7k
                                      Topics

                                      1.3m
                                      Posts

                                      3
                                      19
                                      5053
                                      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