IOTLink configuration

I am running OH3 on WIN10 and trying to send a command to WIN10 by IOTLink.
Mosquitto is installed an set up.
I installed IOTLink and tried to configure it but without success.
In the C:\ProgramData\IOTLink\Configs\configuration.yaml I have to enter the hostname. Is this the IP
or the name of the PC IOTlink is installed on (MINIX)?

In OH I tried the commands;
val mqttActions = getActions(“mqtt”,“mqtt:broker:MQTTBrokerOH”)
mqttActions.publishMQTT(“iotlink/workgroup/MINIX/commands/run”,"{“command”: D:\openHAB\runtime\bin\oh_net_neustart.exe}")
I don’t know if: “iotlink/workgroup/MINIX/commands/run” is where IOTLink is listening or how to set it up correctly.

Please help!

Typically one uses the IP address or the DNS name of the machine. If you can ping it by name you can often use the name. If not use the IP.

But IOTLink is not openHAB. You’re likely to find better help on how to configure this third party software an IOTLink forum.

Though it’s worth mentioning there are a number of posts about IOTLink on this forum, including a tutorial. I assume you searched and did not find what you need in those posts?

https://community.openhab.org/search?q=IOTLink

I have read everything and search a lot. The tutorial on OH is for homeassistent!?
I think to be very close. I guess I just need an running example how to publish a run command correctly.
This is not working: mqttActions.publishMQTT(“iotlink/workgroup/MINIX/commands/run”,"{“command”: D:\openHAB\runtime\bin\oh_net_neustart.exe}")
Maybe the topic is case sensitiv, or I have to add the other arguments as path or user?
Anyone using IOTLink successfully?

Um no. If you are referring to Remote Control Windows PC through IOTLink with MQTT then, as was stated

  • HomeAssistant discovery is now supported by MQTT2 binding, make sure it is enabled and you can add the things on the PaperUI inbox

HA has a standard way to structure MQTT topics. IOTBroker follows that standard. When a device or software follows that standard, openHAB can automatically discover the device and create the MQTT Things for you.

Granted it’s an older tutorial but if you just replace “PaperUI” with “MainUI” it still applies.

Your computer and or openHAB server do not need to know each other.
But both need to know the mqtt broker (wich is typically installed on your openHAB server).

`C:\ProgramData\IOTLink\Configs\configuration.yaml´ looks like this on my pc.

mqtt:
  ########################################################################
  # Credentials Settings
  ########################################################################
  credentials:
    username: iotlink
    password: ******************************
  ########################################################################
  # TCP Connection Settings
  ########################################################################
  tcp:
    enabled: true
    hostname: 192.168.1.xxx (mqtt broker address)
    port: 1883
    secure: false
    tlsConfig:
        allowUntrustedCertificates: false
        ignoreCertificateChainErrors: false
        ignoreCertificateRevocationErrors: false
        caCertificate:
        clientCertificate:
        clientCertificatePassword:

[...]

  ########################################################################
  # General MQTT Settings
  ########################################################################
  clientId: myComputer
  prefix: IOTLink
  globalPrefix: IOTLink/all
  cleanSession: true
  autoReconnectDelay: 10
  keepAlivePeriod: 60
  maxPendingMessages: 100

[...]

########################################################################
# General Addon Configuration
########################################################################
addons:
  enabled: true

Here is an example where I un/mute my pc.
(using openHAB v2.5 and the old mqtt1 binding)

Switch  Godzilla_CMD_Mute         "Mute"           <switch>  (gWindows)  {mqtt=">[mosquitto:iotlink/workgroup/godzilla/commands/run:command:ON:{\"command\"\\: \"C\\:\\\\ProgramData\\\\chocolatey\\\\bin\\\\nircmd.exe\", \"args\"\\: \"mutesysvolume 1\", \"path\"\\: \"C\\:\\\\ProgramData\\\\chocolatey\\\\bin\", \"user\"\\: \"\", \"visible\"\\: false, \"fallback\"\\: true}],
                                                                                >[mosquitto:iotlink/workgroup/godzilla/commands/run:command:OFF:{\"command\"\\: \"C\\:\\\\ProgramData\\\\chocolatey\\\\bin\\\\nircmd.exe\", \"args\"\\: \"mutesysvolume 0\", \"path\"\\: \"C\\:\\\\ProgramData\\\\chocolatey\\\\bin\", \"user\"\\: \"\", \"visible\"\\: false, \"fallback\"\\: true}]"}

It looks a little complicated, because of the arguments of the command.

Thank you!
Meanwhile my topic syntax seams to be correct. I can send a message.
I checked the topics mit MQTT.fx .
The notify topic received: {“title”: “This is a test”, “message”: “Message”} and is displayed in a message window.
The run topic received: {“command”:C:\Programme\Google\Chrome\Application\chrome.exe",“path”:“C:\Programme\Google\Chrome\Application”,“user”:"",“visible”:true,“fallback”:true}
which doesn’t start chrome. The syntax seam correct to me.
Can anyone see an error?

As you can the in my example, I had to escape the backslaches (\\) in my item config.

Please post the complete line of your configuration.
Maybe we see more.

But like I said: I do not know the configuration for oopenHAB v3, yet.

    mqttActions.publishMQTT("iotlink/workgroup/minix/commands/run","{\"command\":\"D:\\openHAB\\runtime\\bin\\test.exe\",\"args\":\"\",\"path\":\"D:\\openHAB\\runtime\\bin\\\",\"user\":\"\",\"visible\":true,\"fallback\":true}")

The reboot command works to, only the run command makes problems!

Thank you all for the help. I found the error. 4 \\ are needed.
The correct publish line:
mqttActions.publishMQTT(“iotlink/workgroup/minix/commands/run”,“{"command":"D:\\\\openHAB\\\\userdata\\\\bin\\\\oh_net_neustart.exe","args": "","path":"D:\\\\openHAB\\\\userdata\\\\bin","user":"","visible":true,"fallback":true}”)

In the IOTLink config file I had to add: hostname: 192.168.8.105
and change topicPrefix from homeassisstent to iotlink