I can't send message from esp32 to hubiot

Thales Vignoli 1 Reputation point
2022-08-25T18:19:34.763+00:00

I used the Azure SDK guide for C ioT HUB, I configured my wifi and ioT hub inside my configuration library. I created my iot hub and entered it as input in my Stream analytics, but I can't receive messages sent from ESP32, I can only send messages from my ioT HUB device to my ESP32.

I'm using a DHT11 sensor and trying to use Serial.print in the void loop to send the measurements.

Messages do not arrive in ioTHUB or Stream Analytics.

Here's a link to my library: I can't send message from esp32 to hubiot

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,115 questions
Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
330 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde 28,386 Reputation points MVP
    2022-08-25T22:05:05.21+00:00

    Hello @Thales Vignoli ,

    sending messages to the IoT Hub is not that hard.

    Can you please share the link to the library? Which example did you use are base for it?

    Do you say you can send messages to the ESP32? Is this a Direct Method? or a Device Twin desired property? or a cloud message?

    And, have you tried the IoT Explorer for incoming telemetry?

    You connect Azure Stream Analytics. If you combine this with the routing feature on the IoT Hub, you need to specify this specific 'events' route.

    Also, be aware of the consumer groups. Reusing the same $default for multiple services (and IoT Explorer) can corrupt data streams to other services.

    1 person found this answer helpful.
    0 comments No comments