Page 1 of 1

Trigger HASS from Domoticz event

Posted: Thursday 21 September 2017 22:45
by Slinkos
Hi all, lately I have been exploring the functions of HASS (Home Assistant). For now I don't want to migrate my home Automation to the HASS platform, but it has some components that I like. So what I actually want to do is active HASS scripts, from a Domoticz event.

Now I read stuff about MQTT, but that is way too complicated for me. Also I feel like that's a bit overkill because I don't have the need to transfer data and stuff, I just want a script to be activated.

Does anyone have any experience with this?

Re: Trigger HASS from Domoticz event

Posted: Thursday 05 October 2017 14:49
by Slinkos
Really nobody?

Re: Trigger HASS from Domoticz event

Posted: Saturday 14 October 2017 23:45
by Slinkos
I got a lot further with this. I installed a MQTT broker on my Raspberry that is running Domoticz and with misquitto_pub I am able to trigger scripts in HASS.
It looks like this: mosquitto_pub -h localhost -p 1883 -t living_room/media/onkyo -m "on"

Now I want this automatically to happen within a Domoticz event. So if a Domoticz switch "Music" = On, then I want to send that mqtt message. But how?

Re: Trigger HASS from Domoticz event

Posted: Sunday 15 October 2017 0:26
by Slinkos
For now I got it working with making a .sh script in the home/pi/domoticz/scripts folder. In that script I just used the musquitto_pub line.
After that I run the script with the start script option in the Blockys.

But if anyone has other or better suggestions, I would love to hear them.