Closed zt190 closed 1 year ago
Hi @zt190 ,
please note that the error message Connection Refused, not authorized
is from the CONNACK
packet handler with rc=5, which means your issue is not about the MQTT library or MQTT protocol, but about authorization on the connected broker.
So please check your username, password, IP whitelisting on the broker, connection and authorization policies, and whatever is related.
So this is not a luamqtt issue.
Hello, I am currently working on a project involving Teltonika devices, specifically with smart meters. The objective of this project is to retrieve meter readings and transmit the data to the Azure portal. When I am trying to publish a message to Azure portal with the help of mqtt in Lua language but I am getting the "Connection Refused, not authorized" . I am referring this document https://github.com/xHasKx/luamqtt. I have used the same credentials for sending the data to Azure in python language and the python script is working. I am using the Lua 5.4 version and below is my lua script