Dear Team,
I tried to create devices with Json via MQTT, and found the external can’t be saved into database. Then the new measurement can’t be sent to target device with MQTT.
When you configure the MQTT connection, then you have to specify the client Id and that would be the external Id for that connection and any device you create using that connection
If you have to create a new device with different external Id, I would suggest you to create a separate connection with new external id and then create the device using json payload.
Hi Diwevedi,
I am also testing with MQTTBox, the Client Id is generated automatically.
I remove the ‘c8y_Serial’ property for the device json. But the External Id is still missed.
If you use the topic “/inventory/managedObjects/create” with JSON payload it won’t add the external id since it’s internally directly invoking the Inventory API to create ManageObject.
I will suggest to first create your device using standard topic “s/us” and command “100,DeviceName,DeviceType”, This will create the device (ManagedObject) and associate the external Id with it.
next you can update the JSON Payload using the same connection but the topic “/inventory/managedObjects/update” and JSON payload
Thanks, it’s available to update the MO with topic “/inventory/managedObjects/update/{{ManagedObjectID}}”.
But it should not be available to update external id, right ?
I will suggest to first create your device using standard topic “s/us” and command “100,DeviceName,DeviceType”, This will create the device (ManagedObject) with the external ID.
Next step is to update the managed Object as mentioned above.