[SOLVED] Issues with derived variables


#1

Hi,
Is there an issue with derived variables functionality? Using a formula does not work only the value of the inserted (existing) variable comes up.
Thanks!
Marc


#2

Hi Marc,

You’re right; the derived variables are actually working but only computing the historical values.

We identified an issue that prevents the system from computing the last value. Will pass on this information to our dev team and get back to you.

Best,

–Ubidots Team


#3

Hi Marc,

Just to let you know the derived variables are fully functional. If you create a widget from a derived variable, the formula will be calculated and updated in real-time as well.

Best,
–Ubidots Team


#4

Cool!
Thanks !!


#5

Hi,

I’m experiencing the same issue.

I have 1 derived variable being computed from 3 variables.
When I modify only 1 or 2 of the 3 variables using the dashboard, the derived variable doesn’t get updated. I have to select randomly the other data to get it (sometimes) updated.

Thanks for your help!


#6

Hello @nialed,

When you have a derived variable being computed from other 3 variables, the 3 variables have to be updated at the same time, if not the derived variable is not going to be updated. Following this, you are sending the values from the dashboard, but in different intervals of time and thats why you are no getting the values.

Please, follow the curl below to make the request and test how it works:

time curl  -XPOST -H "content-type: application/json" -d '{"variable-one":33.00,"variable-two":10.00, "variable-three": 30.00}' "http://things.ubidots.com/api/v1.6/devices/{VARIABLE_LABEL}?token={YOUR_UBIDOTS_TOKEN}" -vvv

NOTE: Remember assign the right variable labels to the request.

All the best,
Maria C.


#7

Hello Maria,

Thank you for the reply.

Unfortunately, I use these 3 variables to manually set parameters on the dashboard, using triggers. Theses params are then computed in a single value (and used by the device to adapt its behavior).

I can’t update the 3 params at the same time, unless sending a request as you suggest. But that’s not a GUI anymore :slight_smile:

Maybe I’ll find a way by chaining derived variables, each of them based on one of the 3 params i’d like to set. Not an elegant way but should do the trick.

Marc


#8

Well… not so much ^^