display data from calculated attributes to device pop-up window.

Youssefa year ago

Hi, I have a teltonika FMB920 connected to the platform and ain1 connected to the fuel tank wire which sends data to the device in mv, I have made a calculated atribute as follow:

description: Fuel level

attribute: fuel

Expression: if (io9 >= 2500) fuel = 0 else if (io9 >= 2450) fuel = 1.8 else if (io9 >= 2400) fuel = 3.7 else if (io9 >= 2350) fuel = 5.6 else if (io9 >= 2300) fuel = 7.5 else if (io9 >= 2250) fuel = 9.3 else if (io9 >= 2200) fuel = 11.2 else if (io9 >= 2150) fuel = 13.1 else if (io9 >= 2100) fuel = 15 else if (io9 >= 1950) fuel = 16.8 else if (io9 >= 1900) fuel = 18.7 else if (io9 >= 1850) fuel = 20.6 else if (io9 >= 1800) fuel = 22.5 else if (io9 >= 1750) fuel = 24.3 else if (io9 >= 1700) fuel = 26.5 else if (io9 >= 1650) fuel = 28.1 else if (io9 >= 1600) fuel = 30 else if (io9 >= 1550) fuel = 31.8 else if (io9 >= 1500) fuel = 33.7 else if (io9 >= 1450) fuel = 39.3 else if (io9 >= 1400) fuel = 41.2 else if (io9 >= 1350) fuel = 43.1 else if (io9 >= 1300) fuel = 45

where io9 is I/O send by the device in mv and each data in mv correspand to a fuel level in liter. When I test it with the device it displays the correct data.
Now my question is how can I display does given data in the pop-up window?
NB: I had added fuel in pop info under preferences but nothing shown.

Anton Tananaeva year ago

Things to check:

  1. Device is reporting the original value
  2. Computed attribute is linked to device
  3. You received new data after linking
Youssefa year ago

Hi Anton,
Yes the original values are reported and the attributes are linked to it and when I click on TEST the attributes the correct data are displayed. but can not get them displayed in pop-up window even if I have added fuel in information in pop-up under preferences.

Anton Tananaeva year ago

I think you only replied to the first point.

Youssefa year ago

How can I link computed attribute to device?

Anton Tananaeva year ago

Settings > Devices > Connections (link icon) > Computed Attributes

Youssefa year ago

Thank you very much it finally works ok.

Anton Tananaeva year ago

So you haven't linked it before. Can you explain how it could have happened when it's in the documentation and I also explicitly asked you about it?