IOT Link - Windows Management using MQTT

Copy on the sensors - I have not set those up yet, but as soon as I get the communication to turn the monitor on/off, I’ll likely set them up as well.

The scripts do show up in the Developer Tools > States table.

Yes - the below is in my HA config - possibly based on outdated documentation. Are you saying I don’t need the broker: IP, or I don’t need any of this at all?

mqtt:

  broker: 192.168.1.222

@kr_noob

If you installed Mosquitto via Hassio, you do not need to add either of those lines to your configuration. Not sure if that is causing your issue or not.

edit: I got it! MQTT is case sensitive, so my final issue was my scripts had my computer name in caps…

Thanks for your help - you got me there. When I have time, I will edit the original post with my final configuration in case anyone else would benefit.

ok, took it out - still not working, though I think my logs look ok. If you are willing to send me your logs, that would be great, so I can compare a working system to mine, and see if I can ID the difference.

Mine look like there is communication going back and forth between client and server, but I see no evidence of me running the scripts.

Hi Kevin,

I need some of your insights in getting this running.

Tried everything on this thread and still my Iotlink MQTT sensors on HASSIO shows state as “unavailable”.

I know the Mosquitto Broker Addon is working correctly as my other client (TeslaMate) is publishing info to HASSIO correctly. But I cannot get this IOTlink working…

Can you publish your working configs so that I reference…lol? a bit frustrating…

EDIT: Figured it out…LOL… So, I’d been reading thru this thread before attempting the installation, but some of the info on this thread is not correct. I thought the computer name on the mqtt topic is case sensitive. It is not in my case… My computer name in windows has capital letters but I had to use all lower case in the HA config…

Hi guys,

Running into another minor problem with IOTLink.

I got this setup and almost everything is running fine.

Except for monitoring CPU Usage. I’m not getting any value for this sensor - the state shown in Home Assistant is always “unknown”.

Does everyone have this working? If so, any pointers for me is appreciated.

Double check your config on HA vs IOT’s documentation. I think at some point the topics may have changed slightly. I recently had to change my CPU and User mqtt topic HA was looking for.

Sorry man - I completely missed this notification for some reason. Glad you got it figured out. My issue was capitalization - on my PC my computer name was all caps, so that is how I put it in the HA config. I switched to lower case, and it started working. I don’t claim to understand it - but it works!

I could not get the CPU usage or the HD stats to work. Maybe I’ll mess with it later but not really critical to my set up.

Ah!!! you’re right, there are two sets of Wiki page for MQTT Topics… The one linked to this thread is not the latest (or it is wrong). There is another page that is indexed in the Wiki…

I needed to add /usage behind /cpu - this work now

Hello everyone,

Sorry for being out for so long, as I stated before I had a problem with my GPU together with some life issues but I’m back.

Good news: I’ll finish the next version soon and it will bring MQTT auto-discovery for our sensors. Commands still need to be scripted, but adding and maintaining all sensors will be more easy.

Spoiler:


3 Likes

Hey,

IOT Link v2.0.0 has been released at https://iotlink.gitlab.io

Home Assistant MQTT Discovery

Starting with IOTLink version 2.0, sensors can be automatically integrated via the Home Assistant’s MQTT Discovery.

The MQTT Discovery is already enabled by default since version 2.0. To enable, disable, or configure it, edit the IOTLink Configuration.

Importantly, discovery only works for sensors (sending information from IOTLink to HA). To use the commands (sending HA information to IOTLink) you still need to configure the scripts in Home Assistant.

I’ll be updating and rewriting the wiki as soon as I can, and help is always appreciated!

Update:

  • Version v2.0.0 and 2.0.1 had some issues with addon versioning. Please install v2.0.2
  • A full uninstall / reinstall / reboot is recommended for those who have older versions.
4 Likes

Thanks man! Great work, works like a charm. HA MQTT Discovery is awesome, the best/easiest way to connect and control your PC. Thanks.

1 Like

Sorry, I couldn’t get MQTT Discovery going… May be it is because I have the Hassio’s internal MQTT broker integrated…

Anyhow, all of the old sensor’s that had been working stopped… I’m guessing the syntax for the topics had changes.

Is there an easy way to publish these topics? So that I can double check?

EDIT:
Just adding more color to this. This is how I have the MQTT component setup under configuration.yml

mqtt:
  broker: homeassistant
  discovery: true
  discovery_prefix: homeassistant  

It doesn’t seem to discover any sensors…But all of my other MQTT components are still working fine. Thx.

I don’t know why when I run scripts they don’t work… for example when I execute the script for reboot I have this log

1579035231: Received PUBLISH from 2a18b8b8-0c87-4984-b229-f4471c8c6b47 (d0, q0, r0, m0, ‘iotlink/workgroup/my-computer/commands/reboot’, … (0 bytes))

and the PC don’t reboot.

I think you need to change /my-computer/ to you computer’s name.

I’ve disabled discovery in the configuration for IOT link but the entities keep popping back up in HomeAssistant after a reboot, even after a clear. Any ideas what I could do? There’s just too many of them and I don’t use more than 3-4.

Can you try disabling sensors you don’t need in windows monitor config file,

C:\ProgramData\IOTLink\Addons\WindowsMonitor\ config.yaml

2.0.2 works great, lots of sensors to play with, need a day to build front end to show them all :slight_smile:

Thanks Alex great update

I also use the internal mqtt component, I had to remove it from the Hassio integration panel and then re-add it and select auto-discovery, when you use the integration via hassio panel you have to remove mqtt from your config.yaml

I don’t have any enabled I don’t think. Maybe that’s the issue? I managed to disable in HASS in the integration page but it was a PITA.

I see. I’ll try that out.