Trying to set up Particulate matter Sensor, keep getting errors

Trying to set this up: https://home-assistant.io/components/sensor.serial_pm/

My config: sensor:

  • platform: serial_pm

    serial_device: /dev/ttyUSB0

    name: Air Quality

    brand: plantower,pms5003

When hass.io starts up I get this error: read timeout after 2 seconds, read 0 bytes

But when I then unplug and plug it back in the RX light on the USB to serial adapter starts flashing and I get this error:

Update for sensor.pm25 fails Traceback (most recent call last): File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 204, in asyncupdate_ha_state yield from self.async_device_update() File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 327, in async_device_update yield from self.hass.async_add_job(self.update) File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in _iter yield self # This tells Task to wait for completion. File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup future.result() File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result raise self._exception File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run result = self.fn(self.args, *self.kwargs) File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/serial_pm.py”, line 89, in update self._state = self._collector.read_data()[self._pmname] File “/usr/lib/python3.6/site-packages/pmsensor/serial_pm.py”, line 173, in read_data if self.ser.inWaiting() > 0: File “/usr/lib/python3.6/site-packages/serial/serialutil.py”, line 518, in inWaiting return self.in_waiting File “/usr/lib/python3.6/site-packages/serial/serialposix.py”, line 433, in in_waiting s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str) OSError: [Errno 5] I/O error

Any ideas? Thanks!

On the off-chance, if you type:

dmesg | grep tty

what tty value are you getting for the usb uart entry?

Mine looks like this:

[ 2915.393725] usb 1-1.4: ch341-uart converter now attached to ttyUSB0

I’m using one of the Nova sensors though, maybe the plantower sensor connects differently?

I’m using Hassio too, so I can confirm that this sensor component does work.