Plugin warmup / data post question

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ReDdiE
New user
Posts: 1
Joined: 29 Oct 2018, 20:08

Plugin warmup / data post question

#1 Post by ReDdiE » 29 Oct 2018, 20:54

I have rewritten the PMSx003 plugin for usage in passive mode. I did this because i did'nt get stable reading in active mode.
For the reading's i use a Wemos D1 mini board.

I have now a routine that the PLUGIN_READ wil trigger the sensor wake-up. I't needs 30 seconds to stabilize.
So i set an timer var (millies+30s).

I programmed PLUGIN_ONCE_A_SECOND to, which checks the timer timeout. After trigger it's send
a read command and receive en proces data.

I have two challenges (probaly because my knowledge about the framework is minimal):

1. Data is not posted to the controller. I think because PLUGIN_READ never returns true. Can i post it manual or is there an other way to solve this?
2. The use of PLUGIN_READ for warmup and PLUGIN_ONCE_A_SECOND for read works, but it does not feel like the best way. Is there a better design possible?

Greetz,
ReDdiE

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 33 guests