5 Replies Latest reply on Jan 12, 2015 11:25 AM by hughbod RSS
    hughbod Newbie

    Properties not updating after programmatically creating Thing

    I'm trying to automatically create a Thing using either the .NET SDK or a server-side script so that we don't have to manually create Things using Composer.

    I'm calling

    CreateThing()

    on EntityServices, then

    EnableThing(), RestartThing()

    , and

    SetIdentifier()

    on the Thing I just created. The Thing's Connectable property

    isConnected

    is being set to true, and I can successfully call generic services on the Thing, but other properties won't update and I can't call custom services. This also happens if I create a Thing in Composer without an identifier, then call

    SetIdentifier()

    . If I attempt to set the value of a property or call a custom service in Composer, I get the exception "The given key was not present in the dictionary". Restarting the SDK client doesn't fix it.

    If I create the Thing in Composer (defining a Name, Thing Template, and Identifier before clicking Save), or I edit a programmatically created thing in Composer and save without making changes, everything works. The issues only seem to happen if I manually set the identifier of a Thing that was created without an identifier.

    What additional steps are needed to make a programmatically created Thing's custom properties and services work properly?

     

     

    UPDATE:

    This issue was fixed by updating the server to 5.3 SP1. No client updates were needed. Thanks guys!