mwarning / trigger

Android app to lock/unlock/ring doors. Supports generic HTTPS/SSH/Bluetooth/MQTT and Nuki Smartlock.
GNU General Public License v3.0
134 stars 22 forks source link

MQTT credentials are ignored #38

Closed JochenFriedrich closed 4 years ago

JochenFriedrich commented 4 years ago

The MQTT credentials currently aren't used at all.

mwarning commented 4 years ago

Hi,

do you mean specific credentials setup fields, or is it not working at all? I remember to have tested it with a Mosquitto MQTT server at some point. But in general the code lacks testing. The code in question is here: https://github.com/mwarning/trigger/blob/master/app/src/main/java/com/example/trigger/mqtt/MqttRequestHandler.java

JochenFriedrich commented 4 years ago

I mean userid and password setup fields. It looks like they need to be passed using opts.setUserid() and opts.setPassword() before calling client.connect(opts).

mwarning commented 4 years ago

You are right. Those fields were not set.

I hope this fixes it: https://github.com/mwarning/trigger/commit/36c97dfe081af6baec2a631bf4c493cb74834f8d

Can you test it?

JochenFriedrich commented 4 years ago

Many thanks. Looks good.