none
iot-edge/tutorial: Only one message is received from temperature sensor and it repeats RRS feed

  • Question

  • I followed the guide at iot-edge/tutorial: https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-csharp-module-windows

    Temperature sensor sends the data continuously, but my edge module receives only one message, and prints the same repeatedly.

    Temp sensor logs:

    iotedge logs SimulatedTemperatureSensor -f

    SimulatedTemperatureSensor Main() started.
    Initializing simulated temperature sensor to send 500 messages, at an interval of 5 seconds.
    To change this, set the environment variable MessageCount to the number of messages that should be sent (set it to -1 to send unlimited messages).
    Information: Trying to initialize module client using transport type [Amqp_Tcp_Only].
    Information: Successfully initialized module client of transport type [Amqp_Tcp_Only].
    10/16/2019 12:36:36 PM> Sending message: 1, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]
    10/16/2019 12:36:41 PM> Sending message: 2, Body: [{"machine":{"temperature":22.438411537529159,"pressure":1.1638696688324359},"ambient":{"temperature":21.271905486831397,"humidity":25},"timeCreated":"2019-10-16T12:36:41.3164016Z"}]
    10/16/2019 12:36:46 PM> Sending message: 3, Body: [{"machine":{"temperature":22.436994208575687,"pressure":1.163708200976977},"ambient":{"temperature":21.184549093565227,"humidity":25},"timeCreated":"2019-10-16T12:36:46.3654059Z"}]
    10/16/2019 12:36:51 PM> Sending message: 4, Body: [{"machine":{"temperature":23.023953024774766,"pressure":1.2305769268730746},"ambient":{"temperature":21.225230964704057,"humidity":24},"timeCreated":"2019-10-16T12:36:51.414174Z"}]
    10/16/2019 12:36:56 PM> Sending message: 5, Body: [{"machine":{"temperature":24.062014522874733,"pressure":1.3488370975426911},"ambient":{"temperature":20.609472949574457,"humidity":26},"timeCreated":"2019-10-16T12:36:56.4601183Z"}]

    My edge module logs:

    iotedge logs testedge1 -f

    IoT Hub module client initialized.
    Received message: 1, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]
    Received message sent
    Received message: 2, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]
    Received message sent
    Received message: 3, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]
    Received message sent
    Received message: 4, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]
    Received message sent
    Received message: 5, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]
    Received message sent
    Received message: 6, Body: [{"machine":{"temperature":21.582147519957342,"pressure":1.0663206035394439},"ambient":{"temperature":20.91956754793393,"humidity":24},"timeCreated":"2019-10-16T12:36:35.9966201Z"}]

    Routes:

    {
    "routes": {
    "SimulatedTemperatureSensorToIoTHub": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/* INTO $upstream",
    "testedge1ToIoTHub": "FROM /messages/modules/testedge1/outputs/* INTO $upstream",
    "SimulatedTemperatureSensorTotestedge1": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint("/modules/testedge1/inputs/input1")"
    }
    }

    Please let me know what I'm doing wrong.


    • Edited by Keshava GN Friday, October 18, 2019 8:52 AM
    Wednesday, October 16, 2019 12:43 PM

Answers

All replies