How to fetch and visualise live data from thingspeak fields in Matlab app designer

146 visualizaciones (últimos 30 días)
Eman
Eman el 5 de Dic. de 2024 a las 21:54
Comentada: Eman el 12 de Dic. de 2024 a las 7:50
I am using multiple sesnors and their readings are monitored in a thingspeak channel. I need to fetch and visualise these data live on a some gauges and lamp indicators to change color when a specified threshold is exceeded.
  1 comentario
Eman
Eman el 5 de Dic. de 2024 a las 22:05
I need to fetch and visualise these data live on a some gauges and lamp indicators to change color when a specified threshold is exceeded using matlab app designer.

Iniciar sesión para comentar.

Respuesta aceptada

Vinod
Vinod el 5 de Dic. de 2024 a las 23:06
Editada: Vinod el 5 de Dic. de 2024 a las 23:26
My recommendation is:
1) Build your app with MATLAB App Designer with the gauges and lamp indicators.
2) On ThingSpeak set up a new MQTT device and call it MATLAB and give it credentials to subscribe to the channel you want updates from. Use the credentials from this step for next step
3) In the App Designer app, set up an MQTT subscriber that gets a callback when the value changes in the ThingSpeak channel.
4) In the callback, make the change to the properties of the gauges and lamp indicators.
I've attached an example demonstrating the above. NOTE: The example uses functionality from Industrial Communications Toolbox for MQTT connectivity. You can also try the attached example in MATLAB Online.
  2 comentarios
Eman
Eman el 6 de Dic. de 2024 a las 17:04
Editada: Vinod el 6 de Dic. de 2024 a las 19:46
Hello, i am having issues trying to install the Industrial Communications Toolbox from Add ons, i get this error message that its unable to connect to mathworks. I installed the latest update R2024b, and i tried to install the add on from both wifi and a mobile hotspot, i can't seem to catch the problrm here. Any idea why i am recieving such a problrm?
Vinod
Vinod el 6 de Dic. de 2024 a las 17:54
Editada: Vinod el 6 de Dic. de 2024 a las 17:56
If the suggestions here do not solve your problem, I'd recommend contacting tech support with the error trying to install the toolbox.

Iniciar sesión para comentar.

Más respuestas (1)

Christopher Stapels
Christopher Stapels el 5 de Dic. de 2024 a las 22:07
This is a terrific applicaiton. App designer can really give customizable control the main web UI cant offer.
I wrote this file exchange sumbission some time ago, but it might give you some idea how to get started. In order to allow comparison of differnt time periods, I had to do some odd rearanging of the data, you task may be more simple (hopefully).
If you write something, it would be great of you to share it on File Exchange as well. If you have more specific questions as you go, you might want to start a discussion on the ThingSpeak community. Ill monitor that as well, and there are hopefully others who can help.
  1 comentario
Eman
Eman el 12 de Dic. de 2024 a las 7:50
thank you very much, this has helped me understand several functions in the code and app designer features.

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  ThingSpeak Community

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by