Azure / azure-iot-protocol-gateway

Azure IoT protocol gateway enables protocol translation for Azure IoT Hub
Other
226 stars 151 forks source link

OEM Server with TCP to IoT Hub #137

Open ravitol opened 5 years ago

ravitol commented 5 years ago

Hello guys I have IoT Devices that connect to a proprietary OEM Server and I need to get the telemetry data into IoT hub

The OEM server has the ability to send open a TCP socket connection per device and send the raw data to another server. Is using the azure IoT protocol gateway my best option to parse the raw data and send this over IoT hub or is there another pattern that I should consider.

If this is my best option where should i start to make changes

Appreciate the help

Ravi

vivekbahl commented 5 years ago

Hi Ravi, I find Protocol Gateway, do provide a framework for interacting with IoT Hub. but you may try other options here - (https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks). You can opt for creating IoT Edge modules, and your OEM server may send data to these modules. You may decide to process the input data here or send it across to IoT Hub, to let backend consumers read from IoT Hub draw inferences out of it.

Hope this helps, Vivek Bahl

ravitol commented 5 years ago

Hi Vivek Appreciate the response. I am familiar with those options although I need a cloud gateway that can aggregate the telemetry data across a large number of devices and be able to scale. Under the covers, I believe the IoT Protocol Gateway uses the SDK to connect to IoT hub over AMQP and relay MQTT messages from the devices. It is a solid pattern and can be customized to support other protocols besides MQTT.

However, the issue is that it was built a while back and Semantic logger that is used is not compatible with the Azure Storage library and hence the cloud service crashes at start. I hope Microsoft or some from the community is able to provide a fix.

Regards

Ravi

From: Vivek Bahl notifications@github.com Sent: Sunday, April 14, 2019 7:12 PM To: Azure/azure-iot-protocol-gateway azure-iot-protocol-gateway@noreply.github.com Cc: Ravi Tolani ravi@mobitox.com; Author author@noreply.github.com Subject: Re: [Azure/azure-iot-protocol-gateway] OEM Server with TCP to IoT Hub (#137)

Hi Ravi, I find Protocol Gateway, do provide a framework for interacting with IoT Hub. but you may try other options here - (https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks). You can opt for creating IoT Edge modules, and your OEM server may send data to these modules. You may decide to process the input data here or send it across to IoT Hub, to let backend consumers read from IoT Hub draw inferences out of it.

Hope this helps, Vivek Bahl

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-iot-protocol-gateway/issues/137#issuecomment-483070988, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAtoGLOMpboR0HUJn_W8UPMcTZebSzAlks5vg8PSgaJpZM4cg0He.

vivekbahl2021 commented 5 years ago

Hi Ravi,

You are right the PG provides a solid pattern, that can be extended. Beneath it uses DotNetty and its MQTT encoder/decoders, and Devices.Client for communication with IoT hub. Also, DotNetty provides Handlers for TLS(https://github.com/Azure/DotNetty/tree/dev/src/DotNetty.Handlers/Tls). You may go through the samples provided (https://github.com/Azure/DotNetty/tree/dev/examples).

You can use the Service Fabric Stateless service host for deploying the PG instance. It allows using ETW for logging that you can easily extend, with Eventhub as a destination for the logs (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-diagnostics-event-aggregation-wad). The Stateless service instances also provide an easy path for scaling, upon need (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-scaling).

Thanks, Vivek Bahl