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

multiple subcribe #19

Open
alex206cc opened this issue Dec 5, 2018 · 4 comments
Open

multiple subcribe #19

alex206cc opened this issue Dec 5, 2018 · 4 comments

Comments

@alex206cc
Copy link

hi, sorry my english ... but how do I make multiple subscribers? moreover in case of user and password on the mqtt server how are they set?

thank you

@i-n-g-o
Copy link
Owner

i-n-g-o commented Dec 6, 2018

you should be able to subscribe to many topics:

myMqtt.subscribe("topic1");
myMqtt.subscribe("topic2");
myMqtt.subscribe("topic2");

see example mqtt_sub

how you set user/password on the server probably differs from server to server... so you would need to look into how to do that with the mqtt-server you use.

hth.

@alex206cc
Copy link
Author

not on server but on sketch... ;-) i'am use home assistant and with other library for mqtt the publish is ok but no the subscribe.
with your library not function publish and subcribe....
can you halp me?

@alex206cc
Copy link
Author

i found .setUserPwd ...

@i-n-g-o
Copy link
Owner

i-n-g-o commented Dec 6, 2018

yes, you can user and password like that.

hard to say what is going wrong with publish ans subscribe.

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