michaelarnauts / cec-mqtt-bridge

A HDMI-CEC to MQTT bridge for connecting HDMI-CEC-devices to your Home Automation system.
145 stars 48 forks source link

Allow specifying the location of the lirc daemon #12

Open michaelarnauts opened 5 years ago

michaelarnauts commented 5 years ago

It seems that on OSMC, the lirc daemon is not on the default /var/run/lircd socket.

You need to change the code like this:

diff --git a/bridge.py b/bridge.py
index 7be2d11..387f570 100755
--- a/bridge.py
+++ b/bridge.py
@@ -192,7 +192,7 @@ def ir_listen_thread():

 def ir_send(remote, key):
-    subprocess.call(["irsend", "SEND_ONCE", remote, key])
+    subprocess.call(["irsend", "--device=/run/lirc/lircd-lirc0", "SEND_ONCE", remote, key])

 def cec_refresh():

This needs to be a configuration option.