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