I wrote a nodejs based agent that you can install on a machine (also on Windows as a windows service) and then send it MQTT messages to execute certain predefined commands. It can also run certain commands regularly and post the result back to MQTT.
You can execute anything you can run on a command line. For example: check processes, restart services, shutdown, check status of updates, etc.
On Unix based systems you can probably SSH from HA to do this but for Windows I needed a different solution.
IOTLink gives me certain fixed sensors and screen grab features.
mqtt-win-exec adds the ability to run commands from a set of pre-defined commands. I have disabled the “run any command you want” functionality in IOTLink due to security concerns (Suggestion: Remote execution security issue (#89) · Issues · IOT Link / IOT Link Service · GitLab).
Also, mqtt-win-exec can run a command periodically and return the output as a topic. I don’t think IOTLink does that. So you could define your own custom sensors using data you pull from the PC.
My C# is not strong enough to actually participate in the development. Helping as much as I can by submitting issues, troubleshooting, etc.
How do you use IOTLink? Does it work better for you than for me?
Hi Arik, thanks for your answer and clarification.
That sounds logical and interesting. I will definitely have a look at your program.
To be honest, I’m using very few features of IOT Link so far. Most of it I have deactivated. From the sensors I only use the CPU and ram consumption, and the network status. Apart from that I have a switch in HA which I can use to switch off my PC via IOT Link and switch it on via WOL.
So far everything has always worked perfectly.
Makes sense. I have a feeling that the bugs in IOTLink are related to laptops that sleep/wake and that have more than one network interface. Possibly it listens on the wrong interface or something like that.