[SOLVED] MQTT sonoff device cannot connect to broker rc 5

This is what the _changelog files says:
6.4.1.1 20181224
I compiled the code my self, because I changed something in the interlocking code so that I can use it for roller shutters. (directly flipping between up and down).

Another strange thing is happening:
when I do “sudo systemctl restart mosquitto” I get the error:
MQT: Connect failed to 192.168.1.14:1883, rc -2. Retry in 10 sec
So rc=-2 instead of rc=5.
This error then occurs for both devices .
When I then run “sudo mosquitto”.
Both devices are getting a connection to the mosquitto broker.
There problem here is that error is getting back when I restart my ubuntu system.

That sounds a bit like the connection problems I observed with version 6.4.
Reverted back to 6.3.0 (build 2018.10.30 17:39:28 / Core-/SDK-Version 2_3_0/1.5.3(aec24ac9))
Although I had those problems on all my sonoff devices!

I had the same Problems with 6.4.1. and finally i went flashed my sonoff back to 6.4.0 with Core Version 2.4.2.

You can use the 6.4.0 firmware for shutters too. I have 16 sonoff T1 working in this configuration as a shutter switch.

I also used core 2.5.0 I am now trying to get it back to 2.4.2.
For the shutters I know, I changed it so that if the up switch is active and I then I press the down switch it will not only stop, but it will do down too.
I now remember vaguely that with the first switch it did not work in core version 2.5.0, so I changed to 2.4.3. My computer crashed in the meanwhile, so I had to reinstall everything. I will let you know if that will solve the problem

This is definitely working in 6.4.0.3 with 2.4.2 Core Version.

I did it with SetOption14 1.

Hi, only going back to 2.4.2 Core did not work.
I will now try with version 6.4.0.3

I now used 6.4.0.3 but it still does not work. While the other T1 device is working with 6.4.1.1.

No idea what the problem can be.

But why does it work when I start mosquitto manually?

Is the hue Emulation working?
Might be a possibility?

Patrick, what is the heu Emulation?

The sonoff can emulate a hue device.

With the hue binding you can add and control this device without using mqtt.

The sonoff can emulate a hue device.
With the hue binding you can add and control this device without using mqtt.

Found the problem: I always logged in without a user name on my mqtt broker, but I had configure a user name with password. I also had the option allow_anonymous to true. So it is possible to login without a user name. But since it is not possible to NOT use a user name in tasmota ( it is always has a default name), it was asking for a password, which I did not fill.
When I filled in the correct username and password everything worked fine.!

Thanks for all the Help and Time !!

By the way it is also working with 6.4.1.1 with core version 2.4.2 ( i did not test it with 2.5.0 yet)

Sounds good. :slight_smile:

Have you tested it yet with core Version 2.5.0?

I just tested it for you,downloading was possible, but it did not work and i could not find it in my router.
Could be that I have done something wrong, I am now backt 2.4.2 and it is working again.

How do you set the software to interlock for use with shutters, I could not find it so I hard coded it.