Hi Guys, I’m pretty new to Home Assistant, but have been using Domoticz for quite some time now.
I am in the process of getting familiar with HA, and I’m thinking of switching to HA in the future.
Now I don’t like the idea of a “Big Bang”, so I was thinking of combining my two systems. So I can slowly set things over to HA.
Now there is the challenge. I already have some scripts in HA, to start a Spotify playlist. So I like to start this script, under specific conditions that are configured in Domoticz. So in short: I want a Domotiz event that activates my HA script.
What would be the best way to do that? I read something about MQTT, but I’m not sure what that is and how it works. Hope you guys can help me out!
I have a feeling that MQTT is more complicated than necessary, because I don’t have the need to transfer any data at this point. All I want to do is activate a script that I made in HASS, triggered by a Domoticz event.
For your purposes, using MQTT should be straightforward. Set up the internal broker by adding mqtt: to the top level of your configuration .yaml The documentation is here
To test this, I would use a phone app or a command line tool like mosquitto_pub to send mqtt messages that trigger the event. You could also turn on mqtt logging to check that you are receiving messages
Then all you have to do is figure out how to send that message in Domoticz.
Ok so I got a little further. I found out that by using the inernatl broker (with only adding mqtt: to the config and nothing else). you have to give username (homeassistant) and password (api password). But even with that it is not working.
For testing purpose I used the public broker (test.mosquitto.org). That does work.