Page 1 of 1

A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 03 May 2020 12:16
by pgielen
I have built a device that measures air quality using a PDD42NS dust sensor and a Wemos D1 mini. Now I want to read out the data in Domoticz, combine it with data from my wind meter (direction and speed), write that to a seperate datestamped log file and show the combined data in a custom graph.

What would be the most viable way to achieve this? Creating a new device with complex properties? Writing a dzvents script? A python plugin?

BTW at the moment I send the dust sensor data to the Air Quality devicetype, but this is obviuosly meant for a CO2 sensor and can only handle 1 value at a time.

Pierre

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 03 May 2020 12:50
by HvdW
Easy going is Luftdaten
There is a post and a script to integrate it in Domoticz.

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 03 May 2020 13:17
by pgielen
Sending my data to an external site and then running an API in Domoticz to access them does not make sense to me. Especially since I do not only want to monitor the data, but also control one or more fans in my house. Apart from that the SDS011 used in the Luftdaten project only measures PM2,5 dust whereas the PDD42NS measures PM1.

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 03 May 2020 14:00
by Toulon7559
PPD42NS is in their catalogue according to FAQ, but in the Configuration-list not under that name:
you will have to ask or search where it is hidden.

Luftdaten.info is the remote site related to their database-setup and applications IF you are using their setup & configuration.
Then you can read-back the data from that remote site, but
it is also possible to directly read the data by URL-call http://<ip-address>/data.json
After the read-operation as mentioned above, you need a script to dissect the json-file for the required data:
look around in this Forum ........

For home-built software unfortunately you have to develop everything yourself.

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 03 May 2020 14:22
by HvdW
Here is part of the config.

Code: Select all

Sensors
SDS011 (particulate matter)
Honeywell PM (particulate matter)
Sensirion SPS30 (particulate matter)
DHT22 (temperature, humidity)
HTU21D (temperature, humidity)
BMP280/BME280 (temperature, humidity, air pressure)
SHT3X (temperature, humidity)
DS18B20 (temperature)
DNMS (LAeq)
correction in dB(A): 	
0.0

More Sensors
Plantower PMS(1,3,5,6,7)003 (particulate matter)
BMP180 (temperature, air pressure)
GPS (NEO 6M)

APIs
API Sensor.Community  (HTTPS)
API Madavi.de  (HTTPS)
Send to CSV
Send to Feinstaub-App
Send to aircms.online
Send to OpenSenseMap
senseBox ID: 	
..........

Send data to custom API  (HTTPS)
Server: 	
192.168.2.13
Path: 	
data.php
Port: 	
80
User: 	
User
Password: 	
••••••••••••••

Send to InfluxDB  (HTTPS)
Server: 	
influx.server
Path: 	
/write?db=luftdaten
Port: 	
8086
User: 	
User
Password: 	
Password
Measurement: 	
feinstaub
 
You can keep everything local, not sending data outside your own network

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Monday 04 May 2020 15:04
by pgielen
Strange, on https://github.com/opendata-stuttgart I found information for the Luftdaten project, also about using the PDD42NS. I will give it a look.

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 10 May 2020 12:14
by pgielen
Still, I would like to know how I can create a Domoticz device according to my own specifications, preferably without having to recompile the entire source everytime a new update is available.

Re: A device for measuring dust sensor (PDD42NS) and windmeter data

Posted: Sunday 10 May 2020 14:01
by Toulon7559
In what format & protocol did you realise a periodic upload of the PPD42NS-values towards Domoticz?
In first message you tell that AirQuality Virtual Device is not suitable: what is shown as result of above upload?
What if you apply Customer Virtual Device with a suitable scaling?