Open ButKor opened 2 months ago
I would add additional implementation context.
The 100
message is sent during tedge connect c8y
. The second field is using device_id
(= the same name as the device certificate's CN), although device_type
is already configurable as device.type
in tedge config.
https://github.com/thin-edge/thin-edge.io/blob/193ac915eecec1734f8770b113d11a5e38df46cf/crates/core/tedge/src/cli/connect/c8y_direct_connection.rs#L146
So, the implementation should be straight-forward.
Is your feature improvement request related to a problem? Please describe. I would like to use a serial-number as my technical device-id, but use a different/more meaningful name for the Device in Cumulocity. For child-devices and services this works perfectly fine with specifying different
@id
andname
fields in the registration messages. But I can't find a way to do the same for the main-device - here it always uses the CN of the certificate. Once registered, thin-edge.io disallows to set the name via thetedge mqtt pub "te/device/main///twin/name"
or the/etc/tedge/device/inventory.json
(as documented here)Describe the solution you'd like I would like to be able to set a different name than ID for a main device, e.g. via a new tedge config field
device.name
in same manner as done withdevice.type
.Describe alternatives you've considered Tried setting the name via:
tedge mqtt pub "te/device/main///twin/name" '"my-name"'
/etc/tedge/device/inventory.json