MATLAB Answers

Thingspeak Talkback Idempotency issue

45 ビュー (過去 30 日間)
Zachariah Belding
Zachariah Belding 2021 年 4 月 16 日
回答済み: Brod Victor 2021 年 4 月 23 日 8:36
I use this method to update channels and execute Talkback:
Most of the time this works great, but once and and a while I do not recieve a response from the http Post. This is more than likley due to a weak cellular connection. When this happens, I redo the http Post and usually get a server response the second time. The problem is, the talkback was already executed on the first try that was not recieved. That means the second try does not contain the Talkback. Any ideas on how to overcome this issue?


Christopher Stapels
Christopher Stapels 2021 年 4 月 16 日
One possible solution, though possibly expensive in terms of bytes would be to read the command - instead of executing. Then when once you get the command, send the execute command to remove the old from the list but ignore the response.
The get command requires the talkback ID, but you could get all commands and read the last one.
  4 件のコメント
Zachariah Belding
Zachariah Belding 2021 年 4 月 20 日 17:27
I am going to move away from Talkback, and instead use an extra channel field to send commands to the device. I will use this method: while the socket is still open after updating fields. It will certainly use more data, but at least I won't have to re-open the socket. Also I will be able to guarantee command delivery.
Thank you for your help and idea.


その他の回答 (2 件)

Vinod 2021 年 4 月 19 日 17:34
Out of curiosity, are you using talkbacks as a mechanism for 2 devices to synchronize values/state? If so, rather than a polling model, perhaps you can consider using MQTT publish and subscribe to a topic that is one of the fields on your channel?
  1 件のコメント
Zachariah Belding
Zachariah Belding 2021 年 4 月 19 日 19:33
I am using talkbacks as commands from a human. I have considered Mqtt, but I am not quite sold on it yet.
As far as I know thingspeak mqtt only provides Qos 0. In my mind, I would have some of the same issues. Although, I could probably update more frequently because of the data savings.


Brod Victor
Brod Victor 2021 年 4 月 23 日 8:36
Hi... Talkback application is useful for gadget control. Now and again I have been befuddled between getting orders (read rundown) and executing them (eliminate from list)
I would suggest you start by getting your Arduino set up to peruse a channel worth, and afterward proceed onward to the Talkback.
Since Talkback is excluded from the ThingSpeak correspondence library as of now, you should form the solicitation design.




その他の回答  ThingSpeak コミュニティ

Community Treasure Hunt

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

Start Hunting!

Translated by