Hello,
I edded the multi cloud serves to fit my needes. When the divice sends GNSS data after fix it looks like this:
"Received":{4 items "messageType":"DATA" "appId":"GNSS" "data":{3 items "lat":51.832831879576325 "lng":4.849055562212727 "acc":9.889153480529785 } "ts":1723624845580 }
When a massage is sent from temperature if I remember it correctly (now it is V for voltage) it looks like this:
"Received":{4 items "messageType":"DATA" "appId":"V" "data":38.413185119628906 "ts":1723624845562 }
I removed the queueing application and have another way to handle the not send messages.
static int send_sensor_sample(const char *const sensor, double value){ int ret; MSG_OBJ_DEFINE(msg_obj); ret = create_timestamped_device_message(&msg_obj, sensor, NRF_CLOUD_JSON_MSG_TYPE_VAL_DATA); if (ret) { return -EINVAL; } /* Populate the container object with the sensor value. */ ret = nrf_cloud_obj_num_add(&msg_obj, NRF_CLOUD_JSON_DATA_KEY, value, false); if (ret) { LOG_ERR("Failed to append value to %s sample container object ", sensor); nrf_cloud_obj_free(&msg_obj); return -ENOMEM; } int err = nrf_cloud_coap_obj_send(&msg_obj, IS_ENABLED(CONFIG_COAP_SEND_CONFIRMABLE)); if (err < 0) { LOG_ERR("Failed to send %s sample, error: %d", sensor, err); return err; } }
I call this function a few times and every time the data is put in its own massage. Now I want to add all data in one massage somewhat like the GNSS data. I tried calling nrf_cloud_obj_num_add() multiple times and using nrf_cloud_obj_str_array_add() with a return err that it can't encode unknown type.