Hi
I followed this guide to set up the below config but there is no reading output from the sensor. Please help!
This article will provide a walkthrough of how you can build a Particulate Matter Air Quality meter that integrates with your Home Assistant for under 20$, without any soldering or coding skills needed. The sensor will provide multiple air-quality...
Est. reading time: 12 minutes
esphome:
name: bed-sensor
esp8266:
board: esp01_1m
logger:
api:
encryption:
key: "XXX"
ota:
password: "XXX"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "Bed-Sensor Fallback Hotspot"
password: "XXX"
uart:
rx_pin: GPIO12
tx_pin: GPIO13
baud_rate: 9600
sensor:
- platform: pmsx003
type: PMSX003
pm_1_0:
name: "Particulate Matter <1.0Āµm Concentration"
pm_2_5:
name: "Particulate Matter <2.5Āµm Concentration"
pm_10_0:
name: "Particulate Matter <10.0Āµm Concentration"
update_interval: 30s
LOGS:
INFO ESPHome 2023.12.3
INFO Reading configuration /config/esphome/bed-sensor.yamlā¦
INFO Starting log output from 192.168.1.117 using esphome API
INFO Successfully connected to bed-sensor @ 192.168.1.117 in 0.004s
INFO Successful handshake with bed-sensor @ 192.168.1.117 in 2.710s
[23:37:00][I][app:102]: ESPHome version 2023.12.3 compiled on Dec 22 2023, 23:33:33
[23:37:00][C][wifi:573]: WiFi:
[23:37:00][C][wifi:405]: Local MAC: 34:94:54:61:BE:26
[23:37:00][C][wifi:410]: SSID: ācipkaā[redacted]
[23:37:00][C][wifi:411]: IP Address: 192.168.1.117
[23:37:00][C][wifi:412]: BSSID: 34:97:F6:02:92:30[redacted]
[23:37:00][C][wifi:414]: Hostname: ābed-sensorā
[23:37:00][C][wifi:416]: Signal strength: -26 dB āāāā
[23:37:00][C][wifi:420]: Channel: 9
[23:37:00][C][wifi:421]: Subnet: 255.255.255.0
[23:37:00][C][wifi:422]: Gateway: 192.168.1.1
[23:37:00][C][wifi:423]: DNS1: 192.168.1.2
[23:37:00][C][wifi:424]: DNS2: 192.168.1.1
[23:37:00][C][logger:443]: Logger:
[23:37:00][C][logger:444]: Level: DEBUG
[23:37:00][C][logger:445]: Log Baud Rate: 115200
[23:37:00][C][logger:447]: Hardware UART: UART0
[23:37:01][C][uart.arduino_esp8266:102]: UART Bus:
[23:37:01][C][uart.arduino_esp8266:103]: TX Pin: GPIO13
[23:37:01][C][uart.arduino_esp8266:104]: RX Pin: GPIO12
[23:37:01][C][uart.arduino_esp8266:106]: RX Buffer Size: 256
[23:37:01][C][uart.arduino_esp8266:108]: Baud Rate: 9600 baud
[23:37:01][C][uart.arduino_esp8266:109]: Data Bits: 8
[23:37:01][C][uart.arduino_esp8266:110]: Parity: NONE
[23:37:01][C][uart.arduino_esp8266:111]: Stop bits: 1
[23:37:01][C][uart.arduino_esp8266:115]: Using software serial
[23:37:01][C][pmsx003:334]: PMSX003:
[23:37:01][C][pmsx003:339]: PM1.0 āParticulate Matter <1.0Āµm Concentrationā
[23:37:01][C][pmsx003:339]: State Class: āmeasurementā
[23:37:01][C][pmsx003:339]: Unit of Measurement: āĀµg/mĀ³ā
[23:37:01][C][pmsx003:339]: Accuracy Decimals: 0
[23:37:01][C][pmsx003:339]: Icon: āmdi:chemical-weaponā
[23:37:01][C][pmsx003:340]: PM2.5 āParticulate Matter <2.5Āµm Concentrationā
[23:37:01][C][pmsx003:340]: State Class: āmeasurementā
[23:37:01][C][pmsx003:340]: Unit of Measurement: āĀµg/mĀ³ā
[23:37:01][C][pmsx003:340]: Accuracy Decimals: 0
[23:37:01][C][pmsx003:340]: Icon: āmdi:chemical-weaponā
[23:37:01][C][pmsx003:341]: PM10.0 āParticulate Matter <10.0Āµm Concentrationā
[23:37:01][C][pmsx003:341]: State Class: āmeasurementā
[23:37:01][C][pmsx003:341]: Unit of Measurement: āĀµg/mĀ³ā
[23:37:01][C][pmsx003:341]: Accuracy Decimals: 0
[23:37:01][C][pmsx003:341]: Icon: āmdi:chemical-weaponā
[23:37:01][C][captive_portal:088]: Captive Portal:
[23:37:01][C][mdns:115]: mDNS:
[23:37:01][C][mdns:116]: Hostname: bed-sensor
[23:37:01][C][ota:097]: Over-The-Air Updates:
[23:37:01][C][ota:098]: Address: bed-sensor.local:8266
[23:37:01][C][ota:101]: Using Password.
[23:37:01][C][api:139]: API Server:
[23:37:01][C][api:140]: Address: bed-sensor.local:6053
[23:37:01][C][api:142]: Using noise encryption: YES
zoogara
(Daryl)
December 23, 2023, 12:14am
2
Hi and welcome. can you edit your post so that the yaml is enclosed in formatted text tags?
See item 11 of this post:
Before we beginā¦
This forum is not a helpdesk
The people here donāt work for Home Assistant, thatās an open source project. We are volunteering our free time to help others. Not all topics may get an answer, never mind one that helps you solve your problem.
[image]
This also isnāt a general home automation forum, this is a forum for Home Assistant and things related to it. Any question about Home Assistant, and about using things with Home Assistant, is welcome here. We canāt help you with eā¦
zoogara
(Daryl)
December 23, 2023, 12:19am
3
The first thing to check is that you have rx and tx. the right way around on the UART. Also that you have good supply of both 5V and 3.3V to the sensor.
1 Like
You mean that I connected the wires to the right pins for RX and TX? Yes, I did. Any other suggestions please?
YAML is formatted now
Is there a fan that you can see spinning?
Are you using a PMS5003 too?
Iām not sure if you did the same āsolderless connectionsā as per the project, but that seems like a bad idea to me and could be a possible point of failure too.
1 Like
The fan is not spinning. Yes, Iām using the PMS5003. It is solderless for now - will solder it and let you know.
Thanks
1 Like
OK - fan is spinning now after I solder +5V and ground. Will solder other connections now - just checking which GPIO pins to use.
1 Like
Solved! Seems the connections were loose so I just needed to solder them. I now have soldered five connections:
+5V,
G,
D7/GPIO13,
D6/GPIO12, &
D5/GPIO14
Here is the YAML:
uart:
rx_pin: GPIO13
tx_pin: GPIO12
baud_rate: 9600
sensor:
- platform: pmsx003
type: PMSX003
pm_1_0:
name: "Particulate Matter <1.0Āµm Concentration"
pm_2_5:
name: "Particulate Matter <2.5Āµm Concentration"
pm_10_0:
name: "Particulate Matter <10.0Āµm Concentration"
update_interval: 120s
[14:57:44][D][pmsx003:234]: Got PM1.0 Concentration: 0 Āµg/m^3, PM2.5 Concentration 1 Āµg/m^3, PM10.0 Concentration: 1 Āµg/m^3
[14:57:44][D][sensor:093]: āParticulate Matter <1.0Āµm Concentrationā: Sending state 0.00000 Āµg/mĀ³ with 0 decimals of accuracy
[14:57:44][D][sensor:093]: āParticulate Matter <2.5Āµm Concentrationā: Sending state 1.00000 Āµg/mĀ³ with 0 decimals of accuracy
[14:57:44][D][sensor:093]: āParticulate Matter <10.0Āµm Concentrationā: Sending state 1.00000 Āµg/mĀ³ with 0 decimals of accuracy
[14:59:44][D][pmsx003:234]: Got PM1.0 Concentration: 3 Āµg/m^3, PM2.5 Concentration 4 Āµg/m^3, PM10.0 Concentration: 5 Āµg/m^3
[14:59:44][D][sensor:093]: āParticulate Matter <1.0Āµm Concentrationā: Sending state 3.00000 Āµg/mĀ³ with 0 decimals of accuracy
[14:59:44][D][sensor:093]: āParticulate Matter <2.5Āµm Concentrationā: Sending state 4.00000 Āµg/mĀ³ with 0 decimals of accuracy
[14:59:44][D][sensor:093]: āParticulate Matter <10.0Āµm Concentrationā: Sending state 5.00000 Āµg/mĀ³ with 0 decimals of accuracy
[15:00:44][I][ota:117]: Boot seems successful, resetting boot loop counter.
PM readings are now showing as zero although they were non-zero to start. They should be reading 7 & 4 based on the below data for my area. If anyone has experience with this device, please let me know if I am doing something wrong
Been a while since I set mine up, but I believe thereās a pin on the sensor that needs to be pulled high for it to operate? I know I setup a switch in my YAML so I could manually turn it on/off but the other option is just to permanently wire it so. Iām guessing you have it floating and it happened to be high at the beginning but has since floated low?