Teltonika io number for fuel use in liters seems incorrect

Lukasz4 years ago

I did it - it's my first time ;)
I hope it is OK.

Lukasz

Synergy Dave4 years ago

Thank you @Lukasz @Anton for fixing this issue.

Lukasz4 years ago

@Synergy Dave the reviewer noticed:

       case 238:
                switch ((int) readValue(buf, length, false)) {
                    case 1:
                        position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION);
                        break;
                    case 2:
                        position.set(Position.KEY_ALARM, Position.ALARM_BRAKING);
                        break;
                    case 3:
                        position.set(Position.KEY_ALARM, Position.ALARM_CORNERING);
                        break;
                    default:
                        break;
               }

but io238 is User ID (bluetooth), the things mentioned above are io253.
and:

            case 237:
                position.set(Position.KEY_MOTION, readValue(buf, length, false) == 0);
                break;

io237 this a network type, no Movement.
I have a request from you (@Synergy Dave) - help me find if any old devices use io237 for movement and io238 for Ecodriving.

There is still io10 but I found that old devices use io10 for ADC. In new io10 it's SD status.

Lukasz

Synergy Dave4 years ago

Hello,
the device I'm using now is FMB140 and it dosen't report for now the io you requested, may be needs to be reconfigured to report them.
But reading official Teltonika docs, you're right.

io253 Green driving type 1 Unsigned 1 3 - - 1 – harsh acceleration, 2 – harsh braking, 3 – harsh cornering FMB001 ,FMB010 ,FMB100 ,FMB110 ,FMB120 ,FMB122 ,FMB125 ,FMB900 ,FMB920 ,FMB962 ,FMB964 ,FM3001,FM3010,FMB202,FMB204,FMB206,FMB207,FMT100

while
io238 User ID 8 Unsigned 0 0xffffffffffffffff - - MAC address of NMEA receiver device connected via Bluetooth FMB001 ,FMB010 ,FMB100 ,FMB110 ,FMB120 ,FMB122 ,FMB125 ,FMB900 ,FMB920 ,FMB962 ,FMB964 ,FM3001,FM3010,FMB202,FMB204,FMB206,FMB207,FMT100

so case 238 should be case 253

and case 237 should be removed since it reports network type (3G, 2G) and applies only for FM3001/FM3010 like stated below:
io237 Network Type 1 Unsigned 0 1 - - "0 - 3G
1 - 2G" FM3001 ,FM3010

Lukasz4 years ago

Exactly. But we need to check (search the internet) if any old devices are using io238 for Ecodriving and io237 for moving.

Juan Sánchez4 years ago

Hello, @Synergy Dave, how you can see what you receive from the teltonika device? I have a FMT100, but i only see data coded.

Regards,

Synergy Dave4 years ago

Hello,
well I've activated url forward in default.xml to some other endpoint (http server), and then in that endpoint I'm just displaying result in json format.
Don't tracker-server.log already shows data in decoded format?

Juan Sánchez4 years ago

I don't know how to do that, on log i always see it code.

Lukasz4 years ago

Hi Anton

I searched the internet for a long time and did not find Teltonika devices that use io238 for ecodriving and io237 for movement. Should I break pull request to replace io238 to io253 and remove io237? According to:
https://wiki.teltonika-gps.com/view/FMB_AVL_ID

Lukasz

Anton Tananaev4 years ago

OK.

Lukasz4 years ago

I did it.