0

MQTT payload includes ALL Tags of view, want to create one topic for each Tag

Hi. When i publish data coming from a view, using jsonmqtt, via publisher, i am getting one topic on the MQTT Server including all datapoints.

Is there a configuration possibility to publish datapoints to single topics?

I want to get 500 topics when the view have 500 datapoints listed

5 replies

null
    • smason
    • 4 mths ago
    • Reported - view

    Hi ,

    You can drill all the way down the tagpath excluding the tag name. In that case, each tag would need to have a unique branch above it in order to publish a single tag on a single topic. Now, having said that, we've never tested this many publisher sessions. I don't know how it would handle 500 sessions. Can I ask what the use case is for having a single tag per topic?

      • kullmann
      • 4 mths ago
      • Reported - view

      Of course. We're trying to get Nodered connected to Canary to get some more calcpower to canary. Using MQTT, Nodered get new triggers every time a value changes. As of now, we're receiving a big structure and then? Need to build some ugly solution within Nodered to distribute messages between Flows :-(

      Honestly, i like more the idea to have a node connecting direktly via webapi, like the free Osi-Webapi Nodes. maybe some of the experts here have already invented that wheel :-)
       

      Btw: We're talking about 20.000 tags. I guess that will kill the publisher when we setup that amount of sessions, and it is super ugly as well :-)
       

      • smason
      • 4 mths ago
      • Reported - view

      Thanks for the info. 20k tags would be rough for sure and probably not feasible. If you want, you could leave a feature request: https://helpcenter.canarylabs.com/category/data-connectivity. That way we have it documented.

    • travishunt23
    • 9 days ago
    • Reported - view

    I would add that this would benefit publishing into an existing MQTT topic space. If I already have a structure like "enterprise/site/line1/“ it would be useful to publish asset tags such as "line1.boiler.temperature" and "line1.production_counter" into that same hierarchy.

      • smason
      • 7 days ago
      • Reported - view

      Hi ,
      You could publish data to a topic that already exists, but there is a potential to create a loop if you are already subscribed to the topic for logging data into the Historian. You would need to create some sort of logic within your script if using the JSON payload in the MQTT Collector if you don't want to log the tags you are trying to publish back to the topic.

Content aside

print this pagePrint this page
  • 7 days agoLast active
  • 5Replies
  • 26Views
  • 4 Following