Closed ButKor closed 3 months ago
@ButKor registration messages need to be published with the retain flag so they are persisted on the mqtt broker, so I’m pretty sure that is why the mapper does not know of the child device after being restarted.
So retest with the retain flag (as it might be something else)
Update (for other people)
Below is an example of publishing a registration message with the retail flag (using tedge mqtt pub
):
tedge mqtt pub -r "te/device/my-child-1//" '{
"@type": "child-device",
"@id": "my-child-1-id",
"name": "my-child-1-name",
"type": "my-child-1-type"
}'
Thanks, that explains it! Retested and adding -r
to registration message solved my problem.
Describe the bug I have a connected thin-edge.io instance and registered a child-device via a dedicated registration message. Everything works fine - until I restart tedge-mapper-c8y. After restart the child-device does not receive data anymore in Cumulocity.
To Reproduce
Expected behavior Expected to still send events towards the platform via
tedge mqtt pub "te/device/my-child-1///e/heartbeat" '{ "text": "Heartbeat event" }'
after restart of tedge-mapper-c8y.Environment (please complete the following information):
Additional context
sudo tedge config set c8y.entity_store.auto_register true
thin-edge.io creates a new device named 'my-child-1' with last command of the reproduction steps. It seems not to be aware that there is already an entity registered for 'my-child-1'.After restart, same event:
Not seeing an error - missing the event towards c8y/event/events/create though.
Is that a bug - or am I missing a step here?