Page 1 of 1

TaskValueSet,TASKnr,VARnr,Value

Posted: 04 Jul 2022, 18:18
by gibus17
HELLO,
I created a virtual device
name: DUREE_filtration
value 1: calculatee
value 2: effectuee

if to update it I use
taskValueSet,9,1,2515
taskValueSet,9,2,3025
It's OK
However, if I use
taskValueSet,DUREE_filtration,calculatee,2515
taskValueSet,DUREE_filtration,effecuee,3025
it does not work

please show me my mistake

Re: TaskValueSet,TASKnr,VARnr,Value

Posted: 04 Jul 2022, 19:22
by Ath
Where did you type those TaskValueSet commands?
And is there anything more around that code? (Please wrap your code using code tags for readability, using the '</>' button in the forum toolbar)
Wat version of ESPEasy is installed on your device? (Most explicit is the name of the .bin file you flashed)

And I assume the typo is 'effecuee' in because you re-typed it, not copy/pasted?

Re: TaskValueSet,TASKnr,VARnr,Value

Posted: 07 Jul 2022, 16:44
by gibus17
excuse english it's a google translation
Hello
I don't remember the .bin file
I realized the flash in January 2012 with this version:
ESP_Easy_mega_20210114_normal_ESP8285_1M
I am looking to change the code made at the time and use the name and value of the virtual device
Here is the code I am trying. I run using in the "TOOLS" tab

Code: Select all

on filtration do
taskValueSet,FILTRATION,calculee,2020
taskValueSet,FILTRATION,effectuee,4500
endon
The virtual device is called "FILTRATION" and it has two values: calculatee "and "effectuee"

The command returns "OK" but does not change the values
Thank you for helping me

Re: TaskValueSet,TASKnr,VARnr,Value

Posted: 07 Jul 2022, 18:09
by TD-er
Can you check on the Tools->Advanced page to make sure this checkbox is checked:
[x] Allow TaskValueSet on all plugins:

And when not sure about the syntax/names of the task and task values, you can always use the task index and taskvalue index (both starting at '1')

Re: TaskValueSet,TASKnr,VARnr,Value

Posted: 08 Jul 2022, 12:05
by gibus17
Hello
My current code uses indices. But they make code less understandable than name and value. It is for this reason that I seek to use them.
In the page "tools ->Advanced" I can't find
"Allow TaskValueSet on all plugins:"

Re: TaskValueSet,TASKnr,VARnr,Value

Posted: 08 Jul 2022, 12:12
by Ath
Then you are on an old(er) version of ESPEasy that doesn't yet have that setting. Please update to the latest version, available from the Github releases page