Skip to content

Commit

Permalink
Gigaset G-Tag added as device tracker (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiH authored Mar 15, 2024
1 parent 0257b25 commit 121e699
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/devices/devices_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ <h4>
</div>
</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 Tile, Nut, TagIt, iTag and the TicWatch GTH (Pro) 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>
<p>Discover the extensive catalog of Bluetooth devices compatible with Theengs ecosystem, including our MQTT Gateway, Web Parser,
and OpenMQTTGateway. BLE trackers from Tile, Nut, TagIt, iTag, Gigaset G-Tag and the TicWatch GTH (Pro) 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 @@ -139,6 +139,7 @@ class TheengsDecoder {
TheengsIB01,
TheengsIB02,
TICWATCHGTH,
GTAG,
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 @@ -207,6 +207,7 @@ const char* _devices[][2] = {
{_tracker_json_theengs01, _tracker_json_props},
{_tracker_json_theengs02, _tracker_json_props},
{_tracker_json_TICWATCHGTH, _tracker_json_props},
{_tracker_json_GTAG, _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 @@ -133,6 +133,21 @@ const char* _tracker_json_TICWATCHGTH = "{\"brand\":\"Mobvoi\",\"model\":\"TicWa
}
})"""";*/

const char* _tracker_json_GTAG = "{\"brand\":\"Gigaset\",\"model\":\"G-Tag\",\"model_id\":\"GTAG\",\"tag\":\"1008\",\"condition\":[\"manufacturerdata\",\"=\",24,\"index\",0,\"800102151234\"],\"properties\":{\"device\":{\"decoder\":[\"static_value\",\"Gigaset G-Tag Tracker\"]}}}";
/*R""""(
{
"brand":"Gigaset",
"model":"G-Tag",
"model_id":"GTAG",
"tag":"1008",
"condition":["manufacturerdata", "=", 24, "index", 0, "800102151234"],
"properties":{
"device":{
"decoder":["static_value", "Gigaset G-Tag 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 @@ -149,6 +149,7 @@ const char* expected_mfg[] = {
"{\"brand\":\"SwitchBot\",\"model\":\"Meter (Plus)\",\"model_id\":\"THX1/W230150X\",\"type\":\"THB\",\"tempc\":22.9,\"tempf\":73.22,\"hum\":47,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
"{\"brand\":\"SwitchBot\",\"model\":\"Meter (Plus)\",\"model_id\":\"THX1/W230150X\",\"type\":\"THB\",\"tempc\":23,\"tempf\":73.4,\"hum\":50,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
"{\"brand\":\"SwitchBot\",\"model\":\"Meter (Plus)\",\"model_id\":\"THX1/W230150X\",\"type\":\"THB\",\"tempc\":22.8,\"tempf\":73.04,\"hum\":91,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
"{\"brand\":\"Gigaset\",\"model\":\"G-Tag\",\"model_id\":\"GTAG\",\"type\":\"TRACK\",\"track\":true,\"device\":\"Gigaset G-Tag Tracker\"}",
};

const char* expected_name_uuid_mfgsvcdata[] = {
Expand Down Expand Up @@ -553,6 +554,7 @@ const char* test_mfgdata[][3] = {
{"SwitchBot Meter ManData", "WoSensorTHP", "6909aabbccddeeff4a0109962f"},
{"SwitchBot Meter ManData", "WoSensorTHP", "6909aabbccddeeff4801009732"},
{"SwitchBot Meter ManData", "WoSensorTHP", "6909aabbccddeeff3e0908965b"},
{"Gigaset G-Tag", "", "80010215123480c390ffbbc5"},
};

TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
Expand Down Expand Up @@ -685,6 +687,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::SBMT_M,
TheengsDecoder::BLE_ID_NUM::SBMT_M,
TheengsDecoder::BLE_ID_NUM::SBMT_M,
TheengsDecoder::BLE_ID_NUM::GTAG,
};

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

0 comments on commit 121e699

Please sign in to comment.