Commit 6adf67b2 authored by Michael Tross's avatar Michael Tross

support displayId property

parent f1415b99
......@@ -392,12 +392,16 @@ void vdc_getprop_cb(dsvdc_t *handle, const char *dsuid, dsvdc_property_t *proper
}
vdc_report(LOG_NOTICE, "get request name=\"%s\"\n", name);
if (strcmp(name, "hardwareGuid") == 0) {
if ((strcmp(name, "hardwareGuid") == 0) ||
(strcmp(name, "displayId") == 0)) {
char info[256];
char buffer[32];
size_t n;
strcpy(info, "macaddress:");
memset(info, 0, sizeof(info));
if (strcmp(name, "hardwareGuid") == 0) {
strcpy(info, "macaddress:");
}
sprintf(buffer, "%02x:%02x:%02x:%02x:%02x:%02x", netatmo.base.bssid[5], netatmo.base.bssid[4],
netatmo.base.bssid[3], netatmo.base.bssid[2], netatmo.base.bssid[1], netatmo.base.bssid[0]);
strcat(info, buffer);
......@@ -450,6 +454,9 @@ void vdc_getprop_cb(dsvdc_t *handle, const char *dsuid, dsvdc_property_t *proper
} else if (strcmp(name, "x-netatmo-client-id") == 0) {
dsvdc_property_add_string(property, name, g_client_id);
} else if (strcmp(name, "x-netatmo-debug-level") == 0) {
dsvdc_property_add_int(property, name, vdc_get_debugLevel());
} else if (strcmp(name, "x-netatmo-connection-status") == 0) {
dsvdc_property_add_bool(property, name, g_access_token != NULL);
......@@ -852,12 +859,16 @@ void vdc_getprop_cb(dsvdc_t *handle, const char *dsuid, dsvdc_property_t *proper
} else if (strcmp(name, "hardwareModelGuid") == 0) {
dsvdc_property_add_string(property, name, "gs1:3700730500111");
} else if (strcmp(name, "hardwareGuid") == 0) {
} else if ((strcmp(name, "hardwareGuid") == 0) ||
(strcmp(name, "displayId") == 0)) {
char info[256];
char buffer[32];
size_t n;
strcpy(info, "macaddress:");
memset(info, 0, sizeof(info));
if (strcmp(name, "hardwareGuid") == 0) {
strcpy(info, "macaddress:");
}
sprintf(buffer, "%02x:%02x:%02x:%02x:%02x:%02x",
dev->mod->bid[0], dev->mod->bid[1], dev->mod->bid[2],
dev->mod->bid[3], dev->mod->bid[4], dev->mod->bid[5]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment