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

7 views (last 30 days)
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!

Answers (1)

Christopher Stapels
Christopher Stapels on 29 Nov 2022
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

Communities

More Answers in the  ThingSpeak Community

Tags

Community Treasure Hunt

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

Start Hunting!