Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ephrem Mekonnen
    @effymekonnen_twitter
    Can I use Python to develop custom IoT-Edge module?
    Xin Shi
    @shizn
    @effymekonnen_twitter This will be ready soon. We will have more languages for IoT Edge GA.
    Has AlTaiar
    @hasaltaiar_twitter
    Hi everyone, Just wondering if it's possible to run/debug c# modules for IoT Edge locally before pushing them to the docker registry? @shizn?
    Xin Shi
    @shizn
    @hasaltaiar_twitter That is something we are working on. In the future we can debug custom modules locally without doing the deployment. Stay tuned.
    schenker28
    @schenker28_twitter

    I found the python IoT edge install instructions here: https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-simulate-device-Linux

    sudo pip install -U azure-iot-edge-runtime-ctl

    But I can't find the source code for azure-iot-edge-runtime-ctl; I'd like to build it from source. Any pointers?
    Xin Shi
    @shizn
    @schenker28_twitter This is not open sourced. And FYI, this tool will be retired later.
    vkatms
    @vkatms
    Anyone here? I'm trying to follow the "Deploy Azure functions as IoT Edge modules" tutorial https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-function and I am having trouble creating the solution. Here's the output generated when I execute "Azure IoT Edge: New IoT Edge Solution" command from the Command Palette:
    Executing dotnet new -i Microsoft.Azure.IoT.Edge.Function
    Restoring packages for C:\Users\<username>.templateengine\dotnetcli\v2.1.302\scratch\restore.csproj...
    C:\Program Files\dotnet\sdk\2.1.302\NuGet.targets(114,5): error : Unable to load the service index for source https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json. [C:\Users\<username>.templateengine\dotnetcli\v2.1.302\scratch\restore.csproj]
    C:\Program Files\dotnet\sdk\2.1.302\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized).
    I've googled this error but I can't find a fix that works. Any ideas?
    Ray Fang
    @LazarusX

    @vkatms This is because your NuGet sources include one which requires credential to access, and it blocks the entire NuGet restore process. You can either remove it from your NuGet sources temporarily or update your %appdata%\NuGet\NuGet.config file with below content:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
        <add key="MSAzure" value="https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json" />
      </packageSources>
      <packageRestore>
        <add key="enabled" value="True" />
        <add key="automatic" value="True" />
      </packageRestore>
      <bindingRedirects>
        <add key="skip" value="False" />
      </bindingRedirects>
      <packageManagement>
        <add key="format" value="0" />
        <add key="disabled" value="False" />
      </packageManagement>
      <packageSourceCredentials>
        <MSAzure>
          <add key="Username" value="<your email>" />
          <add key="ClearTextPassword" value="<your personal access token required from https://msazure.visualstudio.com/_usersSettings/tokens>" />
        </MSAzure>
      </packageSourceCredentials>
    </configuration>

    I also replied you internally. :)

    vkatms
    @vkatms
    To close the loop on the Unauthorized error. First, create Personal Access Token as described here. Then modify the correct NuGet.config file, in my case it was c:\users\<username>\NuGet.Config as described in Use dotnet with VSTS feeds
    Martin Dahlstedt
    @sympthom
    Hi, when installing the extension Azure IoT Edge for Visual Studio Code I keep getting the error message: C:\Program Files\dotnet\sdk\2.1.302\NuGet.targets(114,5): error : Unable to load the service index for source https://eniga-io.pkgs.visualstudio.com/_packaging/Eniga.Dev.Nuget/nuget/v3/index.json. [C:\Users\marti\AppData\Local\Temp\sgm5chwy.dtv\restore.csproj]
    C:\Program Files\dotnet\sdk\2.1.302\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Users\marti\AppData\Local\Temp\sgm5chwy.dtv\restore.csproj]
    Ray Fang
    @LazarusX

    Hi @sympthom , have you tried vkatms' instruction? Looks like you two have similar issues.

    To close the loop on the Unauthorized error. First, create Personal Access Token as described here. Then modify the correct NuGet.config file, in my case it was c:\users\<username>\NuGet.Config as described in Use dotnet with VSTS feeds

    Tayo Carvalhal
    @lucarv
    i watched the channel9 with joe and while i have the 1.3.0 extension there is no menu option to simulate the device on my local machine. what am i missing?
    Ray Fang
    @LazarusX
    @lucarv You can right click on an Edge device, select "Setup IoT Edge Simulator", then right click on the deployment.template.json to see the simulator options, or type "simulator" in command palette.
    Ian Beeson
    @KevinTipps
    Hi, I've broke my simulator , and can no longer send messages to the Hub, I keep getting Timeout messages
    edgeHubDev | [09/20/2018 02:13:59.535 PM] Edge Hub Main()
    edgeHubDev | 2018-09-20 14:14:01.044 +00:00 [INF] - Starting Edge Hub
    edgeHubDev | 2018-09-20 14:14:01.063 +00:00 [INF] - Version - 1.0.1.15962126 (6e5e86dcf0c9a3732fc72a64d9ec9b0fcb2d6fad)
    edgeHubDev | 2018-09-20 14:14:01.063 +00:00 [INF] -
    edgeHubDev | 2018-09-20 14:14:01.064 +00:00 [INF] - Installing intermediate certificates.
    edgeHubDev | 2018-09-20 14:14:01.215 +00:00 [INF] - Attempting to connect to IoT Hub for client Edge-Testing/$edgeHub via AMQP...
    edgeHubDev | 2018-09-20 14:14:01.249 +00:00 [INF] - Connected to IoT Hub for client Edge-Testing/$edgeHub via AMQP, with client operation timeout 60000.
    edgeHubDev | 2018-09-20 14:14:01.266 +00:00 [INF] - Created cloud connection for client Edge-Testing/$edgeHub
    PythonModule | IoT Hub Client for Python
    PythonModule | Starting the IoT Hub Python sample using protocol MQTT...
    PythonModule | The sample is now waiting for messages and will indefinitely. Press Ctrl-C to exit.
    PythonModule | Error: Time:Thu Sep 20 14:14:05 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:wait_for_connection Line:383 Failure: connect failure 111.
    PythonModule | Error: Time:Thu Sep 20 14:14:05 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:767 wait_for_connection failed
    PythonModule | Error: Time:Thu Sep 20 14:14:05 2018 File:/usr/sdk/src/c/c-utility/adapters/tlsio_openssl.c Func:on_underlying_io_open_complete Line:748 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
    PythonModule | Error: Time:Thu Sep 20 14:14:05 2018 File:/usr/sdk/src/c/c-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_open Line:1246 Failed opening the underlying I/O.
    PythonModule | Error: Time:Thu Sep 20 14:14:05 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:989 Error: io_open failed
    PythonModule | Error: Time:Thu Sep 20 14:14:05 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:2037 failure connecting to address etg0174.
    PythonModule | Error: Time:Thu Sep 20 14:14:06 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:wait_for_connection Line:383 Failure: connect failure 111.
    PythonModule | Error: Time:Thu Sep 20 14:14:06 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:767 wait_for_connection failed
    PythonModule | Error: Time:Thu Sep 20 14:14:06 2018 File:/usr/sdk/src/c/c-utility/adapters/tlsio_openssl.c Func:on_underlying_io_open_complete Line:748 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
    PythonModule | Error: Time:Thu Sep 20 14:14:06 2018 File:/usr/sdk/src/c/c-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_open Line:1246 Failed opening the underlying I/O.
    PythonModule | Error: Time:Thu Sep 20 14:14:06 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:989 Error: io_open failed
    PythonModule | Error: Time:Thu Sep 20 14:14:06 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:2037 failure connecting to address etg0174.
    edgeHubDev | 2018-09-20 14:14:01.267 +00:00 [INF] - New cloud connection created for device Edge-Testing/$edgeHub
    edgeHubDev | 2018-09-20 14:14:01.277 +00:00 [INF] - Initializing configuration
    edgeHubDev | 2018-09-20 14:14:05.140 +00:00 [INF] - Created persistent store at /tmp/edgeHub
    edgeHubDev | 2018-09-20 14:14:05.148 +00:00 [INF] - Created new message store
    edgeHubDev | 2018-09-20 14:14:05.171 +00:00 [INF] - Started task to cleanup processed and stale messages
    edgeHubDev | 2018-09-20 14:14:06.446 +00:00 [INF] - Set the following 2 route(s) in edge hub
    edgeHubDev | 2018-09-20 14:14:06.454 +00:00 [INF] - r1: FROM /messages/modules/PythonModule/outputs/* INTO $upstream
    edgeHubDev | 2018-09-20 14:14:06.454 +00:00 [INF] - r2: FROM /messages/modules/tempSensor/outputs/temperatureOutput INT
    as you can see the TLS handshake is failing , I also have no edgeAgent running, is this normal for the simulator
    Ian Beeson
    @KevinTipps
    any help is appreciated
    Xin Shi
    @shizn
    @KevinTipps Hi Ian, Python (and C) module currently is not supported with the Simulator. If you look at the Python tutorial on Docs, it still follows debug experience without the Simulator. We are working on the Python support. Once we have the official support, the tutorial will also be updated. https://docs.microsoft.com/en-us/azure/iot-edge/how-to-develop-python-module Thanks!!
    Ian Beeson
    @KevinTipps
    @shizn Thanks for the update, do you have an estimated roadmap for this 2018 Q4, 2019 Q1, etc
    Engin Polat
    @polatengin
    Hi room, I have a very basic question, I cloned the project from https://github.com/Microsoft/vscode-azure-iot-edge I want to debug some logic in generateDeployment context menu. How can I compile and install the extension from my local folder into VS Code?
    Jun Han
    @formulahendry
    @polatengin
    1. Fork and clone the repository
    2. cd vscode-azure-iot-edge
    3. Install the dependencies: npm install
    4. Open the folder in VS Code
    5. Install TSLint (not required but recommended)
    6. Press F5. Go! A new VS Code instance will open, and you could debug it.
    Michael Gerfen
    @gerfen
    When I try to "Build and Push to IotEdge Solution" from VS Code, I get an "Size of createOptions too big. The maxium size of createOptions is 4K" error. Any ideas on how to resolve the error?
    Michael Gerfen
    @gerfen
    FWIW, I've reviewed my deployment.template.json file and none of the "createOptions" are anywhere close to 4k in size.
    Wei Shen
    @adashen
    @gerfen there is a bug and we are fixing. The work around currently, is to remove the spaces and line breaks in your createOptions string. The fix will be released soon.
    Michael Gerfen
    @gerfen
    @adashen Thanks! I'll give it a try.
    Michael Gerfen
    @gerfen
    @adashen Removing the spaces and line breaks did indeed fix the issue. Thanks again!
    cdjc
    @cdjc
    Is there a way to have more than one deployment.template.json file? How would I enable the context menu for an alternative deployment file?
    cdjc
    @cdjc
    I see there's change in package.json to enable context-dependent commands on deployment.template.debug.json but this is not yet released (I'm using 1.5.1). I wonder why not make the regexp less strict: deployment.template(\..*)?.json
    Wei Shen
    @adashen
    @cdjc Thanks for the suggestion. The next release candidate will support mutiple deployment templates. (*.template.json) And you can trigger the build through command palette. Since these template files are not created/managed by our work flow and managed by the extension. We didn't give much shortcut there. But user have the freedom to trigger the commands through command palette.
    Eli
    @Scythen
    Hi all, just starting out with IoT Edge and I have a question about the modules folder in the VS Code solution. Is there any way to have the modules one level deeper? something like:
    modules
    --My1stModule
    ----module
    ----tests
    --My2ndModule
    ----module
    ----tests
    I would like to do this so that I can keep each module in a git repo and them map them into different solutions using git submodules.
    each repo would have its own tests project and module.
    Eli
    @Scythen
    I tried to add the extra level but the image placeholder in the deployment template does not seem to support this structure.
    Wei Shen
    @adashen
    @Scythen you can just put module.json directly under the Module folder. And make sure the docker file path and contextPath in it has correct reference. And project code could in deeper folder
    Marc Jacobi
    @obiwanjacobi
    Installed latest vscode extention (1.7.0) and ran pip install --upgrade iotedgehubdev but build edge solution still comes back with error: Unable to load the service index for source https://api.nuget.org/v3/index.json
    What am I missing?
    Ray Fang
    @LazarusX
    @obiwanjacobi what's the result of docker run --rm busybox ping api.nuget.org? Let's make sure internet is accessible within containers first.
    Marc Jacobi
    @obiwanjacobi
    @LazarusX Unable to find image 'busybox:latest' locally docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers). See 'docker run --help'.
    Run from cmd prompt (not admin) Connection problem?
    Ray Fang
    @LazarusX
    @obiwanjacobi Yes. Look like your Docker daemon has issues with internet connection. It even failed to pull the busybox image.
    Marc Jacobi
    @obiwanjacobi
    @LazarusX Thanx for pointing me in the right direction. I could not find the problem so I reinstalled Docker and HyperV and that fixed it.
    I have a whole lot of (orphaned?) virtual network connections that may not help either... Thanx!
    Mohammadreza Sakhavar
    @MSProgrammer
    hey every one , merry xmas
    buddies , is this module take over on Edge view ?
    i want to modify edge file type , and want to VSCODE know it , is possible with this , module ?
    thak you all
    Wei Shen
    @adashen
    @MSProgrammer can you provide more information about "This module" and what is the "edge file type" ?
    Tayo Carvalhal
    @lucarv
    can't run simulator for solution, get:
    Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9229).