EmonHub SDS011 PM Sensor Interfacer

While Im at it with the EmonHub Tesla PowerWall interfacer, the other EmonHub interfacer that has crossed my mind to implement recently is one for the SDS011 PM Sensor. This would remove the need to use the docker implementation or install the service we created here


Here is a basic SDS011 reader currently as a development branch for further testing:

Steps to test

On latest emonSD image.

cd /opt/openenergymonitor/emonhub
git pull origin
git checkout SDS011
sudo service emonhub restart

Then in emonhub.conf add the following interfacer configuration:

    Type = EmonHubSDS011Interfacer
        serial_port = /dev/ttyUSB0
        pubchannels = ToEmonCMS,
        nodename = SDS011
        readinterval = 10

A key limitation of this interfacer (and the original docker and service examples) is that it does not put the SDS011 to sleep and therefore may degrade the lifespan of the SDS011 quicker than it could. I need to look at how to enable the sleep mode.