I’m completely new to HASS, or doing anything with raspberryPI.
So far I’ve installed Rasbian on a Pi3 and enabled the Mosquitto service. I’ve also installed a MQTT plugin in Eventghost on my Windows10 pc. I can publish a topic from Mosquitto on the Pi and have eventghost successfully subscribe/receive the message, but when I try to have eventghost publish to said topic I cant seem to have HASS receive it. (it’s probably my automation that’s wrong) I would really appreciate some help with getting the two talking to each other.
Hopefully someone else is using evenghost for the same thing. Here’s a snippet of the config.yaml
I am not familiar with eventghost - but it seems to be another home automation system.
What are you trying to do with HASS?
MQTT is just a messaging service that you can post and collect messages from. Very handy when communication between machines.
Do you want HASS to send a message to MQTT that eventghost will collect so that it performs an action, or is the intention for HASS to listen for a message on MQTT and then it act?
In either case, you will need to compose your message for MQTT - which entails a topic and a payload
Maybe if you can clarify your use case for HASS we can help some more
I have a HTPC that is always on. It receives all the IR codes from my harmony hub and then reacts based on different things. In this case, eventghost sees when I change to the chromecast input, and re purposes the media control buttons as events to send MQTT topics. I can control my chromcast with my harmony remote now! This automation in itself has made investing in HASS worth it. Its always bugged me that I couldn’t have a physical remote for chromecast.
Glad you got it working - I used the Hive overview to get my head around MQTT also, great suggestion.
Couldn’t agree more about the chromecast control!
I am hoping the guys get finished on the harmony hub component soon, then I can augment it with some HASS magic to react to remote presses on the chromecast.
Perhaps if you post your solution, you could also mark as solved. Then others could use it to resolve similar issues
Well, first off you need to install Eventghost on a windows pc and have an IR receiver. I would absolutely recommend the usb-uirt it’s both a receiver and transmitter. It works really well, and has good Eventghost support. All IR codes received show up as events and can be reacted to as you wish. Eventghost also tracks what system processes are running so it can activate/deactivate things based on what program/event has occured.
I have the Harmony hub set up with my TV, AR and and a dummy device that is only there for the “blank” IR codes. (IR Codes that none of my other devices will react to.) The dummy device IR codes are used differently by Eventghost depending on different events it tracks.
In the case of the Chromecast, receiving the ir code for the input that my Cromecast is on, is used as an event to enable a folder that reacts to media buttons on the Harmony Smart Control by sending MQTT messages to HASS.
I hope that’s clear enough to let you know if you want to attempt a try. If you assistance as you set it up I’m willing to help with what I can. I’m still getting the hang of it all.
Assuming you have Eventghost installed, head to the link below and download the “MQTT Client using Paho/” plugin for Eventghost. Open the file with Eventghost so it installs. After that you can add the MQTT plugin to your Eventghost Configuration Tree, allowing you to Subscribe and Publish to MQTT Topics on the Home-Assistant MQTT server.
I’m assuming all that makes sense. If it doesn’t I’m willing to go into as much detail as needed as long as your patient.
@Orthodoxmonster you seem pretty knowledgeable in EventGhost given you’ve created a MQTT plugin to send commands from EG > HASS.
I’d like to do the same, but I’m trying to be simpler by using HASS’s RESTful API (HTTP Post JSON messages). I have the JSON messages I wish to send and am trying to use Python to send the requests i need from EG > HASS. Only problem is it doesn’t seem to work.
NOOB question. Do I need to install Python on my windows 8.1 machine running EG, so that I can execute Python commands in EG? Nowhere have I read that Python needs to be installed so I assume it’s not necessary.
@Orthodoxmonster I managed to figure it out. Find below the Python Script I used to do similar to what you’re doing with MQTT, but instead I’m just using a HTTP call to HASS Rest API. You can easily adapt my code below to run any action on HASS.
What the Python Code below is doing is calling HASS to tell my LG TV to set the volume to 50%. Within EventGhost I have this Python script triggered whenever I turn on my HTPC (given that i’ll control volume via Windows OS volume, rather than the TV directly)
For future readers: the krambriw website seems to be (permanently?) down, but I found the author’s account on the EventGhost forums and he has a link to his Google Drive in his signature, so you can still download the plugin from there.
I’ve now got an EventGhost MQTT subscriber listening on a topic to hibernate my PC with a macro when a message is published there. I’ve integrated it with the Wake-on-LAN switch’s turn_off script on my Home Assistant and it’s working quite nicely so far
I have tried to install the MQTT plugin in eventghost but when trying to add the plugin eventghost stalls completely. I have tried both on a win 8.1 and a win 7 machine with same result.
Anyone got an idea what can be done?
Did you find any instructions how to configure or use the EQ MQTT plugin?
When I configure the plugin I get a dialog with “Currently active threads” but only column headers and no entries.
Any idea what I’m missing?