MQTT

Here we can discuss about the problem found
Post Reply
N7QWT
Posts: 6
Joined: Fri Feb 19, 2021 4:03 am

MQTT

Post by N7QWT »

I'm having issues 1.43.2 returning more than 2 of the 6 subscriptions in my program.
Sometimes the data gets crossed from one subject that's not showing to one that is, and the 2 subscriptions I do get change when I restart the program.
Using windows clients on 2 other computers I get the all the subscriptions data without issues.

Code: [Local Link Removed for Guests]

' MQTT test program
' Using my mosquitto test server
server$="mqtt.local"
login$="*******"
pass$="******"

wlog "Server "; mqtt.setup(server$)
wlog "Login "; mqtt.connect(login$, pass$)

onmqtt mqtt_msg

wlog "Subscribe "; mqtt.subscribe("goplug/amp")
wlog "Subscribe "; mqtt.subscribe("goplug/volt")
wlog "Subscribe "; mqtt.subscribe("goplug/temp2")
wlog "Subscribe "; mqtt.subscribe("goplug/wh")
wlog "Subscribe "; mqtt.subscribe("goplug/rapi/out")

wlog MQTT.Publish("goplug/rapi/in/$GU","")

wait

' receive messages from the server

mqtt_msg:
  wlog "Topic "; mqtt.topic$
  wlog "Message "; mqtt.message$
return
Post Reply