mhaas / mqtt-to-influxdb-forwarder

IoT MQTT to InfluxDB forwarder
GNU General Public License v3.0
46 stars 12 forks source link

subscribing multiple topics #4

Open ekkljs opened 5 years ago

ekkljs commented 5 years ago

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

Thank you!

mhaas commented 5 years ago

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 notifications@github.com:

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

ekkljs commented 5 years ago

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 commented 5 years ago

Never mind. Figured it out. Thank you!