What product/components do you use and which version/fix level are you on?
Thin-edge and cumulocity IoT
Is your question related to the free trial, or to a production (customer) instance?
free trail
What are you trying to achieve? Please describe it in detail.
We have created the child devices using cumulocity IoT APIs. The thin-edge is installed on the parent device(gateway) . We are unable to publish the events through the thin-edge to child devices.
Do you get any error messages? Please provide a full error message screenshot and log file.
The published events are not present in the events column of child devices.
Have you installed all the latest fixes for the products and systems you are using?
one common mistake might be the owner of the device. If you created the child device via the API the device owner is set according the user that was used for the API call. Thus thin-edge.io can not send data to that particular child device. There are two solutions for that:
We are able to publish the events to the child devices that are created with the thinedge.
The other way of publishing the events to the child devices that are created using cumulocity API is not working even if we have changed the owner of child device from user that created the child device by API call to the owner of the thin-edge.
Test Output:
The output of publishing the events to the child devices that are created using cumulocity API with owner renamed to the thin-edge is that the new child device of the same name that is provided in the API call with type “thinedgeio-child” is created and events are published to it.
are you sure that the child device in your screenshot is a child device? Usually you would see in the parent device the “child devices” tab. I do not see that tab in your screenshot.
The screenshot that I have sent you in the last message was the device info view in of the child device.
Process followed to create child device from REST API calls.
Create Camera Child Device Post: {{url}}/inventory/managedObjects?Content-Type=application/vnd.com.nsn.cumulocity.managedobject+json&Accept=application/vnd.com.nsn.cumulocity.managedobject+json Authorization: Inherited from Parent
Linking Camera to Parent Device. POST: {{url}}/inventory/managedObjects/{{deviceId}}/childDevices?Accept=application/vnd.com.nsn.cumulocity.managedobject+json&Type=application/vnd.com.nsn.cumulocity.managedobject+json
Authorization: Inherited from Parent Body:
{
“managedObject”: {“id”:“1983114”}
The mentioned topic here is creating new child device with type thin-edge and publishing events to it instead of already present child device created by the API call.
You send the event to: tedge/events/UDI-Childevents/MCS02I502
Is MCS02I502 the external ID of your child device? Because you are creating the child device, linking it but I do not see the call where you do set the external ID. Could you show the Identity tab section of that device?
The MCS021502 is the name of the child device that is created from the cumulocity. When we are trying to are to publish the events from thin-edge to this child device, the new child device of same name and different Id is created.
We have deleted the MCS021502 child device. But we have created new test child device following the mentioned procedure of child device creation.
Here is the screen shot of the identity tab of test child device.
That’s the issue. If you create the child device via API yourself you also have to give it an externalID. Since you did not do that, thin-edge.io (more precise the MQTT Broker) does not know to which child device you want to send the data.
If you create a child device you have to perform 3 Rest Calls: