Homey Community Forum

Can't get MQTT Broker app to run

app
#1

Feel stupid!
Trying to setup MQTT Broker to Connect Sonoff Tasmota to Homey but I can’t get The broker to start, probably because my setup is wrong.
Can somebody help me please?!
Thanks!

#2

Can you elaborate?

#3

Yes absolutely.
My goal is to Connect a sonoff RF r2 v 1.0, flashed with tasmota, the latest firmware, with homey.
I red that you have to use MQTT so I dowloaded the MQTT Broker-app for Homey, no problem so far.
Then I try to configure the MQTT Broker-app, generated a certificate. But Im not shure what to use for The CommonName and it doesn’t seem to save certificate.
The box where you can start the broker is also greyed out so I defently doing something wrong.
Ofcourse, when I try to Connect the Sonoff device to Homey I just get the answer that The connection was unsuccessfull.

#4

Sonoff Tasmota, out of the box, doesn’t support SSL/TLS connections, so generating certificates for the broker isn’t necessary to get things up and running.

Also, it looks like you first have to save the settings (button at the bottom of the settings screen) before “Start Broker” actually works.

#5

Ok, Thanks so much for your quick responses!!

So, then my problem still remains, I cant get the broker to start. Is it possible to read somewhere how to configure the MQTT Broker? It looks simple but nothing works.
What to use for CommonName for example?

#6

Its kind of frustrating when I managed to Flash The sonoff board with tasmota and now I cant get the flashed tasmota board to talk to Homey.

Thanks for you patience!

#7

If you don’t enable secure connections, you don’t have to deal with certificates. Start simple.

#8

Ok I skipped that for now and just tried to get the broker running but that’s the prolem, I cant get it running, it won’t start!
I tried to save settings but I guess my settings are wrong or what do you think?
Do I have to do something else to get the broker to run?
No matter what I do it says “Broker is not running”

#9

Can you make a screenshot of the settings that you have now?

#10

There is not much too look at but the weirdest part is that suddenly the logs says that it’s up and running, so weird!
Ok I’ll try to connect with the sonoff now and see if it works!
Thank you so much for you help! I feel so stupid!

#11

Perhaps using the same port for secure and unsecure is causing problems (although secure connections are disabled, but who knows). The port to use for unsecure connections is 1883, for secure connections it should be 8883.

#12

Yes maybe, ok great I’ll have that in mind in the future. But if I want to use a secure connection with tasmota I have to do some other configurations with the sonoff device or?!

#13

To enable encrypted connections (TLS/SSL) with Sonoff Tasmota, you need to compile your own firmware. The only thing that’s relatively easy to do is to enable authentication by adding a user/password combo to the MQTT Broker settings and configure Sonoff Tasmota to use it (however, that is not considered to be a “secure connection”).

#14

Still I don’t get a connection, is it honeys ip adress I write in the upper field?

#15

Yes, that should be Homey’s IP address. You can also use 127.0.0.1, because both the Sonoff app and the MQTT Broker are running on the same hardware.

#16

Ok sweet, I’ll try that. Haven’t got the Homet IP adress yet

#17

Couldn’t get it to work with the address you gave me so I’ll try the adress to Homey I found under settings and about in Homey

#18

Hm,
Thanks to you at least I get Homey to look for the sonoff device. But when it tells me to reboot the device I like to pair it just won’t find it, it says network failure.
Do you if I should do something else or different?!

#19

Did you configure the MQTT settings in the Sonoff Tasmota firmware? Otherwise the device has no idea where to send its data to.