mrgadget / node-red-contrib-eztimer

A simple-yet-flexible timer/scheduler for node-red
MIT License
13 stars 6 forks source link

eztimer triggers before MQQT server #33

Closed thalesmaoa closed 3 years ago

thalesmaoa commented 4 years ago

It took me quite some time to figure the problem. I have this outside light that is triggered by eztimer. It's being a month, and two times the light didn't turn on.

image

I've checked nodered, and the flow is correct, the button was on, and the light was off. After some test, I realized that, if I deploy, eztimer trigger faster than mqqt, thus the subscriber doesn't get the message. Since eztimer doesn't keep injecting, the light stays off cause it never receiver the last state.

For some awkward reason, this is happening in my system. I get this strange uptime failure. The fix I found so far was to delay inject message.

Also, using retain true for publisher doesn't have effect.

mrgadget commented 4 years ago

Hi - I think I understand what you're getting at - but I'm not sure it's a problem that'd needs solving with eztimer. It seems to me like it's an issue with the MQTT subsystem?

What are you actually asking for here? Are you wanting an option to delay the initial 'previous state' message on startup/deploy?

thalesmaoa commented 4 years ago

Something like repeat command would be nice.

mrgadget commented 3 years ago

Second request for this feature in #37, monitor progress there.