There must be a way.
Is there no way to automatically decode it when it comes in from the device?
I already said yes. I'm pretty sure it's possible with computed attributes.
Can you provide any help on how to convert a decimal to a hexidecimal string through computed attributes?
I have tried
io195 ? Integer.toHexString(io195) : ""
I have managed to convert it to hexadecimal using the following code
var hex1 = new ("java.lang.Long", io195).toHexString(io195)
hex1
I just ned to convert it to a string now. Do you know how to do that using JEXL?
Thanks
It's already a string from your expression.
4921925560175704000 converted from decimal to hex is 444E3138313037C0
444E3138313037C0 converted from hex to a ascii = DN18107À
Maybe I should have said Ascii instead of converting it to a string?
This makes no sense. Why did you convert it into hex then if you actually need ASCII.
https://wiki.teltonika-gps.com/view/DriverID
Read the link above.
Driver 1 ID is divided trough two IO elements and to read actual Driver 1 ID written on driver card, two conversions need to be proceeded.
If they have it on a wiki page, it doesn't mean it makes sense. It still doesn't.
Can you tell me a better way to get DN18107À from 4921925560175704000?
Probably you have to convert the value into bytes first and then create a string from bytes.
Ok, can you help me do that using a computed attribute?
It would require some research, so probably not on the forum.
Hi,
I have recently added a Teltonika FMC650 to my device list, its connected to the vehicle tachograph.
I am getting io195 and io196 but they aren't being converted to the correct format. Can I use a computed attribute to convert from decimal to hex and then to ascii?
https://wiki.teltonika-gps.com/view/DriverID
Thanks