Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bosch Nyon eBike tracker #557

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> and the <b>TicWatch GTH (Pro)</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> 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 @@ -145,6 +145,7 @@ class TheengsDecoder {
TheengsIB02,
TICWATCHGTH,
GTAG,
BOSCHNYON,
JAALEE,
APPLEWATCH,
APPLEDEVICE,
Expand Down
1 change: 1 addition & 0 deletions src/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ const char* _devices[][2] = {
{_tracker_json_theengs02, _tracker_json_props},
{_tracker_json_TICWATCHGTH, _tracker_json_props},
{_tracker_json_GTAG, _tracker_json_props},
{_tracker_json_NYON, _tracker_json_props},
{_JAALEE_json, _JAALEE_json_props},
{_APPLEWATCH_json, _APPLEWATCH_json_props},
{_APPLEDEVICE_json, _APPLEDEVICE_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 @@ -148,6 +148,21 @@ const char* _tracker_json_GTAG = "{\"brand\":\"Gigaset\",\"model\":\"G-Tag\",\"m
}
})"""";*/

const char* _tracker_json_NYON = "{\"brand\":\"Bosch\",\"model\":\"Nyon\",\"model_id\":\"BOSCHNYON\",\"tag\":\"1008\",\"condition\":[\"manufacturerdata\",\"=\",14,\"index\",0,\"a602\"],\"properties\":{\"device\":{\"decoder\":[\"static_value\",\"Bosch Nyon Tracker\"]}}}";
/*R""""(
{
"brand":"Bosch",
"model":"Nyon",
"model_id":"BOSCHNYON",
"tag":"1008",
"condition":["manufacturerdata", "=", 14, "index", 0, "a602"],
"properties":{
"device":{
"decoder":["static_value", "Bosch Nyon 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 @@ -160,6 +160,7 @@ const char* expected_mfg[] = {
"{\"brand\":\"Otodata\",\"model\":\"Rotarex-compatible Monitor\",\"model_id\":\"RC1010\",\"type\":\"UNIQ\",\"level\":98.35,\"status\":0}",
"{\"brand\":\"Otodata\",\"model\":\"Rotarex-compatible Monitor\",\"model_id\":\"RC1010\",\"type\":\"UNIQ\",\"serial\":56001608,\"modeltype\":67367466}",
"{\"brand\":\"Tile\",\"model\":\"Smart Tracker\",\"model_id\":\"TILE\",\"type\":\"TRACK\",\"cidc\":false,\"acts\":true,\"track\":true,\"device\":\"Tile Tracker\"}",
"{\"brand\":\"Bosch\",\"model\":\"Nyon\",\"model_id\":\"BOSCHNYON\",\"type\":\"TRACK\",\"track\":true,\"device\":\"Bosch Nyon Tracker\"}",
};

const char* expected_name_uuid_mfgsvcdata[] = {
Expand Down Expand Up @@ -590,6 +591,7 @@ const char* test_mfgdata[][3] = {
{"Otodata RC1010", "", "b1034f544f54454c4502006b260000366e0f000000"},
{"Otodata RC1010", "", "b1034f544f3332383148845603132111010400022af20304"},
{"Tile Name", "Tile", ""},
{"Bosch Nyon", "Nyon-XXX", "a60210eb002500"},
};

TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
Expand Down Expand Up @@ -733,6 +735,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::OTOD,
TheengsDecoder::BLE_ID_NUM::OTOD,
TheengsDecoder::BLE_ID_NUM::TILEN,
TheengsDecoder::BLE_ID_NUM::BOSCHNYON,
};

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