Page 1 of 1

MQTT Multi-Topic subscribe

Posted: Tue Jul 24, 2018 6:15 pm
by guyd
Hi,
I wish to subscribe ( as in "regular" Python ) to several topics, when # as wildcard will not solve, for example:
Home/Windows/#
Home/Light/#

but not to :
Home/# ( which includes many more ).

In Python a list of topics can be defined as TOPICS=[(top1,qos1),(top2,qos2)]
Using same method in MicroPython does not apply.

Any leads?

Re: MQTT Multi-Topic subscribe

Posted: Wed Jul 25, 2018 4:45 am
by pythoncoder
You can answer these questions by taking a look at the source code and by examining the examples provided. It's a "micro" implementation. You need to issue a subscribe command for each topic.

Re: MQTT Multi-Topic subscribe

Posted: Wed Jul 25, 2018 4:52 am
by guyd
Hi,
Thank you for answering.
Didnot see in examples multiple subscriptions- but I'll give it a try.

Guy