mqtt-to-influxdb-forwarder icon indicating copy to clipboard operation
mqtt-to-influxdb-forwarder copied to clipboard

subscribing multiple topics

Open ekkljs opened this issue 6 years ago • 3 comments

Can you help me to subscribe multiple topics? For example, "home/temp", "office/temp"

Thank you!

ekkljs avatar Apr 29 '19 04:04 ekkljs

Hi,

i believe you can simply give the --topic switch multiple times. I do not remember the exact name, but just give the switch multiple times!

Michael

Am 29. April 2019 07:11:57 OESZ schrieb ekkljs [email protected]:

Can you help me to subscribe multiple topics? For example, "home/temp", "office/temp"

Thank you!

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mhaas/mqtt-to-influxdb-forwarder/issues/4

mhaas avatar Apr 29 '19 06:04 mhaas

Hi Michael,

Thanks for the reply!

Actually I have no background on programming so I made it working by copying and paste. I have tried followings and none of them worked.

  1. client.subscribe("home/#", "office/#") 2.client.subscribe("home/#") client.subscribe("office/#")

Sorry for my ignorance. What that means by giving the --topic switch multiple times? Thank you.

ekkljs avatar Apr 29 '19 07:04 ekkljs

Never mind. Figured it out. Thank you!

ekkljs avatar Apr 30 '19 00:04 ekkljs