Go Down

Topic: Help with ESP32 and Fauxmo (Read 216 times) previous topic - next topic

JonathanIliev

Feb 13, 2020, 10:28 am Last Edit: Feb 13, 2020, 10:30 am by JonathanIliev
I already have some experience with arduino but this is my first time with ESP32. I've been working on a Smart Home project using the fauxmo library, an esp32 and some relays but i keep getting an error in the compiling.Can anyone help me?

spycatcher2k

Quote
but i keep getting an error in the compiling
OK - so post your errors & code!
Mrs Drew
-=-
UK Based PCB Manufacturing - PM for details
I will design & code for you, but I will also charge you (PM me)
Use Google or search this site BEFORE asking!

vaj4088

The screenshot seems to indicate that something is missing, but why someone would post a picture (causing free helpers more work) instead of using code tags and copying and pasting is beyond me.

Similar to many others, I use a mobile device that causes me to prefer proper posts.  No lecture, just explaining the facts.



JonathanIliev

Code: [Select]


#include <Arduino.h>
#ifdef ESP32
 #include <WiFi.h>
  #define RELAY_PIN_1 5
  #define RELAY_PIN_2 18
#else
  #include <ESP8266WiFi.h>
  #define RELAY_PIN_1 19
  #define RELAY_PIN_2 21
#endif
#include "fauxmoESP.h"

#include <RCSwitch.h>

#define SERIAL_BAUDRATE 115200

#define WIFI_SSID "XXX"
#define WIFI_PASS "XXXXXXXXXX"

#define Relay_1 "lamp one"
#define Relay_2 "lamp two"

fauxmoESP fauxmo;



void wifiSetup() {
  // Set WIFI module to STA mode
  WiFi.mode(WIFI_STA);

  // Connect
  Serial.printf("[WIFI] Connecting to %s ", WIFI_SSID);
  WiFi.begin(WIFI_SSID, WIFI_PASS);

  // Wait
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(100);
  }
  Serial.println();

  // Connected!
  Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n", WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
}

void setup() {

  Serial.begin (9600);

  wifiSetup();


 
pinMode (Relay1,OUTPUT);
pinMode (Relay2,OUTPUT);
pinMode (Relay3,OUTPUT);
pinMode (Relay4,OUTPUT);


fauxmo.createServer(true);
fauxmo.setport(80);

fauxmo.enable(true);

fauxmo.addDevice (LIGHTS_1);
fauxmo.addDevice (LIGHTS_2);
fauxmo.addDevice (LIGHTS_3);
fauxmo.addDevice (LIGHTS_4);
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}


JonathanIliev

sorry  


As i said first time  :)

and the error code is
In file included from C:\Users\jonat\Desktop\SmartHome\SmartHome_Board1\SmartHome_Board1.ino:11:0:

C:\Users\jonat\Documents\Arduino\libraries\FauxmoESP\src/fauxmoESP.h:82:25: fatal error: ESPAsyncTCP.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board ESP32 Dev Module.

hannupul

Hello

FauxmoESP library resides:
https://bitbucket.org/xoseperez/fauxmoesp/src/master/


According the README.md of the library:

"Dependencies
Besides the libraries already included with the Arduino Core for ESP8266 or ESP32, these libraries are also required to use fauxmoESP:

ESP8266:

This library uses ESPAsyncTCP library by me-no-dev
ESP32:

This library uses AsyncTCP library by me-no-dev"

You need to download and install those libraries as README.md suggests.

Somehow ESPAsyncTCP.h is missing even if it is needed by ESP8266 and not by ESP32!!!


Go Up