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

Access to my DeviceId dynamically #986

Closed
Ilheu opened this issue Mar 21, 2019 · 4 comments
Closed

Access to my DeviceId dynamically #986

Ilheu opened this issue Mar 21, 2019 · 4 comments

Comments

@Ilheu
Copy link

Ilheu commented Mar 21, 2019

I would like to get my iot edge deviceId, without writing it in my code, is it possible ?
My module is in node.js

@sebader
Copy link
Member

sebader commented Mar 21, 2019

You have access to that via enviroment variables which are being passed into your module:
IOTEDGE_DEVICEID
IOTEDGE_MODULEID

(you can do a docker inspect on your module to see what is all there)

@Ilheu
Copy link
Author

Ilheu commented Mar 21, 2019

Thank you! I did the docker inspect and found it !
Can you show me how to access these variables in node.js ?

@sebader
Copy link
Member

sebader commented Mar 21, 2019

@myagley
Copy link
Contributor

myagley commented Mar 25, 2019

Hi @Ilheu you should be unblocked with the use of these environment variables. I'm going to close this issue for now, but feel free to reopen if you have other questions.

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

No branches or pull requests

4 participants