letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.3k stars 2.22k forks source link

Failed to connect MQTT on aliyun IOT server #4135

Closed eznas closed 1 year ago

eznas commented 2 years ago

Below is a sample login param, this is NOT a real param, but base on the real format. I tried to login in Controllers, and tried all MTQQ methods, but all failed. (I could use the MQTT.fx or app on phone to login successful using same login param):

{"clientId":"abcdABC38DE.espeasy|securemode=2,signmethod=hmacsha256,timestamp=1657367540773|", "username":"espeasy&abcdABC38DE", "mqttHostUrl":" iot-06z0000000iqthe.mqtt.iothub.aliyuncs.com ", "passwd":"<some 64 byte password>","port":1883}

p.s. I also tried to reduce the string length of "clientId" and "passwd", but I still failed.

TD-er commented 2 years ago

Have you checked the "Use Extended Credentials" checkbox on the controller page?

eznas commented 2 years ago

Have you checked the "Use Extended Credentials" checkbox on the controller page?

I tried both options, but both failed.

eznas commented 2 years ago

Hi TD-er, thanks for you reply, I sent you the real param to your gmail address, please check the email.

eznas commented 2 years ago

I tried both, but both failed.---- Replied Message @.>Date07/15/2022 14:54 @.> @.**@.>SubjectRe: [letscontrolit/ESPEasy] Failed to connect MQTT on aliyun IOT server (Issue #4135) Have you checked the "Use Extended Credentials" checkbox on the controller page?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/letscontrolit/ESPEasy/issues/4135#issuecomment-1185236180", "url": "https://github.com/letscontrolit/ESPEasy/issues/4135#issuecomment-1185236180", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

TD-er commented 2 years ago

I received your email and will look into it. I think it may be hard to increase the client ID length in the settings file, but I have an idea which may work around it as the field there does support using system variables. But then we need to have support for string variables, which was already on my todo list :)

eznas commented 2 years ago
    TD-er, I think the string length is not the only problem to make the logging failed. Because the second param in my last email also failed to login. I will very happy to wait the solution, thanks for your reply again!brseznas---- Replied Message ***@***.***>Date07/17/2022 16:17 ***@***.***> ***@***.******@***.***>SubjectRe: [letscontrolit/ESPEasy] Failed to connect MQTT on aliyun IOT server (Issue #4135)

I received your email and will look into it. I think it may be hard to increase the client ID length in the settings file, but I have an idea which may work around it as the field there does support using system variables. But then we need to have support for string variables, which was already on my todo list :)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/letscontrolit/ESPEasy/issues/4135#issuecomment-1186442051", "url": "https://github.com/letscontrolit/ESPEasy/issues/4135#issuecomment-1186442051", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

eznas commented 2 years ago
    Hi TD-er,When I tried to connect mqtt server inarduino, I found the same problem. And I finally find the solution. I need to update 2 values in header file:MQTT_MAX_PACKET_SIZE = 1024; // Default: 256MQTT_KEEPALIVE = 60; // Default: 15, need to between 30 - 1200sAfter done this, I could successfully connect to aliyun mqtt server!But I can not find relative setting on ESPEasy. brs, eznas---- Replied Message ***@***.***>Date07/17/2022 17:56 ***@***.***> ***@***.******@***.***>SubjectRe: [letscontrolit/ESPEasy] Failed to connect MQTT on aliyun IOT server (Issue #4135)

    TD-er, I think the string length is not the only problem to make the logging failed. Because the second param in my last email also failed to login. I will very happy to wait the solution, thanks for your reply again!brseznas---- Replied Message ***@***.***>Date07/17/2022 16:17 ***@***.***> ***@***.******@***.***>SubjectRe: [letscontrolit/ESPEasy] Failed to connect MQTT on aliyun IOT server (Issue #4135)

I received your email and will look into it. I think it may be hard to increase the client ID length in the settings file, but I have an idea which may work around it as the field there does support using system variables. But then we need to have support for string variables, which was already on my todo list :)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/letscontrolit/ESPEasy/issues/4135#issuecomment-1186442051", "url": "https://github.com/letscontrolit/ESPEasy/issues/4135#issuecomment-1186442051", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

tonhuisman commented 1 year ago

Is this still relevant? If not it should be closed.