PMS5003 - almost same.
My setup is exactly the same as in the wiki. Gpios pulled with 10k resistors, 47yF buffering 5V
Lifetime-helper rule working. (Replaced longpulse with timer - cause there is an issue.)
Problem:
When the Sensor gets actived by timer, it lasts at least 15sec. to get the values.
And this is not even sure!
In some cases during the 15sec. timer-on, no reading is comming.
(After this15sec power-on, the power is 30sec off. And again from the beginning.)
In other cases, there are 2 readings (á 3 values) direct behind each other.
Or, the Sensor gets off (gpio16 0) and THEN values come.
It is not possible to get realtime-data from the Sensor, nor is it possible switch the Sensor on for a short time, grab the data and off again.
In the wiki (lifetimehelper), the Sensor gets on for 5sec. I have no Chance to get data.
What can I do?
My rules - I found 15sec is the min. power-on for the sensor.:
Code: Select all
on System#Boot do
gpio,16,0
timerSet,1,30 //Mess-Start in 30 sec.
endon
On Rules#Timer=1 do
GPIO,16,1
timerSet,2,15 //Messdauer - Datenübertragung 15 sec.
timerSet,1,45 // Messintervall 30 sec. (45-messdauer)
endon
On Rules#Timer=2 do
GPIO,16,0
// Gpio,0,1 //reset
// timerSet,3,1
endon
//On Rules#Timer=3 do
// Gpio,0,0
// endon
Here's a typical log:
Gpio,16,1 = Sensor on
Timer1= 45sec
Timer2=15sec Sensor (Gpio16) on
Code: Select all
168565313: EVENT: Rules#Timer=1
168565324: ACT : GPIO,16,1
168565326: SW : GPIO 16 Set to 1
168565330: ACT : timerSet,2,15
168565340: ACT : timerSet,1,45
168565355: Command: timerset
168565356: Command: timerset
168581313: EVENT: Rules#Timer=2
168581328: ACT : GPIO,16,0
168581330: SW : GPIO 16 Set to 0
168582868: WD : Uptime 2810 ConnectFailures 0 FreeMem 14288
168611313: EVENT: Rules#Timer=1
168611324: ACT : GPIO,16,1
168611326: SW : GPIO 16 Set to 1
168611330: ACT : timerSet,2,15
168611339: ACT : timerSet,1,45
168611355: Command: timerset
168611355: Command: timerset
168612868: WD : Uptime 2810 ConnectFailures 0 FreeMem 14288
168613314: EVENT: Clock#Time=Tue,18:04
168619983: EVENT: Partikelsensor#pm1.0=4.00
168620002: EVENT: Partikelsensor#pm2.5=6.00
168620036: EVENT: Partikelsensor#pm10=6.00
168627324: EVENT: Rules#Timer=2
168627343: ACT : GPIO,16,0
168627345: SW : GPIO 16 Set to 0
As you can see, on the first gpio16,1 nothing happens. the second gpio16,1 it takes a long time to get values.
Btw & off-topic: running with static IP, no wifi drops. Maybe this helps on other place.