SDS011 not visible

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
haplm
New user
Posts: 4
Joined: 15 Mar 2020, 15:54

SDS011 not visible

#1 Post by haplm » 15 Mar 2020, 16:02

Hi, I'm trying to attach SDS011 dust sensor, which should be supported. I'm running ESP_Easy_mega-20200310_test_ESP32_4M316k.bin image, which says this in the firmware section:

Build:⋄ 20104 - Mega32
System Libraries:⋄ ESP32 SDK v3.2.3-14-gd3e562907
Git Build:⋄ mega-20200310
Plugin Count:⋄ 76 [Normal] [TEST ESP32]
Build Time:⋄ Mar 10 2020 01:33:00
Binary Filename:⋄ Self built!

This is what I see when I try to add the sensor:
Screenshot 2020-03-15 at 13.13.52.png
Screenshot 2020-03-15 at 13.13.52.png (792.04 KiB) Viewed 10841 times
Can someone tell me what's going on, please? Thanks!

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: SDS011 not visible

#2 Post by ThomasB » 15 Mar 2020, 18:32

Code: Select all

Build Time:⋄ Mar 10 2020 01:33:00
Binary Filename:⋄ Self built!
It appears you are running a self built binary instead of an official [TESTING] release. So revise your build flags in the define_plugin_sets.h; Make sure P056 is included before rebuilding.

- Thomas

haplm
New user
Posts: 4
Joined: 15 Mar 2020, 15:54

Re: SDS011 not visible

#3 Post by haplm » 15 Mar 2020, 18:53

Yeah, that message puzzles me, because I'm not running a self-built image. I've tried, yes, but this is my last flash command which is using official release:

Code: Select all

esptool.py --chip esp32 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x10000 ~/Downloads/ESPEasy_mega-20200310/bin/ESP_Easy_mega-20200310_test_ESP32_4M316k.bin
Anyway, you have pointed me to the right direction, as define_plugin_sets.h says:

Code: Select all

/******************************************************************************\
 * Remove incompatible plugins ************************************************
\******************************************************************************/
#ifdef PLUGIN_SET_TEST_ESP32
 ....
//  #undef USES_P056   // SDS011-Dust     (doesn't work yet on ESP32)
That's really sad, is there a possibility that this can be solved somehow?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: SDS011 not visible

#4 Post by ThomasB » 15 Mar 2020, 19:32

Code: Select all

//  #undef USES_P056   // SDS011-Dust     (doesn't work yet on ESP32)
This build exception is fully commented out. So P056 should be included in the compile.

Code: Select all

Yeah, that message puzzles me, because I'm not running a self-built image.
I suspect that the "official" build is using a different define_plugin_sets.h than what we see in the zip package. It's time turn on the Bat-Signal because this issue needs assistance from @TD-er.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SDS011 not visible

#5 Post by TD-er » 15 Mar 2020, 20:15

The marking for "self build" is displayed when the default keys are still found in the binary file.
So that sounds like the Python script we use to mark the binary after build is not working properly. (calculate CRC, store build filename, etc)

I never noticed this myself as I only flash directly from the IDE.

When moving plugins to the ESP32 build, I mainly looked at "what does compile".
In the beginning the plugins in need of serial (UART) connectivity were excluded.
Later I introduced the "ESPEasySerial" wrapper which does add support for HW serial on ESP8266/ESP32 and software serial (ESP8266) so that made it possible to have those added to the ESP32 build also.

Maybe I overlooked the SDS011???

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SDS011 not visible

#6 Post by TD-er » 15 Mar 2020, 20:18

Ah found the cause....

In the P056 code is the following:

#ifdef ESP8266 // Needed for precompile issues.

Not sure why though, but apparently it was causing some issues with ESP32.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SDS011 not visible

#7 Post by TD-er » 15 Mar 2020, 20:28

If you remove the #ifdef ESP8266 (and the closing #endif) in these files:
jkSDS011.cpp
jkSDS011.h
_P056_SDS011-Dust.ino

Then you can compile it for ESP32.
I will make a PR for it. ( https://github.com/letscontrolit/ESPEasy/pull/2946 )

In the mean time, you can test if it is working: https://www.dropbox.com/s/q13cnc1tugwwa ... k.bin?dl=0

haplm
New user
Posts: 4
Joined: 15 Mar 2020, 15:54

Re: SDS011 not visible

#8 Post by haplm » 15 Mar 2020, 21:59

Thanks! I will check tomorrow

haplm
New user
Posts: 4
Joined: 15 Mar 2020, 15:54

Re: SDS011 not visible

#9 Post by haplm » 15 Mar 2020, 22:52

Actually - I've tried, and it works :-). Thank you so much for such a fast response!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SDS011 not visible

#10 Post by TD-er » 15 Mar 2020, 23:18

Thanks for testing.
I merged it.

Still have to 'fix' the test build for ESP8266, as it does no longer fit :(
If that's fixed, I can make a new nightly.

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests