From: Tan Silliksaar
Sent: 10 June 2022 10:13
To: TasmotaUsers
Subject: Cannot make Azure IoT Hub work
I have a Sonoff S26 here.
I downloaded the latest Tasmota code and added this configuration:
#define USE_MQTT_TLS
#define USE_MQTT_AZURE_IOT
#define USE_MQTT_AZURE_DPS_SCOPEID "..."
#define USE_MQTT_AZURE_DPS_PRESHAREDKEY "..."
It cannot connect to https://global.azure-devices-provisioning.net at all. When I try to make the same query from my computer, it works fine.
MQT: Starting Azure DPS registration..
MQT: Azure DPS REST assignment connection failed with code '-1'. Restarting.
This is not a WiFi/networking problem as Web interface works and I tried MQTT with HiveMQ and it worked.
The documentation for Azure IoT on Tasmota gives an impression that it should work out of the box. https://tasmota.github.io/docs/Azure-IoT-Hub/#3-compile-your-binary-including-support-for-azure-iot-device-provisioning-service Well, it does not.
What am I missing? Thank you.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/b901d6f6-e35c-4a08-a538-f2c4e7ceaaa1n%40googlegroups.com.
I would follow through this step by step and get it to connect without DPS first
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/7acae16e-08c6-4887-8a76-07d6b36cf9a9n%40googlegroups.com.
What does the MQTT configuration page look like?
I’ve tried the same and got the same error. TLS connection error: 0 apparently means that it has connected successfully (unhelpful) so the issue is the MQTT rc:-2 (which is failing to make a network connection to the broker). I’ve tried to increase the MQTT Timeout but that made no difference. Someone may know what’s going on.
From: Paul O'Brien
Sent: 25 November 2022 21:29
To: Philip Knowles
as per the recommendations in this article - AZURE: WiFiClientSecureLightBearSSL: _wait_for_handshake: failed · Issue #14624 · arendst/Tasmota (github.com)
I can confirm if I create an IOTHub in the US Central region where I can turn on the preview function, upload custom firmware with just MQTTS and IOTHub options defined, setoption 132 1, then I get a connection to IOTHub..
I can confirm this doesn work if you use an IOT Hub without the new preview features turned on
now if anyone knows how to make this all work with IOT Central !!! :) there doesnt seem to be any way in Azure to define the backend IOT Hub or its settings etc..
01:06:09.646 MQT: Attempting connection...
01:06:09.715 MQT: Authenticating with an Azure IoT Hub Token
01:06:12.013 MQT: TLS connected in 2297 ms, stack low mark 1140
01:06:12.015 MQT: Fingerprint learned: A6 B9 F5 E9 2D 5E 10 CE FA F4 43 DF 05 64 A2 98 64 50 CD 89
01:06:12.450 MQT: Connected
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/BE6B5B84-EFC1-4704-8241-58D8A0E343B0%40hxcore.ol.