how To handle complex topic uniqueness

Posted on
Sat Nov 09, 2019 1:39 pm
loafbread offline
Posts: 137
Joined: May 25, 2009

how To handle complex topic uniqueness

Looking at your Basic Setup on GitHub (https://github.com/FlyingDiver/Indigo-S ... asic-Setup). I am trying to make a raw payload type work in the Configure MQTT Value Sensor Device dialog. It appears your example duplicated the image for a JSON Payload Type example. Could you repair that? What would the Unique ID Location [Payload Field] Payload Key be for a raw payload?

Thanks

Posted on
Sat Nov 09, 2019 2:34 pm
loafbread offline
Posts: 137
Joined: May 25, 2009

Re

Nevermind about the previous post.
I understand now what the Unique ID is. My MQTT topics are unique as a whole not by one component. My payload is raw, not JSON so there is nothing unique in the payload. For instance I have equipment/host1/a1 and equipment/host1/a2 but I also have equipment/host2/a1. So the topic list as a whole is unique but there is not one component that is unique by itself. How can I satisfy the dialog for a Unique ID Location?

Posted on
Sat Nov 09, 2019 5:34 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: how To handle complex topic uniqueness

Since this is not an issue with a specific release, I moved you posts to a new thread.

I think the best way to handle this is to split the topics by either the host part or the last part into multiple message types at the MQTT Broker. Then at the Shim device you can match on the message type and the other topic component.

So add another trigger on the broker device, and have one trigger for ..../a1 and a different one for .../a2. With different message types. Then in the Shim config, use the host1/host2 component as the unique ID .

I’m traveling without direct access to Indigo, so I can’t do any examples for you.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Nov 21, 2019 3:09 pm
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: how To handle complex topic uniqueness

Ok, thanks. I understand. I can make more triggers.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest