Mosquitto Websockets delays


#22

I don’t know your setup, but as I said, you have misconfigured stuff, so any detail could have prevented it from working. If you correctly configure loraserver and lora-app-server to connect via tcp and your js client via websockets, you should be fine.


#23

This is what I see from log lora-app-server; it’s the downlink message sent from javascript client:

time="2018-08-07T16:32:21+02:00" level=info msg="downlink device-queue item handled" confirmed=true dev_eui=0102030405060708 f_cnt=1

As far as python client, what I see into the log file is the following:

level=info msg="downlink device-queue item handled" confirmed=true dev_eui=0102030405060708 f_cnt=0

I see that the f_cnt for python is zero, while for javascript is 1.


#24

Well, it seems you queued a message from python, then another from js and they both got handled. What’s the problem?


#25

I don’t know…i’m trying every possibility without success. For example now I set python to use websockets on port 9001 client = mqtt.Client(transport='websockets').
Uplink messages are received, but downlink messages to send to device not turn on the lights…
On mosquitto conf I set listener 9001
I’m getting crazy


#26

I meant to say that I didn’t see a problem with what you had posted.

I can’t say what is ok or wrong with your setup because I don’t know it. All I can say is that if you publish a message for downlink over mqtt and it gets added to the device queue (not necessarily sent, at least not immediately), then it works; if not, it doesn’t and you should check relevant logs (from your client, mosquitto, any auth plugin, etc.) to see why it could fail over websockets. If indeed it fails, I’d bet mosquitto logs would be the really useful ones if the clients are able to handle websockets (I know the JS client is at least).


#27

Hi iegomez. I’m able to send command on off to my remote node. Not always the message is received by the node. But I think that is a problem of cooking hacks libraries for Arduino. So the lora server works perfectly