cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Thingworx platform events subscriptions (i.e. new device connected to the platform)

Highlighted
Newbie

Thingworx platform events subscriptions (i.e. new device connected to the platform)

I am wondering whether there is any way (either in Composer or in server extension) to execute logic (handle event) which is coming from the Thingworx itself and moreover - is there any list of such events that we can subscribe somehow - maybe it is not possible at all?

Events I have in mind for example are:

1) New device has been connected to the platform (unbound)

2) Device is bounded

3) User created

4) User added to group

etc.

Thanks in advance for quick feedback!

Best Regards

Tags (2)
5 REPLIES 5

Re: Thingworx platform events subscriptions (i.e. new device connected to the platform)

I don't think so.

But you can implement it if you want, with a Timer which checks everything you want to check ( each minute or so ) and triggers the corresponding event, it's not so efficient but it will work.

Re: Thingworx platform events subscriptions (i.e. new device connected to the platform)

Yeah I am aware of this approach but it will be extremely insufficient from performance perspective.

I am preety sure that 'under the hood' Thingworx is handling this kind (i.e. device connectivity) with event-based architecture, but unfortunatelly it does not expose anything via composer nor API.

Thanks Carles!

Re: Thingworx platform events subscriptions (i.e. new device connected to the platform)

You should be able to do this by creating a data change event subscription to the isConnected property on a remote thing, then ensuring that the isConnected property is true (and not false) before executing the service script which creates a user. You could also call a remote service in this way in order to update information on the edge once the device is fully connected. Be sure to upgrade to the latest SP of ThingWorx for this as there were some bugs fixed in recent releases (see this KCS article for one such example)

Re: Thingworx platform events subscriptions (i.e. new device connected to the platform)

Tori, this is not something that I expect.

I would like to handle event when edge is registrering new device (unbounded).

On the other hand, I would like to handle event when new user is created in the system.

On the other hand again, for example, I would like to handle event when any user has been added to Administrators group.

Use cases are countless, I am just wondering whether platform gives ability to handle such "internal" mechanics.

Re: Thingworx platform events subscriptions (i.e. new device connected to the platform)

Oh, I see what you are saying now. I am not sure if this is possible. I'll do some digging and see what I can find out, and hopefully someone with more experience on this can comment here in the meantime.