-
Notifications
You must be signed in to change notification settings - Fork 2
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
Mqtt user e password #4
Comments
In the script file, before client.connect, specify your user and password: |
Hello I looked at ospiLCD-mqtt.py file but there is no client.connect entry |
Look at the script here on GitHub: line 257 |
like this ? === Setup MQTT client, actions ===client = mqtt.Client() and then ?? Set MQTT info (defaults to localhost, if MQTT server is running on Pi)mqttAddress = "127.0.0.1" |
As I wrote initially, I believe the user and password need to be specified
BEFORE the client.connect function is called.
…On Thu, Jul 28, 2022, 14:17 wifi75 ***@***.***> wrote:
Look at the script here on GitHub: line 257
<https://github.com/sirkus7/ospiLCD-mqtt/blob/5b49e6231511e70617166fa3629119d87ad4cb71/ospiLCD-mqtt.py#L257>
like this ?
=== Setup MQTT client, actions ===
client = mqtt.Client()
client.on_connect = mqtt_connect
client.on_message = mqtt_message
client.connect(mqttAddress, mqttPort, 60)
*client.username_pw_set("user", "password")*
client.loop_forever()
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR4MLBHPGEUY7FAVHJ5UICLVWJ235ANCNFSM54WFMA2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
ok like this:
but also this is ocrrect?
I tried like this but after running the scrip it gives me an error:
|
Hello How I can set user end password line in configuration file?
The text was updated successfully, but these errors were encountered: