How to add a widget for talkback in the my channel section along with incoming sensor data visualizations?

조회 수: 1 (최근 30일)
I would like to have a widget to control a pump connected to Thingspeak via Talkback. I have also established a connection with thingspeak where I publish my sensor data to the channel and can visualize the data through the various widgets. But I cant find a widget or method to control the pump from a graphical perspective on the channel (like a switch or button interface where clicking them would turn the pump on or off). Thingsboard seems to have the feature, not sure of thingspeak. If anyone knows a way please do comment out. Have a great day!

답변 (1개)

Christopher Stapels
Christopher Stapels 2022년 11월 29일
You can use the plugins app to add javascript that will make a button that sets a channel value.
You will be able to use the plugin for yourself, but you cannot make it public due to security issues.
Here is some sample code for a button, just change the xmlhttp_info.txt to the GET command to change the value of your channel from 1 to 0. Then set you pump to read the channel to decide to turn on or off. (or use talkback)
I tested the code in pugins on my channel and was able to get it to read data from a channel

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 REST API에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by