web interface for potentiometer in aws iot - amazon-web-services

actually, I write program in Arduino ide which read potentiometer value and send it to AWS MQTT. whenever I revolve my potentiometer it prints value in AWS MQTT and now I want it to access from web page tell me what are the possible ways we access the data on web page
thanks.
I try to access it through node red in AWS cloud formation.my node is complete but it shows connecting error and not connected.

There are several ways available. I think this blog will be helpful - 7 patterns for IoT data ingestion and visualization- How to decide what works best for your use case
If you want to directory interact with IoT Core from Web browser, Amplify PubSub Library may be good.

Related

GCP Cloud Data transfer - any notifications?

I want to build a small solution that will transfer files from Azure to GCP. The solution itself works fine, but I don't see any solution anywhere that could inform me that the transfer started, ended or there was an error (e.g. on Slack). I can't see anything in the logs that could help me. I tried to do it with PUB/SUB but without any luck.
Is there any easy way to connect Data Transfer with slack or e-mail?
Thx
At this point in time, the Cloud Data transfer service has no way to send notifications(mail/slack/etc), you could try to implement something by monitoring the logs of the GCS bucket.
In the case you are mentioning, you could be monitoring the logs of GCS looking for writes, and send a notification based on that, nevertheless, it would take some fine tuning on your side.
I would also recommend to create a feature request here so that Google knows that this feature is needed and they themselves implement it in the future.
I am part of Storage Transfer Service team. We offer a to get notified via pubsub of the state of the transfer job. It's an API only feature at this time. Check out here.

AWS IoT Device online/offline check

I am currently working on an IoT device using AWS IoT core. I am new to working with IoT device. What is the standard/best way for determining whether the device is online and connected to the internet?
Thanks you!
Since you have been using AWS IoT Core, I would recommend that you stay in fully managed services provided by AWS IoT suite. No need to reinvent the wheel such as provisioning a separate database for a basic requirement of pretty much every IoT-enabled solution.
What I understand is that you want to monitor your IoT device fleets for state changes or failures in operation, and to trigger actions when such events occur. To address this challenge, I'd suggest using AWS IoT Events. It accepts inputs from many different IoT telemetry data sources including smart sensors, edge devices, management applications, and other AWS IoT services. You can easily push any telemetry data input to AWS IoT Events by using a standard API interface.
In specific to device heartbeat, please take a look at this sample detector model. A detector model simply represents your equipment or process. On the console, you can find some other pre-made detector model templates which you can customize based on your use-case.
One way to know if a device is online is to check for a heartbeat.
A device heartbeat is a small mqtt message to a topic that the device sends every 5 minutes.
In IoT Core, you would configure a rule that would update a Dynamodb table with a timestamp each time a message is sent to the heartbeat topic.
By checking this timestamp in Dynamodb, you can confirm if your device is currently online.
You can follow this Developer Guide to get connect disconnect events. it works on MQTT topics so we can use rules to trigger Lambda or other services.

How to provide iot service to our devices during aws code update roll out?

We are using AWS IOT for our home automation product.
Recently we started to face a new issue with AWS IOT services.
The problem is when AWS IOT team release new code updates, they disconnect certain devices from mqtt.
Our devices connect to mqtt , aws disconnects them immediately , ultimately leading to connect -> disconnect cycle.Our devices make shadow update/get request whenever they connect to mqtt.
As a result this causes high iot message usage. The worst thing is mqtt service remains unavailable during this time so users can't use our product and they start calling our customer support and we have no valid reason to satisfy them, leading to very bad user experience.
This issue has been occurred three times in last couple of months.
We tried to get some solution from AWS developer support but no benefit.
Could anyone please suggest a way that we can use to provide service to our customers when this issue occurs?
We are using nodemcu esp8266 and mongoose os on hardware side.

Publish message to specific subfolder

I'm trying to use Google Cloud Platform to make a little IoT project.
I've created a registry and a device in the "IoT Core" section and connected the registry to a default topic.
I've also specified three subfolders for that topic: "events", "config" and "status".
Now, I would like to connect a "Cloud Function" for the incoming messages but I can't find how to configure a single subfolder to monitor neither how to publish messages on them in the "Cloud Pub/Sub" section.
All the documentation talks about single topics so.... Am I missing some base concept on how it works?
Need to back up a step. What are you trying to do with the various subfolders? This may be a misunderstanding with how communication works with the device to and from the Cloud.
So, there's 3 MQTT topics, those are the events/config/state (not status). Those DON'T map to Pub/Sub topics at all. They're each handled separately in IoT Core.
Events is device->Cloud, and gets put into the Pub/Sub topic you specify when creating the registry. Setting subfolders is all about splitting telemetry from the same device to multiple places for handling. So, e.g. you have temp data you want to go in one pub/sub topic, and pressure data you want into another. The other way to handle this would be to attach the function to the main pub/sub topic, parse the telemetry, and then re-issue a Pub/Sub message to different places depending on the payload itself.
Config is Cloud->device, and is initiated by calls to the IoT Core Admin SDK. If your device subscribes to the /config/ MQTT topic, then they'll get a callback on the MQTT client's on_message handler (exact code depends on library being used of course) when some external entity sends a config message to IoT Core for your device.
State is device->Cloud but is specially handled, and doesn't go to any Pub/Sub topic. The results can be retrieved by the IoT Core Admin SDK. It's a way for the device to report its state and then external processes/applications to get that status without having to call back down to the device itself. This is particularly useful when you have devices which don't remain connected, for example, but you still want to be able to do things based on the last known state.
So the only one that you can use Cloud Functions with is the /events/ topic. That's done by deploying a Cloud Function and choosing the Pub/Sub publish event hook as the firing mechanism for the function, and specifying the IoT Core's registry Pub/Sub topic as the source of the events. Then anytime your device publishes telemetry to the /events/ MQTT topic, it'll get published to that Pub/Sub topic (confusing I know because we call them both topics) and the Cloud Function will fire.
Hopefully this clarifies what's going on? Or did I totally miss the question? :)
I believe the correct way to set this up would be to set up one pubsub topic for each subfolder. From the cloud iot core documentation:
Devices can publish data to separate Pub/Sub topics by specifying a subfolder in the MQTT topic. The subfolder is the subtopic after {device-id}/events. For example, if the device publishes to the MQTT topic /devices/{device-id}/events/alerts, the subfolder is the string alerts. This subfolder must be configured in the device registry resource's eventNotificationConfigs.subfolderMatches field with a matching Pub/Sub topic in the eventNotificationConfigs.pubsubTopicName field. When data is sent to a subfolder, it is published to the subfolder's matching Pub/Sub topic.
https://cloud.google.com/iot/docs/how-tos/mqtt-bridge#publishing_telemetry_events_to_separate_pubsub_topics

Control Amazon Alexa via Raspberry Pi

I want to integrate Amazon Alexa in my current Smart Home setup.
The main function that I would like to have is control the volume and play and pause music (for an alarm clock like function). I am not able to find such an API.
I am planing to controll Amazon Alexa (Dot) via an Raspberry Pi.
Does anyone know such an API?
Thanks!
Amazon has not publicly released an API to control Alexa enabled devices as of now.
If you look at the Amazon Alexa's IFTT page, there are no actions:
https://ifttt.com/amazon_alexa (scroll down to and click, show more actions and triggers). Quite a few triggers are available, but no actions, which is what you are interested in currently.
The closest you could get is by hacking into the network using Wireshark, figure out what messages are sent by Alexa to Echo when volume up/down commands are given. But that is again over a TLS connection, so you wouldn't get anything.