onlize
February 6, 2024, 1:01pm
446
I cannot get any results for pm1006. Can someone help me? I am using D1 Mini ESP32.
logger:
level: VERY_VERBOSE
uart:
- rx_pin: GPIO23
baud_rate: 9600
id: uart_air
sensor:
- platform: pm1006
uart_id: uart_air
id: aq_sensor
pm_2_5:
name: "Particulate Matter 2.5µm Concentration"
Because I turned on logger, I see the following for this sensor:
[06:45:09][C][uart.arduino_esp32:137]: UART Bus 1:
[06:45:09][C][uart.arduino_esp32:139]: RX Pin: GPIO23
[06:45:09][C][uart.arduino_esp32:141]: RX Buffer Size: 256
[06:45:09][C][uart.arduino_esp32:143]: Baud Rate: 9600 baud
[06:45:09][C][uart.arduino_esp32:144]: Data Bits: 8
[06:45:09][C][uart.arduino_esp32:145]: Parity: NONE
[06:45:09][C][uart.arduino_esp32:146]: Stop bits: 1
[06:45:09][C][pm1006:017]: PM1006:
[06:45:09][C][pm1006:018]: PM2.5 'Particulate Matter 2.5µm Concentration'
[06:45:09][C][pm1006:018]: Device Class: 'pm25'
[06:45:09][C][pm1006:018]: State Class: 'measurement'
[06:45:09][C][pm1006:018]: Unit of Measurement: 'µg/m³'
[06:45:09][C][pm1006:018]: Accuracy Decimals: 0
[06:45:09][C][pm1006:018]: Icon: 'mdi:blur'
[06:45:09][C][pm1006:019]: Update Interval: never
[06:45:09][C][mdns:115]: mDNS:
[06:45:09][C][mdns:116]: Hostname: ikea-aq-fm-sensor
[06:45:09][V][mdns:117]: Services:
[06:45:09][V][mdns:119]: - _esphomelib, _tcp, 6053
[06:45:09][V][mdns:121]: TXT: friendly_name = IKEA AQ FM Sensor
[06:45:09][V][mdns:121]: TXT: version = 2023.12.9
[06:45:09][V][mdns:121]: TXT: mac = a0a3b3910810
[06:45:09][V][mdns:121]: TXT: platform = ESP32
[06:45:09][V][mdns:121]: TXT: board = esp32dev
[06:45:09][V][mdns:121]: TXT: network = wifi
[06:45:09][C][ota:097]: Over-The-Air Updates:
[06:45:09][C][ota:098]: Address: ikea-aq-fm-sensor.local:3232
[06:45:09][C][api:139]: API Server:
[06:45:09][C][api:140]: Address: ikea-aq-fm-sensor.local:6053
[06:45:09][C][api:144]: Using noise encryption: NO
[06:45:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294947518 (now=40222)
[06:45:26][VV][api.service:558]: on_ping_request: PingRequest {}
[06:45:26][VV][api.service:043]: send_ping_response: PingResponse {}
[06:45:49][VV][api.service:558]: on_ping_request: PingRequest {}
[06:45:49][VV][api.service:043]: send_ping_response: PingResponse {}
[06:46:07][VV][api.service:558]: on_ping_request: PingRequest {}
[06:46:07][VV][api.service:043]: send_ping_response: PingResponse {}
[06:46:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=40222 (now=100226)
[06:46:46][VV][api.service:558]: on_ping_request: PingRequest {}
[06:46:46][VV][api.service:043]: send_ping_response: PingResponse {}
[06:46:49][VV][api.connection:132]: Sending keepalive PING...
[06:46:49][VV][api.service:037]: send_ping_request: PingRequest {}
[06:46:49][VV][api.service:567]: on_ping_response: PingResponse {}
[06:47:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=100222 (now=160222)
[06:47:26][VV][api.service:558]: on_ping_request: PingRequest {}
[06:47:26][VV][api.service:043]: send_ping_response: PingResponse {}
[06:47:49][VV][api.connection:132]: Sending keepalive PING...
[06:47:49][VV][api.service:037]: send_ping_request: PingRequest {}
[06:47:49][VV][api.service:558]: on_ping_request: PingRequest {}
[06:47:49][VV][api.service:043]: send_ping_response: PingResponse {}
[06:47:49][VV][api.service:567]: on_ping_response: PingResponse {}
[06:48:06][VV][api.service:558]: on_ping_request: PingRequest {}
[06:48:06][VV][api.service:043]: send_ping_response: PingResponse {}
[06:48:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=160222 (now=220222)
[06:48:47][VV][api.service:558]: on_ping_request: PingRequest {}
[06:48:47][VV][api.service:043]: send_ping_response: PingResponse {}
[06:48:49][VV][api.connection:132]: Sending keepalive PING...
[06:48:49][VV][api.service:037]: send_ping_request: PingRequest {}
[06:48:49][VV][api.service:567]: on_ping_response: PingResponse {}
[06:49:14][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=220222 (now=280222)
[06:49:26][VV][api.service:558]: on_ping_request: PingRequest {}
[06:49:26][VV][api.service:043]: send_ping_response: PingResponse {}
GSzabados
(Gábor Szabados)
February 6, 2024, 1:25pm
447
And how did you connect the PM1006?
onlize
February 6, 2024, 4:24pm
448
Red → 5V
Black → Ground
Blue → GPIO23
All people here talking about PM 2.5 ug/m3. What about PM1.0 and PM10? Clearly PM1006K sensor supports PM1.0 and PM10 also.
edit: okay I get it, PM1006 vs PM1006K. Which one the IKEA has?
edit2: found the answer, PM1.0 & PM10 are “random numbers”.
opened 05:16PM - 30 Aug 21 UTC
closed 09:05AM - 01 Sep 21 UTC
bug
fixed
### PROBLEM DESCRIPTION
I compiled Tasmota from the development branch to use m… y VINDRIKTNING sensor (03b26adf07b6ee5f42a9511eaae6fece3948cb0d) but it seems that the values are read the wrong way.
I used a Saleae clone (8CH, 24MHz) logic analyzer and I got:
16 11 0B 00 00 00 18 00 00 02 E8 00 00 00 17 01 00 00 00 B4
That should result in a PM2.5 value of 24µg/m³.
But Tasmota reports 1174µg/m³ for PM1.0 and 0µg/m³ for PM2.5 and PM10!
### REQUESTED INFORMATION
_Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!_
- [X] Read the [Contributing Guide and Policy](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md) and [the Code of Conduct](https://github.com/arendst/Tasmota/blob/development/CODE_OF_CONDUCT.md)
- [X] Searched the problem in [issues](https://github.com/arendst/Tasmota/issues)
- [X] Searched the problem in [discussions](https://github.com/arendst/Tasmota/discussions)
- [X] Searched the problem in the [docs](https://tasmota.github.io/docs/FAQ)
- [X] Searched the problem in the [chat](https://discord.gg/Ks2Kzd4)
- [X] Device used (e.g., Sonoff Basic): Ikea VINDRIKTNING
- [X] Tasmota binary firmware version number used: 9.5.0.7
- [ ] Pre-compiled
- [X] Self-compiled
- [X] Flashing tools used: Platform.IO + VS Code 2019
- [ ] Provide the output of command: `Backlog Template; Module; GPIO 255`:
```lua
Configuration output here:
```
- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
Rules output here:
```
- [ ] Provide the output of this command: `Status 0`:
```lua
STATUS 0 output here:
```
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
Console output here:
```
### TO REPRODUCE
Compile Tasmota from origin/development branch (28. August, 03b26adf07b6ee5f42a9511eaae6fece3948cb0d) and flash it to an Wemos D1 device. Connect the Wemos D1 to the VINDRIKTNING and watch the read out values.
### EXPECTED BEHAVIOUR
Tasmote should show 24µg/m³ for PM2.5 and not 1174µg/m³ for PM1.0 and 0 for PM2.5 and PM10
### SCREENSHOTS
Captured UART values:
![240656490_10227074520905858_2363099937481866921_n](https://user-images.githubusercontent.com/14032966/131378269-5ec32b85-07ce-4ea6-a4ce-1cab6b690595.jpg)
What Tasmota reports:
![241107852_10227074527546024_8007219987396337305_n](https://user-images.githubusercontent.com/14032966/131378273-34961d9b-cfca-4ddc-97a0-c2340fad4fe1.jpg)
### ADDITIONAL CONTEXT
...
**(Please, remember to close the issue when the problem has been addressed)**
onlize
February 6, 2024, 5:50pm
452
Thank you for your suggestion, but I do not understand what you want me to do.
I have two IKEA devices and I have two D1 Mini ESP32 boards. I tested the second IKEA device with the second D1 Mini ESP32, and I have exactly the same output.
GSzabados
(Gábor Szabados)
February 6, 2024, 6:13pm
453
onlize:
- rx_pin
There is your mistake, I think. No - required there.
Look at the documentation, no - :
But if not, try to omit the id/uart_id parts.
onlize
February 6, 2024, 6:21pm
454
Thank you for your reply. Almost all examples that we have in this long discussion, show only rx pin. The documentation also says it is optional. It should work with rx pin only.
onlize
February 6, 2024, 7:14pm
455
Thank you for your suggestion. I tried it and it did not help. After I updated firmware, I see the following. Does it give any useful information?
[13:12:12][C][logger:440]: Level: VERY_VERBOSE
[13:12:12][C][logger:441]: Log Baud Rate: 115200
[13:12:12][C][logger:443]: Hardware UART: UART0
[13:12:12][C][uart.arduino_esp32:137]: UART Bus 1:
[13:12:12][C][uart.arduino_esp32:139]: RX Pin: GPIO23
[13:12:12][C][uart.arduino_esp32:141]: RX Buffer Size: 256
[13:12:12][C][uart.arduino_esp32:143]: Baud Rate: 9600 baud
[13:12:12][C][uart.arduino_esp32:144]: Data Bits: 8
[13:12:12][C][uart.arduino_esp32:145]: Parity: NONE
[13:12:12][C][uart.arduino_esp32:146]: Stop bits: 1
[13:12:12][C][pm1006:017]: PM1006:
[13:12:12][C][pm1006:018]: PM2.5 'Particulate Matter 2.5µm Concentration'
[13:12:12][C][pm1006:018]: Device Class: 'pm25'
[13:12:12][C][pm1006:018]: State Class: 'measurement'
[13:12:12][C][pm1006:018]: Unit of Measurement: 'µg/m³'
[13:12:12][C][pm1006:018]: Accuracy Decimals: 0
[13:12:12][C][pm1006:018]: Icon: 'mdi:blur'
[13:12:12][C][pm1006:019]: Update Interval: never
[13:12:12][C][mdns:115]: mDNS:
[13:12:12][C][mdns:116]: Hostname: ikea-aq-lr-sensor
[13:12:12][V][mdns:117]: Services:
[13:12:12][V][mdns:119]: - _esphomelib, _tcp, 6053
[13:12:12][V][mdns:121]: TXT: friendly_name = IKEA AQ LR Sensor
[13:12:12][V][mdns:121]: TXT: version = 2023.12.9
[13:12:12][V][mdns:121]: TXT: mac = 7c87cecb454c
[13:12:12][V][mdns:121]: TXT: platform = ESP32
[13:12:12][V][mdns:121]: TXT: board = esp32dev
[13:12:12][V][mdns:121]: TXT: network = wifi
[13:12:12][C][ota:097]: Over-The-Air Updates:
[13:12:12][C][ota:098]: Address: ikea-aq-lr-sensor.local:3232
[13:12:12][C][api:139]: API Server:
[13:12:12][C][api:140]: Address: ikea-aq-lr-sensor.local:6053
[13:12:12][C][api:144]: Using noise encryption: NO
[13:12:15][D][api:102]: Accepted 192.168.1.12
[13:12:15][VV][api.service:522]: on_hello_request: HelloRequest {
client_info: 'Home Assistant 2024.1.6'
api_version_major: 1
api_version_minor: 9
}
[13:12:15][V][api.connection:1103]: Hello from client: 'Home Assistant 2024.1.6' | 192.168.1.12 | API Version 1.9
[13:12:15][VV][api.service:013]: send_hello_response: HelloResponse {
api_version_major: 1
api_version_minor: 9
server_info: 'ikea-aq-lr-sensor (esphome v2023.12.9)'
name: 'ikea-aq-lr-sensor'
}
[13:12:15][VV][api.service:531]: on_connect_request: ConnectRequest {
password: ''
}
[13:12:15][D][api.connection:1121]: Home Assistant 2024.1.6 (192.168.1.12): Connected successfully
[13:12:15][VV][api.service:019]: send_connect_response: ConnectResponse {
invalid_password: NO
}
[13:12:15][VV][api.service:576]: on_device_info_request: DeviceInfoRequest {}
[13:12:15][VV][api.service:049]: send_device_info_response: DeviceInfoResponse {
uses_password: NO
name: 'ikea-aq-lr-sensor'
mac_address: '7C:87:CE:CB:45:4C'
esphome_version: '2023.12.9'
compilation_time: 'Feb 6 2024, 13:11:31'
model: 'esp32dev'
has_deep_sleep: NO
project_name: ''
project_version: ''
webserver_port: 0
legacy_bluetooth_proxy_version: 0
bluetooth_proxy_feature_flags: 0
manufacturer: 'Espressif'
friendly_name: 'IKEA AQ LR Sensor'
voice_assistant_version: 0
sugges
[13:12:15][VV][api.service:585]: on_list_entities_request: ListEntitiesRequest {}
[13:12:15][VV][api.service:132]: send_list_entities_sensor_response: ListEntitiesSensorResponse {
object_id: 'particulate_matter_2_5_m_concentration'
key: 3776296120
name: 'Particulate Matter 2.5µm Concentration'
unique_id: 'ikea-aq-lr-sensorsensorparticulate_matter_2_5_m_concentration'
icon: 'mdi:blur'
unit_of_measurement: 'µg/m³'
accuracy_decimals: 0
force_update: NO
device_class: 'pm25'
state_class: STATE_CLASS_MEASUREMENT
legacy_last_reset_type: LAST_RESET_NONE
disabled_by_defau
[13:12:15][VV][api.service:055]: send_list_entities_done_response: ListEntitiesDoneResponse {}
[13:12:15][VV][api.service:594]: on_subscribe_states_request: SubscribeStatesRequest {}
[13:12:15][VV][api.service:656]: on_subscribe_homeassistant_services_request: SubscribeHomeassistantServicesRequest {}
[13:12:15][VV][api.service:140]: send_sensor_state_response: SensorStateResponse {
key: 3776296120
state: nan
missing_state: YES
}
[13:12:15][VV][api.service:683]: on_subscribe_home_assistant_states_request: SubscribeHomeAssistantStatesRequest {}
[13:12:44][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294948591 (now=41301)
[13:12:55][VV][api.service:558]: on_ping_request: PingRequest {}
[13:12:55][VV][api.service:043]: send_ping_response: PingResponse {}
[13:13:11][VV][api.connection:132]: Sending keepalive PING...
[13:13:11][VV][api.service:037]: send_ping_request: PingRequest {}
[13:13:11][VV][api.service:567]: on_ping_response: PingResponse {}
[13:13:35][VV][api.service:558]: on_ping_request: PingRequest {}
[13:13:35][VV][api.service:043]: send_ping_response: PingResponse {}
[13:13:44][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=41295 (now=101297)
GSzabados
(Gábor Szabados)
February 6, 2024, 7:56pm
456
Yes, the log should look like this:
[20:51:20][D][pm1006:091]: Got PM2.5 Concentration: 42 µg/m³
[20:51:20][D][sensor:093]: 'XXXXXX Air Quality': Sending state 42.00000 µg/m³ with 0 decimals of accuracy
Do the colors of the LED changing on your device when you spray something to it, or push smoke on it?
There were cases when the sensor was faulty and was not recording any changes.
By the way, is the sensor plugged in to the device??? On your pictures it is not connected at all!
onlize
February 6, 2024, 8:15pm
457
I have two IKEA devices with the same behavior. Do you think both of them broken? Unfortunately, nobody smokes here, so I cannot test it. Is there any other way to test it> The device is plugged in.
GSzabados
(Gábor Szabados)
February 6, 2024, 8:24pm
458
The sensor is not plugged in!
If the sensor is not connected to the board, do not expect any data coming in through the UART RX.
The original board does the pinging to the sensors, hence no need to set up the UART TX. The ESP just piggybacking the data transmitted from the sensor to the IKEA board, which output on that terminal.
onlize
February 6, 2024, 8:58pm
459
Thank you very much. I did not know that the fan had to be plugged in. I spent hours trying to figure out the problem. Everything works now.
Thank you!!!
GSzabados
(Gábor Szabados)
February 6, 2024, 9:00pm
460
No, the fan doesn’t have to be plugged in (2 pin connector), the sensor with that 4 pin connector has to be plugged in!
Mar1us
(Mar1us)
February 7, 2024, 10:29am
461
Really nice project - thank you for sharing.
I want to rebuild this and want to add a CO2 sensor. Is there a way that the LEDs show the CO2 values? Or is this everytime the 2.5PM values? I don´t want to add a additional LEDs in there.
GSzabados
(Gábor Szabados)
February 7, 2024, 10:47am
462
Some people modified the LEDs (cut off some lines on the PCB) to be able to control them. Otherwise the LEDs are controlled by the IKEA board. Look at the whole topic and search for LED for details on the modifications.
1 Like
TomW1605
(Tom)
February 9, 2024, 8:15am
463
i did exactly this but ended up with a slightly different solution to others i have seen. instead of tapping into the existing leds to control them i removed them from the board and stuck a short strip (3 leds) of addressable leds there instead. the spacing worked to be about the same as the old ones and now i have 3 leds that can be all 3 colours so i have one each for 2.5PM, TVOC and eCO2.
1 Like
ploto22
(Paolo)
February 10, 2024, 11:18am
464
Some update about this project
3 Likes
3ATIVE
February 11, 2024, 4:19pm
465
That’s my tutorial - Thank you for sharing it.
1 Like