Sonoff "mini" with Tasmota 6.5.0 seems to have a problem with MyQttHub


#1

The data i configured:


#2

Host:
node02.myqtthub.com
-> pingable from my Computer …

Port
1883
-> telnet node02.myqtthub.com 1883 gives me an answer…

Client:
DVES_C94AA2
-> Doesn’t matter for connection fail or not i.m.o.

Username:
sonoff-mini
-> Correctly …

Password:
**********
-> Correctly too

…i also tried it with hub-[MY_USERNAME].myqtthub.com (as pre-defined in the User Account Web GUI) but

a.) hub-[MY_USERNAME].myqtthub.com it NOT pingable b.) telnet hub-[MY_USERNAME].myqtthub.com 1883 does not give an anwser.

Why? So where is the problem??

Thank you for your feedbacks.

With best regards,
Jan


#3

I can’t see any error respectively what i’ve done wrong when i read here:

???


#4

Maybe it’s not compatible with Tasmota (for the ESP chips from Espressive) 6.5.0??


#5

Does nobody know how to solve that problem?

Thank you very much for your feedbacks. :slight_smile:

With best regards,
Jan


#6

Hello Jan,

What’s the error you are receiving? Everything seems to be correctly configured…

Just confirm “telnet node02.myqtthub.com 1883” should always work. But it also

has to work from the Sonoff device itself (not only by a laptop or destkop right on the

same network). Maybe the error you are getting might give us a clue.

Test you are running: hub-[MY_USERNAME].myqtthub.com should NOT work as it is

not the intented way of working.

Let’s us know the error you are receiving,

Best Regards,


#7

Similar problem with the MQTT testclient from https://github.com/thomasnordquist/MQTT-Explorer/releases/tag/v0.3.5 :

Why?

Thank you for your feedback.


#8

Hello Ricardo

Sry. i didn’t saw your anwser. No, also when i use node02.myqtthub.com it doesn’t seem to work…

But

a.) i can ping node02.myqtthub.com

b.) i can telnet node02.myqtthub.com 1883 …

…and, so i already said, the “MQTT Explorer” also can’t establish a connection to node02.myqtthub.com.

I tried:

Servers:

  • node02.myqtthub.com
  • hub-[MY_USERNAME].myqtthub.com -> but this is wrong so you told me (i tested it and it’s not pingable and no service on the port)

Username:

  • Account username firstname.lastname
  • Account e-mail-address firstname.lastname@gmx.net
  • With / without encryption
  • With / without “validate certificate” flag in “MQTT Explorer”

-> Have the different entries in https://node02.myqtthub.com/devices all their own username (-> clientID??) or du i just need to use the account general username and/or mail address?


#9

@Support:

You can test it by yourself.

Just write me a mail to the mail address associated with my account, then i can mail you my mqtt password. Thanks.


#10

What is “Enable SCI Auth” ??


#11

And “Skip replace” doesn’t make any differences…


#12

OK -> How to use SCI Auth -- Simple Client-ID autentication to connecto your MQTT Devices to MyQttHub.com


#13

Hello Jan,

Everytime you receive a “Connection refused: server unavailable”, it might mean you are using
a combination of clientId+userName+password that is wrong (or not registered at your HUB). That
includes SCI Auth (which is a single clientID) [1] or bootstrap credencials [2]. It’s all the
same.

[1] How to create and manage your MQTT devices with MyQttHub.com
[2] Using MQTT bootstrap auth to authenticate devices without knowin clientID beforehand

This is because the way MQTT connect error codes work. You have several examples that look confusing too when using mosquitto (see point 4):

Also mention Skip Connection replace [3] has nothing to do with authentication problems (the
problem you have) but how are replaced sessions for devices using same credentials. This is
broadly documented there [3]:

[3] Connecting several devices with same credentials (how to avoid MQTT connection replace, connection replacement)

Looking at the screenshot, I see you are using a device configuration (clientId+userName) that does
not exists in your HUB. It cannot work. The same happens with same screenshot: clientId
DVES_C94AA2 does not exists in your HUB.

This also confirms logs:

MYQTT: 03-08-2020 13:58:25 INFO  Auth failed for clientId=DVES_C94AA2, userName=Some(sonoff-mini), result=None

That does not exists. It cannot work.

2. How to configure your SonOff:

Follow next indications and double check you are following all steps and indications:

  1. First, create a credential that is only used by your SonOff device. Do not reuse same credentials (clientId+userName+password) for several devices unless you know what you are doing:

    How to create and manage your MQTT devices with MyQttHub.com

    This process will create you a: clientId, a userName and a password. These three elements
    identifies your device. If you change them, you are talking about a different device.

  2. In case you can’t configure a clientId in your device, which is not your case, you can also use
    bootstrap credentials. Just for your lecture, because it might be interesting if you plan to configure
    several devices. You have documentation on how to use them on next link, how they work, and why this feature exists as well as regular
    device management:

    Using MQTT bootstrap auth to authenticate devices without knowin clientID beforehand

  3. Once you have these credentials, configure them as follows:

    clientId: place here your device clientId as created in step (1)
    userName: the same, configure here the user name you have just created
    password: same
    server: node02.myqtthub.com
    protocol: mqtt
    port: 1883

    IMPORTANT NOTE: do not mix values from different devices. It will not work. Every device has a unique triplet that uniquely identifies it during login process: a clientId, a userName and a password. The way you achieve that might differ (using regular device management, or SCI auth or bootstrap credentials) but at the end you have devices identified by a unique clientId in your HUB, that needs authentication (userName+password, or clientId bootstrapped, or SCI auth).

Note we recommend configuring everything with TLS but you can start without it and then progress.

3. Important security note

After you finish all your testing, change credentials (clientIds and userNames). On our side, once everything is working and configured, we will blur all sensitive information.


#14

Hello Ricardo

Thank you very much - now i know that more than the 2 things “password & username” must equal from client->server (or vice versa); now i’ve created a new entry with clientId DVES_C94AA2 and now the connection errors seems to be gone…

Will look tomorrow closer…

And: I tried to rename the existing entry with wrong name to DVES_C94AA2… that didn’t work:

Unbenannt

…but deleting the old one, then creating a new one solved my problem!


#15

AND: How do i need to configure the “MQTT Explorer” ?

node02.myqtthub.com/DVES_C94AA2 does not work …

(Now i enabled “skip connection replace”, because i have more than 1 client - sonoff AND “MQTT Explorer” … )

Thank you for your feedback.

With best regards,
Jan


#16

Hello Jan,

To configure MQTTexplorer, see:


#17

Oh… there i need to define the clientId? Thank you very very much! :slight_smile:

Now i’ve tested it with both ways - secure and unsecure. And both ways are working:

Secure needs that config:

  • Port 8883
  • “Validate certificate” ON (just disable it if you get certificate errors - but i think myqtthub.com ensures that the certificate is valid…)
  • “Encryption (tls)” ON (necessary in every case if you want a secure connection!)

Unsecure needs that config:

  • Port 1883
  • “Validate certificate” OFF
  • “Encryption (tls)” OFF

So i can confirm that it works now with that configuration! :slight_smile:

Best regards,
Jan