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

How to debug paho mqtt? #15

Open
BKDruby opened this issue Jun 15, 2021 · 1 comment
Open

How to debug paho mqtt? #15

BKDruby opened this issue Jun 15, 2021 · 1 comment

Comments

@BKDruby
Copy link

BKDruby commented Jun 15, 2021

I have the next code:

    client = PahoMqtt::Client.new
    client.ssl = true
    client.persistent = true
    certificate = 'mqqt-certificate.pem.crt'
    key = 'mqqt-private.pem.key'
    root_ca = 'cacert.pem'
    client.config_ssl_context(certificate, key, root_ca)
    client.connect("someserveramazonaws.com", 8883) #, 60, true, true)
    
    client.add_topic_callback("selfmon/vmod.01a/vrio/outputs/#") { |packet| puts "Specific callback for #{packet.topic}" }
    client.publish("selfmon/vmod.01a/vportal/vrio/outputs", "999999,unset", false, 1)

client.connected? return true

publish command return 0 and I don't receive any in the topic callback and don't see any changes through mqtt explorer on this server.

Where I can find some logs of it? because I don't receive any error and not sure that 0 result unexpectable or not.

Please help me with it. Thank you.

@BKDruby
Copy link
Author

BKDruby commented Jun 15, 2021

BTW Do I have the possibility to get a list of available topics?

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

1 participant