IOT Link - Windows Management using MQTT

Is it possible with IOT Link to monitor when a Windows 10 PC has been locked or not?

1 Like

Does IOT Link expose camera on/off state to MQTT? I donā€™t need a screenshot of the PC screen or to take a picture with the camera, but I want to integrate with HA based on the status of camera on/off.

In this time with many of us working from home, Iā€™m trying to fashion a simple ā€˜on airā€™ light kind of thing, and want to turn on/off with HomeAssistant based on the MQTT presented status of my Win10 desktop cameraā€™s being in use.

Thoughts?

2 Likes

This is realy good program.

I also have mac computer and I wanna control it like this.

Is there similar program for mac os x?

incredible!
I am trying to implement that same casustic ā€¦
I would like to detect when I am in a video call to prevent someone from entering the room where I am working.
What type of light have you thought to use?
thank you @mattstein111

1 Like

There are a number of good options on Amazon, ranging from the amusing (that literally says ON AIR) to the basic (simple small red light). The other thing I was considering (but have moved on from) was to use an Innovelli zwave dimmer with RBG notification bar to go red when on a call, vs green when off.

Once I get this working Iā€™ll also turn on the in-fill lighting I have that makes my video conferencing look less filled with shadows.

Hi,
i managed to install this and get it up and running.
i have an issue that when I run a program it doesnā€™t focus on it, is there a way to force the focus?

also, does anyone has a script for increasing\decreasing volume by 1?

edit: changed to send.keys method and it works better

Having the same issues, any luck?

Having the same issue. Already tried disabling most of the sensors in the monitor addon but doesnā€™t seems to work. Only mqtt message I see is LWT. Did you have any luck solving this?

unfortunately not, i assume it to be a issue with our builds of windows 10, i have contacted the creators discord, git repo etc but no reply from any of them, think the project is dead, atleast for now.

1 Like

For whatever reason mine worked for about 10 minutes and then it just stopped. To resolve this I used task scheduler to restart the service. To play it safe Iā€™m doing every 5 minutes and for the last six hours it has worked great with no issues.

To learn how to use task scheduler to do this here are the instructions I followed, except with the service name being ā€œIOTLinkā€.

Good luck!

Sorry, no. I have given up on this option for now.

@bjorn1
Hi all, Iā€™ve just had a breakthrough with getting this to work.
Firstly, uninstall and delete all previous IOTLink software (windows), it doesnā€™t appear to update very well,
then remove or #comment out the iot sensors, integration etc in HA.
Start again from scratch, the present IOT is 2.0.3 I believe. Even though I had installed it as admin on windows I still had to find the IOTLink server process in Task Manager, open itā€™s properties and set it as ā€˜Run as Administratorā€™ - I did both IOT entries to make sure.
Use Integrations to discover the MQTT sensors or un-comment the entries from before.
Now it works. Mostly. I canā€™t get CPU info yet but thatā€™s next to sort out. Hope that helps.

I have an idea to monitor Zoom Meeting (My Son is having online classes) to check is he is on meeting or not. One way could be to find window by name. Another way could be to execute command tasklist /v /fo list /fi "imagename eq zoom*"| find /i "window title:" (or something like this). So when there is window with title beginning ā€œZoom Meeting IDā€ it means that meeting is ongoing if no such window then it is not started. Can someone advice me on how to achieve this?

My next automation will be to use NodeRed to push reminders to Amazon Echo to remind him to start class.

1 Like

Solved my issue, anyone can use my solution https://github.com/exKAjFASH/IOTLink

Iā€™ve tried to work with Zoom API, but their APIs do not provide ā€œIn A Meetingā€ status, for example GetUser returns ā€œactiveā€ status when you are on the meeting or not. Another APIs related to meetings provide only meetings created by this user and do not show meetings where user is joined so Iā€™ve ended up digging their API.

Then Iā€™ve spent some time to understand how addons are working in IOTLink and as for me it better to provide sample project which anyone can use as a base to start, so Iā€™ve copied commands addon, removed unnecessary code and implemented functionality using FindWindowClass. As Zoom do not show meeting ID in title Iā€™m unable to get it. But able to check Zoom video window by itā€™s class ā€œZPContentViewWndClassā€ - when it exist and visible then meeting is ongoing which is enough for me.

Hope it will be helpful for someone. Thank you for IOTLink - Iā€™ve added several sensors to my HA.

2 Likes

Pretty neat! Not sure that I have a use case for this but I like the idea.

Is there any mechanism to run a batch file and return the outputs via sensor?

1 Like

Same issue here.Did you find a fix for this issue?

@Klimaks @Fma965
This workaound has worked to me:
https://answers.microsoft.com/en-us/windows/forum/windows_7-performance/perfmon-problems-unable-to-add-counters/e90f231d-0014-457d-8b1f-5f342971597a?auth=1

Looking for something similar. I have some Powershell I want to execute, and collect the output (which will always be a number). Anyone found a way to do this?A

I am having an issue when it comes to publishing to a topic.

I have my MQTT Broker set up via the Add-on.

I have the MQTT integration set up.

I have IOT Live running on my computer.

I was able to auto discover all the sensors, binary_sensors and camera entities

But if I want to run a command via a script or even the MQTT panel (developer tools -> mqtt) nothing happens. No logs in HA or the Addon. Nothing in IOT link as well.

Running the MQTT explorer and connecting using the same creds. I am able to send the command and the commands action happens on my computer. Ex. iotlink/workgroup/desktop-name/commands/lock from the explorer will lock my computer. From Home assistant, nothing happens.

Is there something I may be missing?

Add On config has not been touched.

HA Env details

arch	x86_64
docker	true
hassio	true
os_name	Linux
os_version	5.4.0-28-generic
python_version	3.7.7
version	0.109.4
virtualenv	false

IOT Config:

mqtt:
  credentials:
    username: xxxx
    password: xxxx
  tcp:
    enabled: true
    hostname: 192.168.xx.xxx
    port: 1883
    secure: false
  websocket:
    enabled: false
    uri: 
    secure: false
  messages:
    qos: 1
    retain: false
  lwt:
    enabled: true
    qos: 1
    retain: true
    connectMsg: "ON"
    disconnectMsg: "OFF"
  discovery:
    enabled: true
    topicPrefix:
    domainPrefix: false
  clientId: my-desktop
  prefix: IOTLink
  cleanSession: true

Example of script

my_computer_lock:
  alias: My Computer - Lock
  sequence:
  - data:
      payload: ''
      topic: iotlink/workgroup/desktop-name/commands/lock
    service: mqtt.publish

EDIT: I was able to resolve by re installing the integration