Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device group creation #451

Closed
Shotariusii opened this issue Apr 3, 2023 · 8 comments
Closed

device group creation #451

Shotariusii opened this issue Apr 3, 2023 · 8 comments

Comments

@Shotariusii
Copy link

Hello.

I am trying to add groups for devices by adding tags in Device Twins. but when i check Groups and Deployments under Update section there is no any Group to deploy update.

any idea what i am missing ?

@josephmsft
Copy link

Do you see a Default group? Do you see any devices at all? You may not have permissions configured correctly on your IoT Hub.

You also won't see a group show up until an ADU agent actually connects for that device (so if you just go into an IoT Hub and create a device and add a tag without ever connecting a real ADU agent for that device it won't create a group).

@Shotariusii
Copy link
Author

Hello, i am using ESP32 with Freertos Azure C sdk, i check it also after successful connection but it didn't appear, also I checked that i am sending ADU agent state successfully.

there is nothing, message with : There are no groups to display.

you mean may i have no permission from my admin to do that ?
i did container creation and importing files.

@Shotariusii
Copy link
Author

Can anyone help me to find out what is a problem ?
i think the problem is Azure Portal side, i am missing something.

@jw-msft
Copy link
Contributor

jw-msft commented Apr 13, 2023

Hi @Shotariusii, Could you share the snippet in your twin that you added to add the group tag?

What typically works for me is to add a snippet at the top-level properties (NOTE: exact casing of "ADUGroup" ):

  "tags": {
    "ADUGroup": "yourGroupNameHere"
  },

A lengthier snippet:

{
    "deviceId": "test",
    "etag": "AAAAAAAAAIg=",
    ...
    ...
    ...
    "modelId": "dtmi:azure:iot:deviceUpdateModel;2",
    "version": 5731,
    "tags": {
        "ADUGroup": "yourGroupNameHere"
    },
    "properties": {
    ...
    ...
    ...
}

@Shotariusii
Copy link
Author

Hello, yes i am doing the same

Screenshot 2023-04-18 111055

@Shotariusii
Copy link
Author

I configure accesses again, i was missing something. so now i am getting this in diagnostic section.

groupanddeploy1

@jw-msft
Copy link
Contributor

jw-msft commented Apr 19, 2023

@Shotariusii Is this blocking device receiving update deployments, or a concern with UX view? In the released .deb pkg agent (or built from code on main branch), compatPropertyNames should default to "model,manufacturer" and the model and manufacture compat property values should be sent in device properties. It does clear out the interfaceId in the startup msg

Could you provide more details about the agent being used? Is it installed via .deb package, built from sources, customized/rewritten? What release version, or commitId it was built with?

In du-agent logs, could you see if there are the following trace that has "compatPropertyNames" but cleared-out "interfaceId" ? and it should have "manufacturer" and "model" properties and their values. For example:
2023-04-19T18:30:08.2551Z 848418[848418] [D] Queueing message (t:5, c:0x731abe70, m:{"deviceUpdate":{"__t":"c","agent":{"deviceProperties":{"manufacturer":"man","model":"mod","interfaceId":null,"contractModelId":"dtmi:azure:iot:deviceUpdateContractModel;2","aduVer":"DU;agent/1.0.2"},"compatPropertyNames":"model,manufacturer"}}}) [ADUC_D2C_Message_SendAsync]

@josephmsft Are the errors in the ux mapping to "interfaceId" and "compatPropertyNames" (and corresponding values) in the startup message and indicating that agent is not including those?

in main branch, startup msg,
compatPropertyNames is added here:

if (!DeviceProperties_AddManufacturerAndModel(devicePropsObj, agent))

interfaceId is cleared here:

if (!DeviceProperties_ClearInterfaceId(devicePropsObj))

and can see default of "model,manufacturer" for compatPropertyNames would be set here, or use the override from du-config.json:

bool DeviceProperties_AddManufacturerAndModel(JSON_Object* devicePropsObj, const ADUC_AgentInfo* agent)

AFAIK, the cleared-out interfaceId in startup msg should not be an issue and has been in there since ver 1.0 GA.

@Shotariusii
Copy link
Author

thanks for your replay, i was writing my flow of ADU and I missed some initialisation function, that's why I had that problem, now I solved thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants