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.
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?
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?
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.
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?
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