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

Adding support for Azure IoT Hub #11906

Merged
merged 1 commit into from
Apr 27, 2021
Merged

Adding support for Azure IoT Hub #11906

merged 1 commit into from
Apr 27, 2021

Conversation

ksaye
Copy link

@ksaye ksaye commented Apr 26, 2021

Simple testing documentation here: https://kevinsaye.wordpress.com/2021/04/26/using-tasmota-with-azure-iot-hub/ until I can contribute tot the Tasmota documentation site.

Description:

Related issue (if applicable): fixes #

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works on Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with core ESP32 V.1.0.6
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

Simple testing documentation here: https://kevinsaye.wordpress.com/2021/04/26/using-tasmota-with-azure-iot-hub/ until I can contribute tot the Tasmota documentation site.
@ksaye
Copy link
Author

ksaye commented Apr 26, 2021

There is a free SKU for Azure IoT Hub, but if a tester wants access to an IoT Hub an you do not want to create an Azure subscription, message me directly and I will create an IoT Hub for you.

@ascillato
Copy link
Contributor

ascillato commented Apr 26, 2021

Thanks. 👍

The link to the documentation you did is very complete and, if you want, it can be added to the tasmota´s docs.

Just a detail, the CLIENT NAME must be unique for each device. That should be remarked as it is a very common mistake for new users. Also, the link to the pull request in your documentation is the old PR and not this one.

Comment on lines +234 to +239
#if defined(USE_MQTT_AZURE_IOT)
// Azure IoT Hub currently does not support custom topics: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support
String realTopicString = "devices/" + String(SettingsText(SET_MQTT_CLIENT));
realTopicString += "/messages/devicebound/#";
MqttClient.subscribe(realTopicString.c_str());
#else //USE_MQTT_AZURE_IOT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with the code, however identation does not follow the Tasmota convention. The ifdefs start at the beginning of the line, and the code is identated as usual.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I will fix this once merged.

@arendst arendst merged commit 9595e9b into arendst:development Apr 27, 2021
arendst added a commit that referenced this pull request Apr 27, 2021
Add support for MQTT using Azure IoT Hub by Kevin Saye (#11906)
@ksaye ksaye deleted the patch-1 branch April 27, 2021 15:34
@ksaye
Copy link
Author

ksaye commented Apr 27, 2021

@arendst from a documentation perspective, I plan on writing a better document, once I get 2 more changes in.

(Perhaps a discussion item) Can the area 'Smart Home Integrations' be renamed to something else? AWS and Azure (and other solutions) are not always Smart Home and have other uses. I have a customer using Tasmota for a people counter in a corporate environment -- which is why I submitted the Azure IoT Hub code.

@arendst
Copy link
Owner

arendst commented Apr 29, 2021

@ksaye regarding documentation pls contact the document site directly https://tasmota.github.io/docs/

@blakadder FYI

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

Successfully merging this pull request may close these issues.

4 participants