Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 4 #116

Open
bbartling opened this issue Nov 7, 2022 · 1 comment
Open

error 4 #116

bbartling opened this issue Nov 7, 2022 · 1 comment

Comments

@bbartling
Copy link

Is it possible to publish only....for example:

mqtt.subscribe("home/mytopic")

then I am trying this below to publish people count and a cameras frames per second to the pub sub:

pub_string = f"home/people/{people}/fps/{current_fps}"
print("PUBLISH TO MQTT BUS: ", pub_string)
mqtt.publish(pub_string)

And I get this error 4, sorry not not an MQTT expert so any tips appreciated:

Error 4 subscribing to topic: home/mytopic
PUBLISH TO MQTT BUS:  home/people/0/fps/33.3363
Error 4 publishing topic home/people/0/fps/33.3363
PUBLISH TO MQTT BUS:  home/people/1/fps/29.8179
Error 4 publishing topic home/people/1/fps/29.8179
@Sohaib90
Copy link
Collaborator

Sohaib90 commented Jan 12, 2023

Error 4 is usually a Connection Refused: Bad username or password

you can also have a look here for error codes:
https://www.vtscada.com/help/Content/D_Tags/D_MQTT_ErrMsg.html

So I think you might have to check when your client makes a connection to the broker. Usually it can also be that the broker requires tls/ssl encryption and it is not provided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants