What protocol are you using? The value is reported by your device. Possibly it's decoded incorrectly, but need HEX sample and documentation to check.
I am using the Ulbotech protocol. Here is a screenshot from the protocol description:
Also attached is an HEX example:
Please provide sample from your device, expected value and fuel type.
Ok, here is an example from a live car:
2017-10-10 12:21:31 DEBUG: [4B427A3C: 5072 < 185.74.208.107] HEX: f801010868323026528734a16f69ba010e03b4df71ff98359100530137006a0304024200000404016b259f0506035118fa221706080000000000000000070e310582410c177a310d534131bc540804812e41000f040015f661100101d1bcf8
2017-10-10 12:21:31 DEBUG: [4B427A3C: 5072 > 185.74.208.107] HEX: f801fef80104aef8
2017-10-10 12:21:31 INFO: [4B427A3C] id: 868323026528734, time: 2017-10-10 12:21:30, lat: 62.18533, lon: -6.80203, speed: 44.8, course: 311.0
From the data:
f801010868323026528734a16f69ba010e03b4df71ff98359100530137006a0304024200000404016b259f0506035118fa221706080000000000000000070e310582410c177a310d534131bc540804812e41000f040015f661100101d1bcf8
This part is the fuelconsumption: 0804812e4100
08: data ID
04: data length
812e4100: in decimal 2167292160
The web interface shows FuelConsumption: 216729.22 l/h
But according to the Ulbotech protocol in the attached picture above this should be:
Real fuel consumption (unit liter) = 2167292160/10000/2.364 = 91679.03 l
Is this a bug? Or maybe this could be fixed using computed attributes?
Yes, it can be fixed with computed attributes.
Ok, I managed to fix it with fuelConsupmtion / 10000 / 2.364
But is it possible to change the unit from l/h to l only?
It means that it's not really consumption. It's total fuel used.
Yes, i know. That is why I would like to change the unit from l/h to l. That is not possible?
There is no standard attribute for that. You can try fuel level, but it's not really the same.
Ok, thanks. Maybe I can figure out using some CSS or jQuery trick
Thanks.
I am trying to understand the attribute fuelConsumption which gives a value of 4313.1336 l/h in my example.
What does this mean or how is this calculated? How can I use this for something uesful?