Skip to main content
1-Visitor
March 4, 2019
Question

Binding a remote thing to server side thing

  • March 4, 2019
  • 1 reply
  • 3687 views

Hi,

just wondered if someone could clarify which parameter of the server side thing is used to bind to the remote thing's edge auto bind parameter. Is it the server side thing's name or its identifier that is used for the binding? In the past our server side things have had their identifier parameter and thing name set to the same value so it hasn't been an issue. 

However, now we have a number of different types of remote thing that we wish to connect. Our plan is to have their edge server auto bind parameter use a prefix (AB.xxxxxx & CD.xxxxxx) so we can tell what kind of remote thing it is before we have to create the server side thing. We will use a different thing template depending on what type of remote thing it is.

Some of our remote things' edge servers use the out of box ems with the lua interface but the new ones will be using edge servers created with the C SDK.

Thanks in advance.

K

 

1 reply

1-Visitor
March 4, 2019

Shouldn't be hard to query for unbound remote things (Resources["DeviceFunctions"].GetUnboundRemoteThings(), and create the corresponding thing with the desired template based on the remote thing name. And if you want to have different cloud name vs edge name, you can use the SetIdentifier service on the newly created thing.

khayes11-VisitorAuthor
1-Visitor
March 4, 2019

Hi Carles,

thanks for the quick reply. We do have a service looking for unbound things that runs on a timer event & all of that works fine. The question I'm trying to answer is what are the 2 parameters that have to match in order to make the remote thing binding work. Is it:

edge server auto_bind = server side thing name

or

edge server auto_bind = server side thing identifier

 

Currently the edge auto bind parameter has a prefix 'AB.xxxx' or 'CD.xxxx' depending on the remote thing's edge server. If we see an unbound thing with 'AB' as the prefix we use one template to create a thing, if we see 'CD' we use another. We set the identifier to be say 'AB.xxxx' but the server side thing name is 'xxxx'. I'd always assumed they bound using the identifier parameter.

I'm just trying to confirm  whether it is the server side name or identifier that is used to create the binding to the remote thing.

The reason I ask is that I see the server side things being created, and I can see that they are connected. The problem is none of the remotely bound properties are being updated. I wondered if this might be because the binding to the remote thing is not correct.

Thanks,

K

 

 

1-Visitor
March 4, 2019

You mean that?

  • Thing Name = Remote Identifier --> Remote properties get automatically bound to local properties
  • Thing Name != Remote Identifier --> Remote properties doesn't gets automatically bound to local properties