wansti / OwntracksOSM

Owntracks and OpenStreetMap based mapping and location sharing app for Samsung smartwatches
GNU General Public License v3.0
10 stars 6 forks source link

QoS 3? #3

Closed ctreber closed 3 years ago

ctreber commented 3 years ago

Hi,

thank you very much for the Android and Galaxy watch app! On the watch my Moquette broker complains about a MQTT QoS of 3 when I try to connect.

Three?!

Regards,

Chris

Moqutte log output:

20:59:30,202 [nioEventLoopGroup-3-5] ERROR NettyMQTTHandler 111 - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=null, cause=java.lang.IllegalArgumentException: invalid QoS: 3, errorMessage=java.lang.IllegalArgumentException: invalid QoS: 3 20:59:30,203 [nioEventLoopGroup-3-5] ERROR NettyMQTTHandler 111 - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=null, cause=null, errorMessage=null

wansti commented 3 years ago

Hi Chris, glad you're finding my app useful! I'll have a look at the settings. Cheers, Marek

On 13 January 2021 6:59:38 am AEDT, Christian Treber notifications@github.com wrote:

Hi,

thank you very much for the Android and Galaxy watch app! On the watch my Moquette broker complains about a MQTT QoS of 3 when I try to connect.

Three?!

Regards,

Chris

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/wansti/OwntracksOSM/issues/3

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

ctreber commented 3 years ago

Hi Marek,

thank you for reacting so quickly!I

have no experience with watch apps, but realized by looking at the code that it can be done with some not-to-hard-to-understand JS. Pleasant surprise that this is so (relatively) easy.

I have been looking at your code and the code of Moquette. The exception in Moquette simply comes from the fact that there is no QoS of 3 defined, but that value seems to be arriving in the QoS field.

In your code a QoS of 3 is not explicitly set anywhere, as far as I can see. For message encoding you are using the Paho client, so one thinks that this should be working.

Summary: On a first glance, I don't see what is going wrong. I probably will try with a different broker to make sure Moquette is not part of the problem.

ctreber commented 3 years ago

Issue resolved (used Wireshark to see what is going on). The watch app uses Websockets, which I did not use. After switching to Websockets everything is well.

It says so in your documentation (thumbs up). Good example of "read the fine manual" ;-)

ctreber commented 3 years ago

Issue was with the wetware; you may close it. Thanks again!

ctreber commented 3 years ago

Oh, I can do that myself. Showing myself out...