bencorrado / pmsensor Goto Github PK
View Code? Open in Web Editor NEWLibrary to read data from particulate matter sensors
License: MIT License
Library to read data from particulate matter sensors
License: MIT License
When an error occurs raising an exception is more appropriate than returning None.
Hi,
What is the unit for sensor output.
Date_Time | PM1 | PM2.5 | PM10
2019/02/13 12:52:09 | 386 | 1142 | 1267
I am mgetting this kind of output.
Thankyou.
This is a feature request, but since particulate matter sensors have a limited lifespan, it would be nice if this library provided the option to put the sensor into and bring it out of sleep mode.
e.g. the SDS011 sensor has a laser diode service life of up to 8,000 hours:
https://nettigo.pl/attachments/398
I am looking for the owner of this repo or the pmsensor at PiPy listed as openha. I would like to help take over this project and update it for additional pm sensors. There are two waiting PRs (#13 #15) and there has been no activity for years. I would be happy to help take over, if you are the owner please contact me.
@usul27 you appear to be involved in all the @open-homeautomation repos, is this your account and/or could you help here? Or anyone at @hifiberry that happens to know Daniel as his GitHub account does not seem very active.
Hi,
running on VirtualBox Ubuntu 16.04 LTS 32 bit VM (Windows 10 host) I share a USB-Serial converter into the virtual machine.
The device itself appears like this:
$ sudo lsusb
Bus 001 Device 017: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
And is apparently present at:
/dev/ttyUSB0
I get the following error in python when I run the co2_demo.py (where I point it to ttyUSB0 instead of the example device from the original file):
Traceback (most recent call last):
File "co2_demo.py", line 10, in
ppm = co2sensor.read_mh_z19("/dev/ttyUSB0")
File "/srv/co2/pmsensor/pmsensor/co2sensor.py", line 16, in read_mh_z19
result = read_mh_z19_with_temperature(serial_device)
File "/srv/co2/pmsensor/pmsensor/co2sensor.py", line 47, in read_mh_z19_with_temperature
if ser.inWaiting() > 0:
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 538, in inWaiting
return self.in_waiting
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 464, in in_waiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 5] Input/output error
The kernel log does not contain any errors, but the syslog has the following relevant events:
usb 1-2: new full-speed USB device number 17 using ohci-pci
usb 1-2: New USB device found, idVendor=1a86, idProduct=7523
usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 1-2: Product: USB2.0-Serial
ch341 1-2:1.0: ch341-uart converter detected
usb 1-2: ch341-uart converter now attached to ttyUSB0
usb 1-2: USB disconnect, device number 17
usb 1-2: ch341_read_int_callback - usb_submit_urb failed: -19
ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
ch341 1-2:1.0: device disconnected
Is this a config issue, a software issue, missing package issue or a driver issue?
Any ideas about what is wrong?
Best regards,
Remi
Hi.
MH-Z19B and MH-Z1C CO2 sensor has, for example, option to turn on/off auto calibration.
Would be great to add it to pmsensor/co2sensor.py.
mh-z19b-co2-ver1_0.pdf
mh-z19c-pins-type-co2-manual-ver1_0.pdf
Hi. i am new to home assistant. i have been trying using pms5003 in my setup. However, home assistant unable to fetch data from sensor.
it is like:
2017-05-20 13:56:36 ERROR (Thread-9) [homeassistant.components.sensor.serial_pm] Could not read PM10 value
2017-05-20 13:56:38 ERROR (Thread-4) [pmsensor.serial_pm] read timeout after 2 seconds, read 0 bytes
2017-05-20 13:56:38 ERROR (Thread-4) [homeassistant.components.sensor.serial_pm] Could not read PM1 value
2017-05-20 13:56:40 ERROR (Thread-1) [pmsensor.serial_pm] read timeout after 2 seconds, read 0 bytes
Is there anything wrong with the code? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.