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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Publishing data to the device?

scity
1-Newbie

Publishing data to the device?

ThingWorx has made it very easy to get data from the device, but I have been facing difficulty in the platform-to-device communication. For example, I can get a reading from one of the devices connected. But I am clueless as to how to send messages to any device connected to the platform?

1 ACCEPTED SOLUTION

Accepted Solutions
scity
1-Newbie
(To:scity)

Finally, I have found how to make it work. Services, defined on the thing side, and then called from the thingworx platforms does the job.

View solution in original post

5 REPLIES 5

First, let's clarify what "sending a message" means. It can be

  • a property setting on the device
  • load a file on the device
  • call a device service
  • remote desktop session
  • etc.

All of the mentioned cases are covered well by examples of the C SDK. If you could tell how you connect your device (EMS? REST? SDK?) and what you want to achieve it will be easier to show you how to do this.

'Sending a message' for me is : 1. A property setting on the device, and 2. Call a device service.

It would be very convenient for me not to use SDKs if possible.

scity
1-Newbie
(To:scity)

I apologize for not being explicit. Here's the complete scenario:

We have a thing (raspberry pi) which is connected to the ThingWorx platform and is running one of the nodejs thing-agent files. It was very easy for me to get data. (in fact, it was already in the default nodejs file)

Now, I want to do something of this sort. In my mashup I want to have a button. 1.) Upon clicking, the button should ask the device to send it the required values ( which the raspberry gets from sensors and other devices connected to it) 2.) It should, upon clicking some other specific button, it performs another action which I will define in the nodejs script running on the device.

Thanks.

scity
1-Newbie
(To:scity)

Finally, I have found how to make it work. Services, defined on the thing side, and then called from the thingworx platforms does the job.

Hi there, I'm facing the same problem. I want to run a code script on raspberry pi by clicking a button on thingworx mashup. Unfortunately I didn't understand your solution. Can you explain it more clearly?

Thank you

Top Tags