IOT Link - Windows Management using MQTT

:thinking: I donā€™t know what Iā€™ve done with space alignment but the config is ok now thnks to you.

May I have to set up the script?? Donā€™t kill me, Iā€™m trying to learn, I promise :sweat_smile:

Edit:
Ok I have the shutdown script working, Iā€™ll try the wake on lan tomorrow, and maybe I can figure out how to call the service

Thanks a lot!!!

@alexslx

Hey, this is great and been using it for a while now.

I have a TV above my dual monitor screens hooked up to my PC and i like to watch IPTV on it throuhg a windows 10 app. Currently, i need to turn on the tv with the remote but i would like to automate it with my RM mini.

Can you incorporate a sensor into the software that detects if a app/program starts or is running? so when the IPTV app starts an automation can turn my TV on?

Thanks

hey, can you repost this yasml please?

Iā€™m trying to run this command:

ā€œstart http://192.168.1.200/camera.htmlā€

running it in command prompt works - but canā€™t figure it out in IOT. Any ideas? I have a full screened browser running as my dashboard, and this will open a camera feed in another tab in Chrome, while keeping full screen.

This looks really cool. I am definitely going to try this! I have a feature request though XD. Wouldnā€™t it be possible to use homeassistant autodiscovery with mqtt? For example the dafang camera and tasmota/esp devices can do this. (is it even possible XD?).

Thanks for this anyways, I will most certainly incorporate this into my setup!

This is pretty awesome. I had been using EventGhost with the MQTT add-on for it, but it always seemed a little janky. At first glance, this seems better.

Is there any way to make the playpause command configurable to that it mimics the spacebar instead of the media player buttons? It doesnā€™t seem like any of the media players I would like to control on my HTPC (Youtube in a browser window, VLC, MPC, ) respond to the play/pause command, but the spacebar is pretty much universally accepted as play/pause when a media player is in focus.

Another thing that would be awesome is if there was a sensor for the current focused window. Like if I Iā€™m playing a game on the PC, the taskbar program title would get beamed back to Home Assistant. Iā€™m not quite comfortable sending screenshots around, and even then, Home Assistant would have a hard time figuring out whatā€™s going on from a screenshot.

I disable the screenshot part, but out of curiosity, how does it handle multi-monitor systems? As another suggestion, the screenshot should maybe go to a subtopic other than stats so that all the binary gibberish doesnā€™t show up to someone subscribed to /iotlink/domain/machine/windows-monitor/stats/# . I hope that makes sense.

Hi Guys,

Unfortunately, my MB/GPU somehow died some time ago and Iā€™m unable to develop for the time being. I want to finish one more version with the HA Discovery protocol but I donā€™t have a estimated time when it will arrive due to me being unable to develop and test it.

The project IS NOT DEAD but it will take some time (probably new year) before I can be fully active again.

Remember that for all requests, people can create new addons to plugin into IOTLink.

Regards,

@alexslx
Any luck this would work with windows 7. I got one that i cant update to win 10 for some application compatibility issue.

iā€™m running it on my mediacenter and windows 10 tablet and I love it.
Only to put it of/off but itā€™s great!!

Wow this is amazing tool control windows Machine Awesome.

Anybody know similar program for mac osx?

It will be nice to have also camera capture option. :slight_smile:

Is it possible to use autodiscover in homeassistant for the topics created under /iotlink ?

there is already a feature request up on the github regarding autodiscovery, but last commit was 3 month agoā€¦ looks like development is stalling. Oh just look some posts up : IOT Link - Windows Service for connecting devices with IOT enabled services using MQTT dev has hw trouble.

Just in case anyone is interestedā€¦I played around today to get the IOTLink uptime sensor output to match the built-in HA Uptime Sensor output. In the sensor config simply replace the:

    value_template: "{{ value }}"

with

    value_template: >-
      {% set num = value %}
      {% set day = num[:2] | float %}
      {% set hr = (num[3:-6] | float / 24) %}
      {% set min = (num[6:-3] | float / 1440) %}
      {% set sec = (num[9:] | float / 86400) %}
      {{ (day + hr + min + sec) | round(2) }}

Change your unit_of_measurement: to 'days'

Your sensor state will now be 25.09 days instead of 25:03:19:54 seconds

1 Like

After a long search for a reliable way to control a wall mounted monitor remotely, I ran across Redditor u/trollzOrzā€™s awesome setup last week. It is using IOTLink + MQTT and itā€™s working well for them, but I cannot seem to get it working for me.

What I have done:

  1. I have the Mosquito add-on set up in Hassio, which is running on a Oracle VM. I was able to confirm the add-on is working by carrying out this basic MQTT test, but I admit I do not really understand MQTT.

  2. I followed theIOTLink configuration instructions to the best of my understanding. Here is a pastebin of my IOTLink config. Does everything look right here?

  3. I set up the command scripts, per these instructions. Here is a pastebin of my Hassio config.

  4. I called the various scripts (script.my_computer_vol_mute, script.my_computer_displays_off, etc) manually from the Services section of Hassio, with no noticeable result on the host machine.

  5. Figuring something was wrong, I checked to logs on the host machine running IOTLink, and its failing to connect, as you can see here in an excerpt from the IOTLink log on the host.

Can someone help me out with this please? This type of control is the only way I have found that looks promising as far as controlling a remote monitor, so I really need to figure this out! Thanks!

@kr_noob

Based on my setup (Mosquito running on Hass.io) and config (that is working), this is what I see:

Change your hostname: to the IP of Hassio which looks like 192.168.1.215

I left uri: blank in my setup

I also left clientID: under LWT blank

Maybe try that. I am running IOTLink on 4 VMs and all of the sensors are getting properly named with the client ID and all commands are working as well.

1 Like

ok, I made the changes and I think Iā€™m headed in the right direction. The logs look better right? However, the commands (scripts sent via the Services) from Hassio still are not working. As Iā€™m new to MQTT communications, can you explain what you mean by the above? If I am supposed to see sensors in HA, Iā€™m not seeing that.

Appreciate the assist, and its encouraging to know you have it working on a VM as well. My problem almost certainly lies between my keyboard and my desk chair!

You will only get sensors if you enter sensors into your sensor: section of your Hassio configuration.yaml file. I use the RAM and CPU sensors. If you arenā€™t using sensors, you donā€™t need to worry about that.

In all honesty, I am not well versed in the logs.

You are showing a 192.168.1.222 in the top this code. Is that in your configuration.yaml? If so, I donā€™t think you need that mqtt: entryā€¦

Your script: syntax looks correct. Are the scripts actually showing up in your Developer Tools > States table?

Iā€™ also running windows 10. I checked for troubleshooting hints, reinstalled everything with admin privileges. Windows Service is running.

I have two windows computers publishing MQTT. Thing is, different values are not available to publish to MQTT depending on which machine is source