Verschiedenes > ESP8266

DHT22 -> ESP8266 (ESP-01) <=Wlan=> Mosquitto <- Fhem <- MQTT <- MQTT_Device

<< < (34/35) > >>

Pf@nne:
Moin,

läuft den der DHT22 alleine, also per Print Ausgabe?

ESP und MQTT hatte ich hier mal zusammen geschrieben.......
http://www.s6z.de/cms/index.php/homeautomation-homecontrol/hardwareplattformen/esp8266/113-mqtt-basic-esp8266-mqtt-example

vielleicht hilft das....

sbiermann:
Hier ist mein Sketch: https://github.com/sbiermann/ESP8266-DHT22-MQTT
Ist wie schon gesagt der Sketch von Jörg aber radikal um alles raus geworfen was ich nicht brauche.

magic:
Hallo,

ich versuche nun schon seit Stunden den Sketch von Jörg oder sbiermann zu compilen jedoch ohne Erfolg.
Ich versuche es mit Arduino IDE 1.6.7 auf Windows 10 64bit.

Welche libs brauche ich denn?

im Paket von sbiermann wird zum beispiel abgebrochen weil die mqtt.h fehlt.

Könnte mir jemand ein Archiv mit allen notwendigen libs liefern?



--- Code: ---Arduino: 1.6.7 (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"

ESPDHT22FHEM:74: error: no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, char [13], int&)'

 PubSubClient client(ethClient, mqttBroker, mqttPort);

                                                    ^

C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino:74:52: note: candidates are:

In file included from C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino:11:0:

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:99:4: note: PubSubClient::PubSubClient(const char*, uint16_t, void (*)(char*, uint8_t*, unsigned int), Client&, Stream&)

    PubSubClient(const char*, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:99:4: note:   candidate expects 5 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:98:4: note: PubSubClient::PubSubClient(const char*, uint16_t, void (*)(char*, uint8_t*, unsigned int), Client&)

    PubSubClient(const char*, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:98:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:97:4: note: PubSubClient::PubSubClient(const char*, uint16_t, Client&, Stream&)

    PubSubClient(const char*, uint16_t, Client& client, Stream&);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:97:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:96:4: note: PubSubClient::PubSubClient(const char*, uint16_t, Client&)

    PubSubClient(const char*, uint16_t, Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:96:4: note:   no known conversion for argument 1 from 'WiFiClient' to 'const char*'

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:95:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, void (*)(char*, uint8_t*, unsigned int), Client&, Stream&)

    PubSubClient(uint8_t *, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:95:4: note:   candidate expects 5 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:94:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, void (*)(char*, uint8_t*, unsigned int), Client&)

    PubSubClient(uint8_t *, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:94:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:93:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, Client&, Stream&)

    PubSubClient(uint8_t *, uint16_t, Client& client, Stream&);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:93:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:92:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, Client&)

    PubSubClient(uint8_t *, uint16_t, Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:92:4: note:   no known conversion for argument 1 from 'WiFiClient' to 'uint8_t* {aka unsigned char*}'

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:91:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, void (*)(char*, uint8_t*, unsigned int), Client&, Stream&)

    PubSubClient(IPAddress, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:91:4: note:   candidate expects 5 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:90:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, void (*)(char*, uint8_t*, unsigned int), Client&)

    PubSubClient(IPAddress, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:90:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:89:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&, Stream&)

    PubSubClient(IPAddress, uint16_t, Client& client, Stream&);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:89:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:88:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&)

    PubSubClient(IPAddress, uint16_t, Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:88:4: note:   no known conversion for argument 1 from 'WiFiClient' to 'IPAddress'

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:87:4: note: PubSubClient::PubSubClient(Client&)

    PubSubClient(Client& client);

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:87:4: note:   candidate expects 1 argument, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:86:4: note: PubSubClient::PubSubClient()

    PubSubClient();

    ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:86:4: note:   candidate expects 0 arguments, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:67:7: note: constexpr PubSubClient::PubSubClient(const PubSubClient&)

 class PubSubClient {

       ^

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:67:7: note:   candidate expects 1 argument, 3 provided

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:67:7: note: constexpr PubSubClient::PubSubClient(PubSubClient&&)

C:\Users\magic\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:67:7: note:   candidate expects 1 argument, 3 provided

ESPDHT22FHEM:77: error: no matching function for call to 'DHT::DHT()'

 DHT dht;

     ^

C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino:77:5: note: candidates are:

In file included from C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino:9:0:

C:\Users\magic\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:40:4: note: DHT::DHT(uint8_t, uint8_t, uint8_t)

    DHT(uint8_t pin, uint8_t type, uint8_t count=6);

    ^

C:\Users\magic\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:40:4: note:   candidate expects 3 arguments, 0 provided

C:\Users\magic\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: constexpr DHT::DHT(const DHT&)

 class DHT {

       ^

C:\Users\magic\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note:   candidate expects 1 argument, 0 provided

C:\Users\magic\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: constexpr DHT::DHT(DHT&&)

C:\Users\magic\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note:   candidate expects 1 argument, 0 provided

C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino: In function 'void setup()':

ESPDHT22FHEM:148: error: 'startSensors' was not declared in this scope

    startSensors();

                 ^

ESPDHT22FHEM:154: error: 'processDHT' was not declared in this scope

       if(processDHT()) //read DHT22

                     ^

ESPDHT22FHEM:157: error: 'processMqttItems' was not declared in this scope

         processMqttItems();//send temp and hum to MQTT Broker

                          ^

C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino: In function 'void startSensors()':

ESPDHT22FHEM:188: error: 'class DHT' has no member named 'setup'

    dht.setup(DHT22_PIN);

        ^

C:\Users\magic\Documents\Arduino\ESPDHT22FHEM\ESPDHT22FHEM.ino: In function 'boolean processDHT()':

ESPDHT22FHEM:204: error: 'class DHT' has no member named 'readSensor'

   dht.readSensor();

       ^

ESPDHT22FHEM:205: error: 'class DHT' has no member named 'getStatus'

   if (dht.getStatus() != dht.ERROR_NONE)

           ^

ESPDHT22FHEM:205: error: 'class DHT' has no member named 'ERROR_NONE'

   if (dht.getStatus() != dht.ERROR_NONE)

                              ^

ESPDHT22FHEM:208: error: 'class DHT' has no member named 'getStatusString'

     if (debugOutput) Serial.println(dht.getStatusString());

                                         ^

ESPDHT22FHEM:212: error: 'class DHT' has no member named 'getTemperature'

   temperature = dht.getTemperature();

                     ^

ESPDHT22FHEM:219: error: 'class DHT' has no member named 'getHumidity'

   humidity = dht.getHumidity();

                  ^

exit status 1
no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, char [13], int&)'

  Dieser Report hätte mehr Informationen mit
  "Ausführliche Ausgabe während der Kompilierung"
  aktiviert in Datei > Einstellungen.

--- Ende Code ---

Gruß

sbiermann:
Hier sind meine beiden Libraries die ich nutze. Einmal für den DHT22 und für MQTT.

Mickbaer:
Hallo,
die Arduino IDE 1.6.7 scheint für den ESP8266 buggy zu sein.
Versuchs mal mit der 1.6.5 das geht wesentlich besser.   :)
Gruß
Mickbaer aus Berlin

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln