Computed Attributes not Shown in Devices State

alkisfab6 years ago

Greetings,
I would like assistance for the below matter,
While I have added them successfully in the Computed Attributes list, are still not available in the device status,
Even if they are also with status check-mark for all devices.

Link

The whole concept ideally is to replace each <io> attribute with words in order to be more understandable,
Thank you very much in advance!

Anton Tananaev6 years ago

If the value is null, attribute won't be added. Test with non null values.

alkisfab6 years ago

Dear Anton,
Actually we had to refresh the devices and the server, now it works!
Thank you for your support

alkisfab6 years ago

Dear Anton,
Still there are some computed attributes that are not shown in the state list,
I have replaced the null and that fixed some but not all,
Take the below example:

io84? (io84 - io83) / 10.0 : io84
type : string

When I test it, produces the right value but it's not in the state.
Thank you once again

Anton Tananaev6 years ago

Have you linked it to your device? Have you waited for new data from your device?

Also, your attribute can still return null value.

alkisfab6 years ago

Yes I did, some work some not,
Then, how different you would make this expression in order to refrain it from returning a null value?

Anton Tananaev6 years ago

Just return some value directly. I'm also not sure why you are trying to return number as a string.

Claudio Grasso6 years ago

Hi alkisfab, I'm having the very same issue. What do you mean by "we had to refresh the devices and the server"? Did you delete the devices, restart the server and create the devices again? Thanks in advance

alkisfab6 years ago

Hi Claudio, As far as i know we did only a restart on the traccar service and all computed attributes were then available, but I do not know more details to the matter.
Hope that helps

Claudio Grasso6 years ago

Thanks, alkisfaba. :-)