Skip to content

Commit

Permalink
Teltonika FMT100 vehicle tracker (#570)
Browse files Browse the repository at this point in the history
Teltonika FMT100 vehicle tracker device tracker decoder
  • Loading branch information
DigiH authored Nov 3, 2024
1 parent 7c12396 commit 434650d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/devices/devices_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h4>
</header>
<div class="container">
<p>Discover the extensive catalog of Bluetooth devices compatible with Theengs ecosystem, including our MQTT Gateway, Web Parser,
and OpenMQTTGateway. BLE trackers from <b>Tile</b>, <b>Nut</b>, <b>TagIt</b>, <b>iTAG</b>, <b>Gigaset G-Tag</b>, <b>TicWatch GTH (Pro)</b> and <b>Bosch Nyon eBike computers</b> will also be recognised and published as device trackers. The table also indicates whether each device has been confirmed to work with our [mobile application](https://app.theengs.io/).</p>
and OpenMQTTGateway. BLE trackers from <b>Tile</b>, <b>Nut</b>, <b>TagIt</b>, <b>iTAG</b>, <b>Gigaset G-Tag</b>, <b>TicWatch GTH (Pro)</b>, <b>Teltonika FMT100 vehicle tracker</b> and <b>Bosch Nyon eBike computers</b> will also be recognised and published as device trackers. The table also indicates whether each device has been confirmed to work with our [mobile application](https://app.theengs.io/).</p>
{table_content_to_replace}
<div class="custom-block warning"><p class="custom-block-title">Note</p> <p>All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by or of them.</p></div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class TheengsDecoder {
TICWATCHGTH,
GTAG,
BOSCHNYON,
FMT100,
JAALEE,
APPLEAIRPODS,
APPLEWATCH,
Expand Down
1 change: 1 addition & 0 deletions src/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const char* _devices[][2] = {
{_tracker_json_TICWATCHGTH, _tracker_json_props},
{_tracker_json_GTAG, _tracker_json_props},
{_tracker_json_NYON, _tracker_json_props},
{_tracker_json_FMT100, _tracker_json_props},
{_JAALEE_json, _JAALEE_json_props},
{_APPLEAIRPODS_json, _APPLEAIRPODS_json_props},
{_APPLEWATCH_json, _APPLEWATCH_json_props},
Expand Down
15 changes: 15 additions & 0 deletions src/devices/tracker_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,21 @@ const char* _tracker_json_NYON = "{\"brand\":\"Bosch\",\"model\":\"Nyon\",\"mode
}
})"""";*/

const char* _tracker_json_FMT100 = "{\"brand\":\"Teltonika\",\"model\":\"FMT100\",\"model_id\":\"FMT100\",\"tag\":\"100a\",\"condition\":[\"name\",\"index\",0,\"FMT100_\"],\"properties\":{\"device\":{\"decoder\":[\"static_value\",\"FMT100 2G vehicle tracker\"]}}}";
/*R""""(
{
"brand":"Teltonika",
"model":"FMT100",
"model_id":"FMT100",
"tag":"100a",
"condition":["name", "index", 0, "FMT100_"],
"properties":{
"device":{
"decoder":["static_value", "FMT100 2G vehicle tracker"]
}
}
})"""";*/

const char* _tracker_json_props = "{\"properties\":{\"device\":{\"unit\":\"string\",\"name\":\"tracker device\"}}}";
/*R""""(
{
Expand Down
3 changes: 3 additions & 0 deletions tests/BLE/test_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ const char* expected_mfg[] = {
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"AUDIO\",\"track\":true,\"prmac\":true,\"version\":\"AirPods Pro 2nd gen.\",\"color\":\"white\",\"status\":\"in ears\",\"batt_r\":80,\"batt_l\":90,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"AUDIO\",\"track\":true,\"prmac\":true,\"version\":\"AirPods Pro 2nd gen.\",\"color\":\"white\",\"status\":\"in ears\",\"batt_r\":100,\"batt_l\":100,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"AUDIO\",\"track\":true,\"prmac\":true,\"version\":\"AirPods Pro 2nd gen.\",\"color\":\"white\",\"status\":\"in ears\",\"batt_r\":90,\"batt_l\":100,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Teltonika\",\"model\":\"FMT100\",\"model_id\":\"FMT100\",\"type\":\"TRACK\",\"acts\":true,\"track\":true,\"device\":\"FMT100 2G vehicle tracker\"}",
};

const char* expected_name_uuid_mfgsvcdata[] = {
Expand Down Expand Up @@ -692,6 +693,7 @@ const char* test_mfgdata[][3] = {
{"Apple", "AirPods", "4c00071901142003898f100008cc74d502b12d6d72e0f4f6eabf826972"},
{"Apple", "AirPods", "4c00071901142023aa8f1100085925754da1d6ab3f80c398447e652875"},
{"Apple", "AirPods", "4c0007190114200b9a8f110004fa242ea8abb9e8f5e57cefb13a3077eb"},
{"Teltonika", "FMT100_3498163_LE", ""},
};

TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
Expand Down Expand Up @@ -856,6 +858,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::APPLEAIRPODS,
TheengsDecoder::BLE_ID_NUM::APPLEAIRPODS,
TheengsDecoder::BLE_ID_NUM::APPLEAIRPODS,
TheengsDecoder::BLE_ID_NUM::FMT100,
};

// uuid test input [test name] [device name] [uuid] [manufacturer data] [service data]
Expand Down

0 comments on commit 434650d

Please sign in to comment.