Is there a better package to publish to Aws Iot Core than AWSSDK.Iot using C#?2019 Community Moderator ElectionIs there a better alternative than this to 'switch on type'?WCF Guid DataMember not Serialized properlyTo add custom data attributes in pushnotification using Amazon SNSAWS CloudWatch GetMetricStatistics returns 0 datapointsAws Iot Rule republish to a dynamic topicWhat would be the AWS equivalent to Firebase Realtime Database?AWS IoT and Lambda RuleHow to publish to iot stream from lambdahow to control aws iot devices remotely using aws iot jobsAWS Lambda publishing to IOT Topic fires indefinitely
Why are there no stars visible in cislunar space?
CLI: Get information Ubuntu releases
UK Tourist Visa- Enquiry
Knife as defense against stray dogs
Unfrosted light bulb
What will the Frenchman say?
Recursively updating the MLE as new observations stream in
Print a physical multiplication table
Emojional cryptic crossword
What is the difference between something being completely legal and being completely decriminalized?
Why doesn't the chatan sign the ketubah?
Why is this tree refusing to shed its dead leaves?
How can a new country break out from a developed country without war?
How to find the largest number(s) in a list of elements?
Was World War I a war of liberals against authoritarians?
Air travel with refrigerated insulin
Why does Surtur say that Thor is Asgard's doom?
Determine voltage drop over 10G resistors with cheap multimeter
Why is participating in the European Parliamentary elections used as a threat?
What are the rules for concealing thieves' tools (or items in general)?
label a part of commutative diagram
How to read string as hex number in bash?
How can I create URL shortcuts/redirects for task/diff IDs in Phabricator?
PTIJ: Which Dr. Seuss books should one obtain?
Is there a better package to publish to Aws Iot Core than AWSSDK.Iot using C#?
2019 Community Moderator ElectionIs there a better alternative than this to 'switch on type'?WCF Guid DataMember not Serialized properlyTo add custom data attributes in pushnotification using Amazon SNSAWS CloudWatch GetMetricStatistics returns 0 datapointsAws Iot Rule republish to a dynamic topicWhat would be the AWS equivalent to Firebase Realtime Database?AWS IoT and Lambda RuleHow to publish to iot stream from lambdahow to control aws iot devices remotely using aws iot jobsAWS Lambda publishing to IOT Topic fires indefinitely
I am using the awssdk.iot nuget package for C#, and I cannot find a method to publish. I have found a method Amazon.IoT.AmazonIoTClient(region).UpdateThing(UpdateThingRequest) that states in the document that it "Updates the data for a thing."
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/IoT/TIoTClient.html
Where Amazon.IoT.Model.UpdateThingRequest has the properties AttributePayload, ExpectedVersion, RemoveThingType, ThingName, ThingTypeName. However, it does not have any properties that I can actually attach my data too. I can send attribute payloads, but this only attaches the attributes to the thing. I looked into UpdateStream but that updates iot from S3 files.
Is there a better wat to publish?
using Amazon;
public static string Iot()
var Region = RegionEndpoint.USEast1;
Amazon.IoT.Model.UpdateThingResponse response;
using (var client = new Amazon.IoT.AmazonIoTClient(region: Region))
var request = new Amazon.IoT.Model.UpdateThingRequest();
request.ThingName = name;
request.AttributePayload = new Amazon.IoT.Model.AttributePayload();
request.AttributePayload.Attributes = new Dictionary<string, string>()
"data","myvalue"
;
response = client.UpdateThing(request);
return response.HttpStatusCode.ToString() ;
c# amazon-web-services aws-sdk aws-iot
add a comment |
I am using the awssdk.iot nuget package for C#, and I cannot find a method to publish. I have found a method Amazon.IoT.AmazonIoTClient(region).UpdateThing(UpdateThingRequest) that states in the document that it "Updates the data for a thing."
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/IoT/TIoTClient.html
Where Amazon.IoT.Model.UpdateThingRequest has the properties AttributePayload, ExpectedVersion, RemoveThingType, ThingName, ThingTypeName. However, it does not have any properties that I can actually attach my data too. I can send attribute payloads, but this only attaches the attributes to the thing. I looked into UpdateStream but that updates iot from S3 files.
Is there a better wat to publish?
using Amazon;
public static string Iot()
var Region = RegionEndpoint.USEast1;
Amazon.IoT.Model.UpdateThingResponse response;
using (var client = new Amazon.IoT.AmazonIoTClient(region: Region))
var request = new Amazon.IoT.Model.UpdateThingRequest();
request.ThingName = name;
request.AttributePayload = new Amazon.IoT.Model.AttributePayload();
request.AttributePayload.Attributes = new Dictionary<string, string>()
"data","myvalue"
;
response = client.UpdateThing(request);
return response.HttpStatusCode.ToString() ;
c# amazon-web-services aws-sdk aws-iot
add a comment |
I am using the awssdk.iot nuget package for C#, and I cannot find a method to publish. I have found a method Amazon.IoT.AmazonIoTClient(region).UpdateThing(UpdateThingRequest) that states in the document that it "Updates the data for a thing."
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/IoT/TIoTClient.html
Where Amazon.IoT.Model.UpdateThingRequest has the properties AttributePayload, ExpectedVersion, RemoveThingType, ThingName, ThingTypeName. However, it does not have any properties that I can actually attach my data too. I can send attribute payloads, but this only attaches the attributes to the thing. I looked into UpdateStream but that updates iot from S3 files.
Is there a better wat to publish?
using Amazon;
public static string Iot()
var Region = RegionEndpoint.USEast1;
Amazon.IoT.Model.UpdateThingResponse response;
using (var client = new Amazon.IoT.AmazonIoTClient(region: Region))
var request = new Amazon.IoT.Model.UpdateThingRequest();
request.ThingName = name;
request.AttributePayload = new Amazon.IoT.Model.AttributePayload();
request.AttributePayload.Attributes = new Dictionary<string, string>()
"data","myvalue"
;
response = client.UpdateThing(request);
return response.HttpStatusCode.ToString() ;
c# amazon-web-services aws-sdk aws-iot
I am using the awssdk.iot nuget package for C#, and I cannot find a method to publish. I have found a method Amazon.IoT.AmazonIoTClient(region).UpdateThing(UpdateThingRequest) that states in the document that it "Updates the data for a thing."
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/IoT/TIoTClient.html
Where Amazon.IoT.Model.UpdateThingRequest has the properties AttributePayload, ExpectedVersion, RemoveThingType, ThingName, ThingTypeName. However, it does not have any properties that I can actually attach my data too. I can send attribute payloads, but this only attaches the attributes to the thing. I looked into UpdateStream but that updates iot from S3 files.
Is there a better wat to publish?
using Amazon;
public static string Iot()
var Region = RegionEndpoint.USEast1;
Amazon.IoT.Model.UpdateThingResponse response;
using (var client = new Amazon.IoT.AmazonIoTClient(region: Region))
var request = new Amazon.IoT.Model.UpdateThingRequest();
request.ThingName = name;
request.AttributePayload = new Amazon.IoT.Model.AttributePayload();
request.AttributePayload.Attributes = new Dictionary<string, string>()
"data","myvalue"
;
response = client.UpdateThing(request);
return response.HttpStatusCode.ToString() ;
c# amazon-web-services aws-sdk aws-iot
c# amazon-web-services aws-sdk aws-iot
edited Mar 6 at 23:37
RickyHamm
asked Mar 6 at 23:14
RickyHammRickyHamm
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
MQTT Publish messages are sent using the AmazonIotDataClient
The Publish and PublishAsync methods are available.
From https://docs.aws.amazon.com/sdkfornet/v3/apidocs/index.html?page=IotData/MIotDataPublishAsyncPublishRequestCancellationToken.html&tocid=Amazon_IotData_AmazonIotDataClient the PublishAsync method:
Initiates the asynchronous execution of the Publish operation.
Which uses the PublishRequest type. This has payload, QoS and topic fields.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55033690%2fis-there-a-better-package-to-publish-to-aws-iot-core-than-awssdk-iot-using-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
MQTT Publish messages are sent using the AmazonIotDataClient
The Publish and PublishAsync methods are available.
From https://docs.aws.amazon.com/sdkfornet/v3/apidocs/index.html?page=IotData/MIotDataPublishAsyncPublishRequestCancellationToken.html&tocid=Amazon_IotData_AmazonIotDataClient the PublishAsync method:
Initiates the asynchronous execution of the Publish operation.
Which uses the PublishRequest type. This has payload, QoS and topic fields.
add a comment |
MQTT Publish messages are sent using the AmazonIotDataClient
The Publish and PublishAsync methods are available.
From https://docs.aws.amazon.com/sdkfornet/v3/apidocs/index.html?page=IotData/MIotDataPublishAsyncPublishRequestCancellationToken.html&tocid=Amazon_IotData_AmazonIotDataClient the PublishAsync method:
Initiates the asynchronous execution of the Publish operation.
Which uses the PublishRequest type. This has payload, QoS and topic fields.
add a comment |
MQTT Publish messages are sent using the AmazonIotDataClient
The Publish and PublishAsync methods are available.
From https://docs.aws.amazon.com/sdkfornet/v3/apidocs/index.html?page=IotData/MIotDataPublishAsyncPublishRequestCancellationToken.html&tocid=Amazon_IotData_AmazonIotDataClient the PublishAsync method:
Initiates the asynchronous execution of the Publish operation.
Which uses the PublishRequest type. This has payload, QoS and topic fields.
MQTT Publish messages are sent using the AmazonIotDataClient
The Publish and PublishAsync methods are available.
From https://docs.aws.amazon.com/sdkfornet/v3/apidocs/index.html?page=IotData/MIotDataPublishAsyncPublishRequestCancellationToken.html&tocid=Amazon_IotData_AmazonIotDataClient the PublishAsync method:
Initiates the asynchronous execution of the Publish operation.
Which uses the PublishRequest type. This has payload, QoS and topic fields.
answered Mar 6 at 23:42
bltblt
1,3131016
1,3131016
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55033690%2fis-there-a-better-package-to-publish-to-aws-iot-core-than-awssdk-iot-using-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown