letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.27k stars 2.21k forks source link

Plantower PMS3003 support? #2002

Closed franki29 closed 3 years ago

franki29 commented 5 years ago

Dear all, i tried to connect a PMS3003 but i do not get any values. No matter using Software Serial or Hardware Seriel . I also tried it with Tasmota Firmware and get a error message Checksum error. Any ideas what i can do? I tested the device with https://github.com/fu-hsi/PMS-Tool and i can read the values from the device. So the device itselve seems to be OK.

Br. Frank

micropet commented 5 years ago

For me, the PMS works at least a few minutes. Then no values come out.

It works perfectly with the samples from the Arduino Lib.

uzi18 commented 5 years ago

@micropet @TD-er maybe we can try with my checksumming?

micropet commented 5 years ago

What do you mean? I like to try something out.

uzi18 commented 5 years ago

what kind of image are you using with PMS?

uzi18 commented 5 years ago

related/duplicate of #1633 #914

tonhuisman commented 3 years ago

I have created a PR to add support for this sensor to P053, if any of the users/owners of a PMS3003 (or PMS2003 that seems to use the same data format), would be so kind to test and report their findings here, that would be very much appreciated. A download for the desired build type can be provided here, if needed.

tonhuisman commented 3 years ago

@franki29 @micropet Are you still available? And able & willing to test the updated plugin? I added support for the PMS2003 and PMW3003 sensors, but without the hardware available I can't test them myself, so a little help would be appreciated very much. As said, the desired .bin I can provide here if you can't build, or download from the Actions build, yourself, just mention what ESP model it should run on, or the desired build type (the plugin is included in many of the builds).

franki29 commented 3 years ago

Hello, yes still here, currently I am using Tasmota, but If you could provide a ESP8266 bin file, I can test it. Br. Frank

tonhuisman commented 3 years ago

but If you could provide a ESP8266 bin file, I can test it.

What size of flash do you have on your ESP (and assuming it is for ESP8266)?

franki29 commented 3 years ago

ESP8266 with 1024 kB

tonhuisman commented 3 years ago

Hm, in these 1M builds I've deliberately disabled these new features, due to the added code-size, and the desire to allow these builds to do OTA updates (though not all of these 1M builds actually allow OTA). I'll have to build a special 1M build for you that does include this feature (or only exclude these features for OTA builds, that might be better), but I'm not at my personal laptop ATM, so it will take until tonight (CET) before I can supply that.

franki29 commented 3 years ago

No problem. As I have to change the firmware, I have to send it over USB , so no problem with OTA.

tonhuisman commented 3 years ago

I've limited the exclusion of the new features to the 1M OTA builds now, so this is an 'official' Github Actions build (Normal, ESP8266 1MB Flash)

(Updated, see below)

franki29 commented 3 years ago

Hi I test it with Software Serial, but no values are read out of the device.

franki29 commented 3 years ago

If I choose the wrong device, like PMS5005, I get the error I had before.

franki29 commented 3 years ago

Debug shows : : Debug : PMSx003 : count/0.1L : 0.3um=662, 0.5um=2, 1.0um=38656, 2.5um=552, 5.0um=65535, 10um=65535␍␊ [16:00:16:149] 358733 : Debug : PMSx003 : pm1.0=11, pm2.5=15, pm10=16, pm1.0a=11, pm2.5a=15, pm10a=16␍␊

But web view shows 0 for all values

tonhuisman commented 3 years ago

Oh, OK, I'll have a look at the code, later today, maybe I've done something wrong there for this sensor model.

tonhuisman commented 3 years ago

Do you also have a line from the log that shows the pm values? It should be just above the line with these count values, and these pm values are the ones put into the Values fields.

Edit: Found the issue, the frame of data read from the sensor wasn't sized right, so the checksum didn't match.

tonhuisman commented 3 years ago

Fixed the issue mentioned above, for as far as I can see, without the actual hardware available 😊

New download: ESPEasy_normal_ESP8266_1M.zip

franki29 commented 3 years ago

Hi, now it is working, thank you very much for fixing the issue Br.Frank