BlynkDetectDevice.h doesn't detect WeMos D1 Mini

I’m using PlatformIO to manage my code, and I get warnings that the board type is not detected.

Here are the compiler definitions:
-DESP8266 -DARDUINO_ARCH_ESP8266 -DESP8266_WEMOS_D1MINI -DARDUINO=20300

Here is the warning:

.pioenvs/d1_mini/Blynk/Blynk/BlynkDetectDevice.h:267:10: warning: #warning "Cannot detect board type" [-Wcpp]
#warning "Cannot detect board type"
^

It looks like niether ARDUINO_ARCH_ESP8266 or ESP8266_WEMOS_D1MINI are used in BlynkDetectDevice.h

$ egrep -rn '(ARDUINO_ARCH_ESP8266|ESP8266_WEMOS_D1MINI)' Blynk/
$

Can the appropriate parts be added to the if’s there?

As far as I can tell this doesn’t affect anything other than the definition of BLYNK_INFO_DEVICE. It’s not entirely clear to me if this affects anything other than a log message. It is sent to the server, but I’m not sure what it’s used for.

Here’s a diff which resolves the warning at least.

--- a/Blynk/BlynkDetectDevice.h
+++ b/Blynk/BlynkDetectDevice.h
@@ -227,6 +227,8 @@
         #define BLYNK_INFO_DEVICE  "Esp Thing"
         #elif defined(ARDUINO_ESP8266_THING_DEV)
         #define BLYNK_INFO_DEVICE  "Esp Thing Dev"
+        #elif defined(ESP8266_WEMOS_D1MINI)
+        #define BLYNK_INFO_DEVICE  "WeMos D1 Mini"
 
         /* Digistump */
         #elif defined(ARDUINO_ESP8266_OAK)
1 Like

Thanks. I will take a look at this.
In general, this shouldn’t cause much problems :wink:

1 Like