aws-iot

Send data from cloud to aws iot thing

送分小仙女□ 提交于 2019-12-24 18:11:47
问题 I am trying to a reliable way to send data from aws lambda function to a aws iot thing. The thing is basically a raspberry pi which is located remotely. I have seen aws iot topics, but they don't seem to be reliable for my use case. So far I have found the following functionalities about topics Topics: Topics are asynchronous. When something is added to topic all and only currently listening devices will receive the update. There is no queueing. No delivery notification for the publisher. In

AWS SigV4 request signature does not match

旧城冷巷雨未停 提交于 2019-12-24 06:03:57
问题 I am getting Invalid Request with below error message when trying to create a thing-type using Rest API. I am not using aws-sdk rather python rest client. I followed the steps given here to sign the request using sigv4. The example given there is working for listing the Thing-Types. So the credentials I am using, are correct. Error Message : Response code: 403 {"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and

AWS IOT JS device SDK not connecting and keep on reconnecting again and again

怎甘沉沦 提交于 2019-12-23 01:45:24
问题 var awsIot = require('aws-iot-device-sdk'); var uuid = require('uuid'); var device = awsIot.device({ keyPath: "<path>-private.pem.key", certPath: "<path>-certificate.pem.crt", caPath: "<path>-root-CA.key", clientId: uuid.v4(), debug:true, host: <hostId>, will:{ topic:"blahblahblah", payload:"disconnecting", qos:0, retain:false } }); device .on('connect', function() { console.log('connect'); device.subscribe('cgw/devices/register'); }); device.on('message', (topic, payload, message) => {

aws iot describe-endpoint::You must specify a region

妖精的绣舞 提交于 2019-12-20 03:38:13
问题 I am following this tutorial for connecting Raspberry Pi to AWS IoT using Node.js SDK and I have done all the other steps but I am lost in the authentication and certificate step: pi@raspberrypi:~ $ aws iot describe-endpoint You must specify a region. You can also configure your region by running "aws configure". pi@raspberrypi:~ $ aws configure AWS Access Key ID [None]: AWS Secret Access Key [None]: Default region name [None]: Default output format [None]: pi@raspberrypi:~ $ ls 2016-02-24

AWS IoT private.pem.key doesn't exist

左心房为你撑大大i 提交于 2019-12-13 03:33:31
问题 When I am trying to run the following node.js example from AWS IoT I get this error(following this tutorial): pi@raspberrypi:~/aws-iot-device-sdk-js/examples $ node device-example.js -g private.pem.key doesn't exist (--help for usage) However I have the private.pem.key in ~/certs folder as requested by the tutorial. pi@raspberrypi:~/aws-iot-device-sdk-js/examples $ vi device-example.js pi@raspberrypi:~/aws-iot-device-sdk-js/examples $ ls ~/certs/private.pem.key /home/pi/certs/private.pem.key

Cannot Pub or Sub on AWS IoT using MQTT over Websockets

半腔热情 提交于 2019-12-13 01:09:25
问题 I can successfully connect to AWS IoT using MQTT over Websockets. But when publishing or subscribing, the connection is terminated. I figure it must be a policy/permissions-based issue with AWS, but I am confident that I have the correct permissions. Here is my setup: I have a lambda function which creates a signed url using STS assumeRole (permissions in policy will be tighter but I have allowed access to all iot functions on all resources for testing): const config = require('./config');

How to interpret the response from OpenSSL?

邮差的信 提交于 2019-12-12 05:49:11
问题 So in the AWS IoT tutorial I get this: pi@raspberrypi:~/certs $ openssl s_client -connect iot.us-west-2.amazonaws.com:443 -CAfile root-CA.pem -cert certificate.pem.crt -key private.pem.key CONNECTED(00000003) depth=2 C = US, O = "VeriSign, Inc.", OU = VeriSign Trust Network, OU = "(c) 2006 VeriSign, Inc. - For authorized use only", CN = VeriSign Class 3 Public Primary Certification Authority - G5 verify return:1 depth=1 C = US, O = Symantec Corporation, OU = Symantec Trust Network, CN =

How to identify the lat/long location from where the IoT button click was made

放肆的年华 提交于 2019-12-12 05:30:56
问题 How to identify the lat/long location from where the IoT button click was made https://aws.amazon.com/iotbutton/ 回答1: There are lookups you can do from IP Address to location. i.e http://ip-api.com/json/208.80.152.201 Unfortunately for you, IoT Button clicks only give 3 event parameters: clickType: event.clickType, // (string) the type of press; can be "SINGLE", "DOUBLE" or "LONG" serialNumber: event.serialNumber, // (string) device's serial number, from the back of the button. batteryVoltage

on_message is not working in python

馋奶兔 提交于 2019-12-12 03:37:48
问题 I am working on aws iot and able to get the shadow state updated by the terminal via shell script .But i am able to get root@raspberrypi:~# ./aws_subscribe.py Connected with result code 0 and also in aws iot home i am getting out of sync error and i am following this blog 回答1: The 'Shadow status' field on the AWS console merely shows if the 'reported' and 'desired' states are the same, it has no functional impact. This is an example that would show the status as out of sync: { "reported": {

AWS IoT SDK - main L#206 Error subscribing : -28 (C code)

谁说胖子不能爱 提交于 2019-12-11 15:50:14
问题 I am trying to run the example in this tutorial from AWS IoT (AWS IoT Embedded C SDK). My aws_iot_config.h file has the following configuration: #define AWS_IOT_MQTT_HOST "XXXXXXX.iot.us-east-2.amazonaws.com" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow #define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S #define AWS_IOT_MQTT_CLIENT_ID "c-sdk-client-id" ///< MQTT client ID should be unique for every device #define AWS_IOT_MY_THING_NAME "SM1" ///< Thing Name