iotappstory/ESP-Library

Conflict boardnames

Closed this issue · 10 comments

Before update "Espressif ESP32 Dev Module" after update "ESP32 Dev Module".
No match anymore.

Schermafbeelding 2020-10-17 115432
Schermafbeelding 2020-10-17 115207
Schermafbeelding 2020-10-17 115255

Please advise or correction.

Best regards.

I am not sure what problem you are running into, could you elaborate?

@bergvdna @CwlBroeders ,
Thankyou for pointing this out. Ill answer in English for other users....
I did a little digging and think we both arrive at more or less the same conclusion.

It seems like PlatformIO includes a different defined ARDUINO_BOARD for the board variants when compiling.
In your case we expected:
Your device was defined as "ESP32_DEV" with 4 MB flash.
but got:
Your device was defined as "Espressif ESP32 Dev Module" with 4 MB flash.

This was not a problem before. But we have become stricter since the last update in how we link apps to devices based on this ARDUINO_BOARD define (which we store when you add your device)

Admittedly we did nearly all the final testing with Arduino IDE as this is where most of our users are. We should have been able to catch this..... and will update the testing procedures.

I expect to push an update solving this issue whithin 24-hours.

@bergvdna @CwlBroeders,

Have you modified anything in your PIO settings regarding your ESP board?

Because accourding to this link at PIO your board should have been defined as:
PLATFORMIO_ followed by the normal Arduino board def.

Resulting in
Your device was defined as "PLATFORMIO_ESP32_DEV" with 4 MB flash.
and not:
Your device was defined as "Espressif ESP32 Dev Module" with 4 MB flash.

You still found a bug: In our previous versions of the website we auto removed the "PLATFORMIO_" prefix from the ARDUINO_BOARD define. And in the new one this is missing.

But this is not going to solve your issue..... We have to figure out why the apps you compile with PIO end up with the wrong define.

@bergvdna

We pushed our fix re-implementing the "remove PLATFORMIO_ prefix". So please try. But as mentioned before I don't expect this to fix your problem as you have an entirely wrong ARDUINO_BOARD define.

If all is setup correctly you should now get:
Your device was defined as "PLATFORMIO_ESP32_DEV" with 4 MB flash.
and not:
Your device was defined as "Espressif ESP32 Dev Module" with 4 MB flash.

Our fix transforms PLATFORMIO_ESP32_DEV to the expected: ESP32_DEV
But then again your ARDUINO_BOARD define: "Espressif ESP32 Dev Module" worries me ;)

Maby @Valdhor can help by comparing PIO board setup?

It's been a while since I used PlatformIO... But I decided to revisit this topic and write a tutorial this weekend on how to setup plaformio for esp's using IAS.

So Ill let you know if I find anything interesting.

My current board is the Heltec WiFi Kit 32 and here is my platformio.ini:

[env:heltec_wifi_kit_32] platform = espressif32 board = heltec_wifi_kit_32 framework = arduino monitor_speed = 115200 lib_deps = me-no-dev/AsyncTCP@^1.1.1 me-no-dev/ESP Async WebServer@^1.2.3 iotappstory/IOTAppStory-ESP@^2.1.0-RC3

I did have to make sure my lib_deps were in the correct order before it would compile. I had made the assumption that it didn't matter but it appears that it does.

I'm afraid I don't see yours.

That does not look right:

[env:heltec_wifi_kit_32]
platform = espressif32
board = heltec_wifi_kit_32
framework = arduino
monitor_speed = 115200
lib_deps =
me-no-dev/AsyncTCP@^1.1.1
me-no-dev/ESP Async WebServer@^1.2.3
iotappstory/IOTAppStory-ESP@^2.1.0-RC3

@bergvdna I owe you an apology!

  • for taking so long
  • you were right
    Ive been working with some people on Discord to figure this out. And as it turns out PIO is very inconsistent when compiling the ARDUINO_BOARD define. With some boards it uses the board name, with others the variant or other fields.

So in the end you where right! We need the user to be able to select boards / modules if undetected because chances are it is a supported board / module.

This has been changed, feel free to reopen the issue if deemed necessary.