Commit d8ed08ab authored by Michael Tross's avatar Michael Tross

fix account without connected device

parent 79a85412
......@@ -516,11 +516,14 @@ int netatmo_get_devices()
if (!strcmp(key, "devices")) {
if (type == json_type_array) {
//array_list* dev = json_object_get_array(val);
array_list* dev = json_object_get_array(val);
netatmo_module_t* nmodule = &netatmo.base.modules[0];
for (n = 0; n < 1 /*dev->length*/; n++) {
for (n = 0; n < dev->length; n++) {
json_object* jobj3 = json_object_array_get_idx(val, n);
if (jobj3 == NULL) {
break;
}
json_object_object_foreach(jobj3, key, val)
{
enum json_type type = val ? json_object_get_type(val) : -1;
......@@ -709,6 +712,9 @@ netatmo_get_values(netatmo_module_t* mod)
if (mod && mod != m) {
continue;
}
if (NULL == m->id) {
continue;
}
vdc_report(LOG_INFO, "network: getmeasure request for id %s/%s - last query %d \n",
m->id, m->name, m->values[0].last_query);
......
This diff is collapsed.
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