Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Setting values in MUI table when updates received from AWS IoT

I am building a React application that connects to AWS IoT Core via Amplify and Cognito. I have successfully connected the backend to AWS IoT. I wish to retrieve the device online/offline status from AWS using the events topic like so:

var device_name
var device_state
var device_mode

Amplify.PubSub.subscribe('$aws/events/presence/connected/device_name').subscribe({
  next: data => table_data_online(data),
  
  error: error => console.log(error),
  
  close: () => console.log('Done'),
});

const table_data_online = (data) => {
  device_name = data.value.clientId
  device_state = 'Online'
}

const rows = [
{ id: device_name, status: device_state, mode: device_mode}
];

However, I cannot seem to set the device_name and device_state like this... How do I make it such that I can set the device_state and device_name strings for rows when an update is received from AWS IoT? Btw, rows is used in a MUI DataGrid table and is currently set to hold just 1 device.

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!