I recently decided to try an add-on called IOTlink. I was looking for a way to remotely monitor and control my main workstation pc. IOTlink seemed to be just the answer. In layman’s terms, it appears to install an MQTT client in Windows which continually publishes relevant sensor data to a particular topic which you can then pick up using your home automation platform. In my case that’s Home-Assistant/Node-red. I’ll walk you through the set up.
I downloaded and installed the application from here. Note you need to run the installer as Admin. After a couple of moments, all that was left was a folder in my start menu called IOTlink:
Open the configuration files and basically input the data that will allow this app to communicate with your MQTT broker. These are pretty self explanatory and a lot of the mqtt related stuff is already pre-filled in for you in terms of logging, retain, discovery etc. I had to change the following:
- topicprefix i.e. “homeassistant”
- prefix “IOTlink”
Once changed, I saved the configuration file and started the “windows service.” A command prompt window appeared momentarily but that was it. There was nothing visibly running on my workstation. I wasn’t even sure it was working. I switched over to the HA side of things. I’m using hassio (or core or whatever they call it now) and so I went to the integrations page and the MQTT section. IOTlink was already enabled under MQTT discovery, so it was just a matter of adding the discovered items into lovelace.
So far so good. I now had all the incoming sensor data I wanted from my main machine (IP addresses redacted). Now to set up a way I can control the workstation from HA.
This was as simple as copying a script into my scripts.yaml. For example to reboot and shutdown the machine I added these:
alias: My Computer – Displays Off
– service: mqtt.publish
As you can see, using node-red and home-assistant it’s possible to make automations quite quickly and easily. Other ideas for the future:
- I can have google home or alexa notify me via voice (as well as phone notification) when:
- my harddrive is getting dangerously full
- my network speed drops below a certain level or disconnects
- my computer temperature is getting too warm or cold (remote server monitoring?)
- If someone else logs onto my pc (state change on username field)
- If my computer is turned on whilst I’m not there
Literally the possibilities are endless.
Hope this helps. The documentation for IOTlink was surprisingly good, and you really can be up and running in a short amount of time. All the commands and scripts are basically there waiting to be copy pasted. Just remember to change your topic/prefix as needed. If you do start to experience any issues with MQTT such as ghosting (randomly turning on and off) then this post might be of use for you. If you like this post and it’s useful, maybe you might like my other posts and if you’re considering making your home smart and looking for somewhere to start, then my book might also be of use.
Let me know in the comments if you have any questions or thoughts.