i want to read a message from a mqtt topic.
Posting with this:
m:publish("Led","hello",0,0, function(con) print("published") end)
Is no problem but how can I read messages of the topic?
m:subscribe("Led",0, function(conn) print("subscribe success") end)
m:on("message", function(conn, topic, data)
print(topic .. ":" )
if data ~= nil then
print(data)
end
end)
Throws nothing back, but there are messages on the topic?!
Greetings from Germany
Joshua