Trigger HASS from Domoticz event

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Trigger HASS from Domoticz event

Post 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?
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Trigger HASS from Domoticz event

Post by Slinkos »

Really nobody?
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Trigger HASS from Domoticz event

Post 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?
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Trigger HASS from Domoticz event

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest