Skip to content

create_from_edge_environment()'s get_twin() is not returning the module twin values #821

Closed

Description

Issue-

I'm reading module twin properties in my edge module.

When i'm using -

client = IoTHubModuleClient.create_from_connection_string("HostName=example.azure-devices.net;DeviceId=example;ModuleId=ExampleModuleId;SharedAccessKey=somekey")
client.get_twin()

I'm able to get the module twin values from ExampleModuleId but when we're using -

client = IoTHubModuleClient.create_from_edge_environment()
client.get_twin()

It's returning - .

{'desired':{}, 'reported':{}}

Note - I'm running this code in edge environment.

Let me know if anything other details needed to debug the issue.

Activity

  1. cartertinney commented on Jul 14, 2021

    @cartertinney
    Member

    Indrajeet Singh (@ismaan1998)

    Thanks for bringing this to our attention. I'm going to look into this

  2. ismaan1998 commented on Jul 20, 2021

    @ismaan1998
    Author

    Carter Tinney (@cartertinney) any update on this?

  3. cartertinney commented on Jul 20, 2021

    @cartertinney
    Member

    Indrajeet Singh (@ismaan1998) So far, I have been completely unable to replicate it. I'm reaching out to our Edge team to see if they have any additional insights, but any additional information or logs you can provide will be helpful.

  4. cartertinney commented on Jul 26, 2021

    @cartertinney
    Member

    Indrajeet Singh (@ismaan1998)

    It appears the issue may be with your configuration of the Edge. Could you provide us the Edge logs using the command
    iotedge support-bundle so that we can take a look at what's going on?

    https://docs.microsoft.com/en-us/azure/iot-edge/troubleshoot?view=iotedge-2020-11#gather-debug-information-with-support-bundle-command

  5. ismaan1998 commented on Jul 29, 2021

    @ismaan1998
    Author

    support_bundle.zip

    Carter Tinney (@cartertinney) Let me know if anything else needed

  6. cartertinney commented on Aug 10, 2021

    @cartertinney
    Member

    Apologies for the delay, we're still trying to get this looked into.

  7. nlcamp commented on Aug 10, 2021

    @nlcamp

    Hi Indrajeet Singh (@ismaan1998) - The iotedge check output is showing a lot of connectivity errors. Can you try adding a daemon.json file specifying the DNS server as described here and then repost your support bundle? https://docs.microsoft.com/en-us/azure/iot-edge/troubleshoot-common-errors?view=iotedge-2020-11#edge-agent-module-reports-empty-config-file-and-no-modules-start-on-the-device

    Also, is there a proxy server in use on your network? If so, you'll need to follow the steps here to configure IoT Edge to use the proxy: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-configure-proxy-support?view=iotedge-2020-11

  8. cartertinney commented on Aug 17, 2021

    @cartertinney
    Member

    Indrajeet Singh (@ismaan1998) any updates on this?

  9. ismaan1998 commented on Aug 23, 2021

    @ismaan1998
    Author

    Carter Tinney (@cartertinney)
    By modifying the config.toml as shown below in the image has solved this issue. Thanks
    image

    we can close this now. Thanks for all the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions