Thing is showing as created when we run DoesThingExists but unable to display in composer
Pls, help on code which dynamically create a thing and assign new ValueStream also.
The code is as shown:-
var params = {
name: me.name+"-GW" /* STRING */,
description: undefined /* STRING */,
thingTemplateName: "GenericThing" /* THINGTEMPLATENAME */,
tags: undefined /* TAGS */
};
// no return
Resources["EntityServices"].CreateThing(params);
Things[me.name+"-GW"].EnableThing();
Things[me.name+"-GW"].RestartThing();
var params = {
name: "ValueStream_"+me.name+"-GW" /* STRING */,
description: undefined /* STRING */,
thingTemplateName: "ValueStream" /* THINGTEMPLATENAME */,
tags: undefined /* TAGS */
};
// no return
Resources["EntityServices"].CreateThing(params);
var params = {
name: "ValueStream_"+me.name+"-GW" /* THINGNAME */
};
Things[me.name+"-GW"].SetValueStream(params);
Thanks in advance

