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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How can I send messages to azure iot hub?

mvolanti
7-Bedrock

How can I send messages to azure iot hub?

Hi,

I want to send messages from thingworx to iothub-thing (device).

I installed correctly the azure iot connector and I can read messages from edge devices.

I need to send message from thingwox  as JSON like this:

{"Id":"0x02","Type":"Command"}

How can I do this????

Thanks

2 REPLIES 2

I am not sure of the best way to do this, but if your other server has a public rest api, you could make a call from a ThingWorx service using the PostJSON code snippet.

Seems like you may have to just add the property you wish to update as a remote property on your thing and then you can just update it on the Platform, and this will push it to the edge device. Check out page 61 of the ThingWorx Azure Connector Installation and Operations Guide.

Hope this helps at all!

it is not exact match but you can send a following message:

{

"msg": {

"Id":"0x02","Type":"Command"

}

}

by using ConnectionServicesHub.writeAzureProperty(devId, "msg", value). Value could be a JSON object or an Infotable

Top Tags