npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-sds011-dust-sensor

v1.0.2

Published

Node-RED node to enable a communication with the SDS011 sensor which is connected via UART/serial connection.

Downloads

28

Readme

node-red-contrib-sds011-dust-sensor

This is a Node Red node to manage connection to the SDS011 sensor on a Raspberry Pi. It is based on https://github.com/ikhayainkomishi/node-red-contrib-sds011 and documentation resp. Nodes help text was updated to make it easier to use.

All sensors supported modes like constant measurement mode and measuring in certain intervals.

This node works on all devices with a serial port.

Wiring

Make sure you specify correct serial port. The default is /dev/serial0 which is used on Raspberry Pi. Remember to wire Tx <--> Rx correctly.

Example flow

[{"id":"eb5a9a0ee23343b8","type":"debug","z":"07a60d8631c0f63a","name":"PM2.5","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":280,"wires":[]},{"id":"2979b5dbc9dbfda2","type":"debug","z":"07a60d8631c0f63a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"PM10","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":360,"wires":[]},{"id":"bbbeccc04ceea771","type":"debug","z":"07a60d8631c0f63a","name":"Information","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":400,"wires":[]},{"id":"c59ab9e840a6a50e","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"getDataReportingMode","payloadType":"str","x":180,"y":220,"wires":[["328b4982c64b6fba"]]},{"id":"5913e184c0cffef4","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"setQuery","payloadType":"str","x":140,"y":140,"wires":[["328b4982c64b6fba"]]},{"id":"1569677476a70759","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"getWorkingPeriod","payloadType":"str","x":170,"y":360,"wires":[["328b4982c64b6fba"]]},{"id":"2aec866e49e0287f","type":"inject","z":"07a60d8631c0f63a","name":"setWorkingPeriod","props":[{"p":"payload.command","v":"setWorkingPeriod","vt":"str"},{"p":"topic","vt":"str"},{"p":"payload.parameter","v":"3","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":320,"wires":[["328b4982c64b6fba"]]},{"id":"d8f39586ac506c0b","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"setActive","payloadType":"str","x":140,"y":100,"wires":[["328b4982c64b6fba"]]},{"id":"747b962c971b3926","type":"join","z":"07a60d8631c0f63a","name":"Combine values to one message","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"1","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":780,"y":320,"wires":[["4ce0d2e2ae1bb5d6"]]},{"id":"4ce0d2e2ae1bb5d6","type":"debug","z":"07a60d8631c0f63a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1050,"y":320,"wires":[]},{"id":"bb0ccfe321e895c8","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"checkFirmwareVersion","payloadType":"str","x":180,"y":20,"wires":[["328b4982c64b6fba"]]},{"id":"1a1da8968e1dc9b3","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"setContinuousMode","payloadType":"str","x":170,"y":400,"wires":[["328b4982c64b6fba"]]},{"id":"198f0c88bfe74e85","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"queryData","payloadType":"str","x":140,"y":180,"wires":[["328b4982c64b6fba"]]},{"id":"ee79e0ae524b8506","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"getStatus","payloadType":"str","x":140,"y":480,"wires":[["328b4982c64b6fba"]]},{"id":"fca4bbc1b0ccfc82","type":"inject","z":"07a60d8631c0f63a","name":"setStatus(sleep)","props":[{"p":"payload.command","v":"setStatus","vt":"str"},{"p":"topic","vt":"str"},{"p":"payload.parameter","v":"sleep","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":160,"y":520,"wires":[["328b4982c64b6fba"]]},{"id":"32db5be0c0474c5f","type":"inject","z":"07a60d8631c0f63a","name":"setStatus(work)","props":[{"p":"payload.command","v":"setStatus","vt":"str"},{"p":"topic","vt":"str"},{"p":"payload.parameter","v":"work","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":160,"y":560,"wires":[["328b4982c64b6fba"]]},{"id":"62f16fce3947aeb0","type":"inject","z":"07a60d8631c0f63a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"work","payloadType":"str","x":130,"y":600,"wires":[["328b4982c64b6fba"]]},{"id":"c29d9fa4543f7546","type":"inject","z":"07a60d8631c0f63a","name":"sleep","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"work","payloadType":"str","x":130,"y":640,"wires":[["328b4982c64b6fba"]]},{"id":"328b4982c64b6fba","type":"SDS011","z":"07a60d8631c0f63a","name":"SDS011","port":"/dev/serial0","x":460,"y":360,"wires":[["eb5a9a0ee23343b8","747b962c971b3926"],["2979b5dbc9dbfda2","747b962c971b3926"],["bbbeccc04ceea771"]]}]

License

GPLv3