Why can't I set the interval for at dummy to 0?

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
mrwee
Normal user
Posts: 162
Joined: 31 Aug 2016, 12:52

Why can't I set the interval for at dummy to 0?

#1 Post by mrwee » 11 May 2020, 21:13

I can see that the minimal interval is 1 sec. But how can I just publish the value when it's updated? I don't wan't it a fixed interval. Is this by design?

User avatar
grovkillen
Core team member
Posts: 3584
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Why can't I set the interval for at dummy to 0?

#2 Post by grovkillen » 11 May 2020, 21:32

If you want it to be updated by event you need to use rules.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

mrwee
Normal user
Posts: 162
Joined: 31 Aug 2016, 12:52

Re: Why can't I set the interval for at dummy to 0?

#3 Post by mrwee » 11 May 2020, 23:05

Hmm. I'm setting the dummy variable in a rule, but I need to publish it's value only when changed to ThingSpeak on Controller 2. Already have MQTT on Controller 1. Can't seem to find an example of that :?

User avatar
grovkillen
Core team member
Posts: 3584
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Why can't I set the interval for at dummy to 0?

#4 Post by grovkillen » 12 May 2020, 04:09

You would use "TaskValueSetAndRun" and it will update and publish that task.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

mrwee
Normal user
Posts: 162
Joined: 31 Aug 2016, 12:52

Re: Why can't I set the interval for at dummy to 0?

#5 Post by mrwee » 12 May 2020, 12:45

Ok. thanks. But I assume that since I cannot set the interval to 0 in the GUI, it will still publish by iself, or ?

mrwee
Normal user
Posts: 162
Joined: 31 Aug 2016, 12:52

Re: Why can't I set the interval for at dummy to 0?

#6 Post by mrwee » 12 May 2020, 12:51

mrwee wrote:
12 May 2020, 12:45
Ok. thanks. But I assume that since I cannot set the interval to 0 in the GUI, it will still publish by iself, or ?
Just answering myself: Not if I disable the Publish to controller :D

mrwee
Normal user
Posts: 162
Joined: 31 Aug 2016, 12:52

Re: Why can't I set the interval for at dummy to 0?

#7 Post by mrwee » 12 May 2020, 21:04

Can seem to get either TaskValueSet + taskRun or TaskValueSetAndRun to work with two controllers.

My setup:
ESP_Easy: ESP_Easy_mega-20200426_normal_ESP8266_4M1M.bin on an original D1 mini Pro 2.0

Controllers:
2020-05-12_20-53-03.png
2020-05-12_20-53-03.png (24.92 KiB) Viewed 583 times
Tasks
2020-05-12_20-49-04.png
2020-05-12_20-49-04.png (28.41 KiB) Viewed 583 times
Test rule

Code: Select all

On mqtt3#Value1 do
 TaskValueSetAndRun,5,1,[mqtt3#Value1]
endon
If "Send to Controller 1" and "Send to Controller 2" are disabled, then only Controller 1 gets data by using either TaskValueSetAndRun or TaskValueSet+TaskRun, nothing is sent to Controller 2 (ThingSpeak).
Re-enabling "Send to Controller 1/2" resumes sending data at the >=1 sec interval, but I'd like to only publish the data when MQTT import picks something up.

TD-er
Core team member
Posts: 2636
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Why can't I set the interval for at dummy to 0?

#8 Post by TD-er » 13 May 2020, 08:52

mrwee wrote:
12 May 2020, 21:04
Can seem to get either TaskValueSet + taskRun or TaskValueSetAndRun to work with two controllers.

[...]
If "Send to Controller 1" and "Send to Controller 2" are disabled, then only Controller 1 gets data by using either TaskValueSetAndRun or TaskValueSet+TaskRun, nothing is sent to Controller 2 (ThingSpeak).
Re-enabling "Send to Controller 1/2" resumes sending data at the >=1 sec interval, but I'd like to only publish the data when MQTT import picks something up.
Hmm, that sounds like a bug.
If you 'run' a task, it should call the connected controller(s)

Only way you may not see it, is when the controller has a queue of 1 and another task is also sending data to it. (given the interval is similar or lower than the sending interval)

mrwee
Normal user
Posts: 162
Joined: 31 Aug 2016, 12:52

Re: Why can't I set the interval for at dummy to 0?

#9 Post by mrwee » 13 May 2020, 12:27

That possible. But even when sending one value every 30 minutes to both controller, it fails so it does not seem to be related to the queue filling up. So I agree that it sounds like a bug. I'll log it on github.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests