Periodic updates of data?

Hi, I'm trying to make a plugin. There are so many things that are new to me in this stack is it going to be quite a curve for me to climb :blush:

I think I can achieve most of what I want to do with hooks and events etc. However, there is one thing I'm struggling to envisage. I want to call a command line application with some arguments, that will return some JSON in stdout (very fast), this JSON will contain values I would like to continually update in the tab of the plugin.

Has anyone done something like this before or have any ideas for me to try? Any help would be most appreciated.

You'd probably want to use a combination of using the send_plugin_messsage to push the data on a repeated timer from the python side, or pull the data using a javascript settimeout and using the SimpleApiPlugin mixin to request the data. Then you process the received/returned data into knockout, like described in the bottom of this page.

I've done something similar with the TPLinkSmartPlug plugin where when you click on the button in the navbar and based on the response it will change the color of the button's icon.

Perfect, thank you.