LIRC binding problem on raspbian stretch - connection refused

Hello there,
I have successfully installed LIRC on raspbian stretch and can manually send IR-commands over the console with:
irsend SEND_ONCE ledband_werkstatt KEY_POWER

The binding is configured like this:
Bridge lirc:bridge:local [ host=“0.0.0.0”, port=“8700” ] {
Thing remote ledband_werkstatt [ remote=“ledband_werkstatt” ]
}

The lirc_options.conf file has the same address and port, so it should work. In the logfile of openhab I see this message:

2018-01-30 16:26:22.910 [ERROR] [nding.lirc.handler.LIRCBridgeHandler] - Connection to LIRC failed
java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) [?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204) [?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) [?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [?:?]

Anybody knows how I could solve this problem?

Luz

Hi @Mr_Luz !

I have the same issue with latest snapshot, did you solve your problem?

2018-03-31 21:17:50.828 [ERROR] [nding.lirc.handler.LIRCBridgeHandler] - Connection to LIRC failed
java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) [?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) [?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) [?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [?:?]
at java.net.Socket.connect(Socket.java:589) [?:?]
at java.net.Socket.connect(Socket.java:538) [?:?]
at java.net.Socket.(Socket.java:434) [?:?]
at java.net.Socket.(Socket.java:211) [?:?]
at org.eclipse.smarthome.binding.lirc.internal.connector.LIRCConnector.connect(LIRCConnector.java:61) [216:org.eclipse.smarthome.binding.lirc:0.10.0.201803241900]
at org.eclipse.smarthome.binding.lirc.handler.LIRCBridgeHandler.connect(LIRCBridgeHandler.java:110) [216:org.eclipse.smarthome.binding.lirc:0.10.0.201803241900]
at org.eclipse.smarthome.binding.lirc.handler.LIRCBridgeHandler.access$4(LIRCBridgeHandler.java:99) [216:org.eclipse.smarthome.binding.lirc:0.10.0.201803241900]
at org.eclipse.smarthome.binding.lirc.handler.LIRCBridgeHandler$1.run(LIRCBridgeHandler.java:72) [216:org.eclipse.smarthome.binding.lirc:0.10.0.201803241900]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

I had the same issue on Stretch, after following this guide to setup lirc.

It turns out that even though the option “–listen” is included in LIRCD_ARGS in configuration, the service was not really listening on any port. I confirmed using:
sudo netstat -peanut | grep 8765

So I edited /etc/lirc/lirc_options.conf and edited/commented out:
listen = 0.0.0.0:8765
(which is what I had in my LIRC bridge configuration)

After restarting lirc (sudo /etc/init.d/lircd restart) netstat showed the service bound on 8765.
So, after also restarting openHAB, the bridge went online!

//edit:
@HALLO01, @Mr_Luz
I just noticed that the default behavior of the forum is to “track” threads instead of “watch”, which means you guys won’t be notified if I don’t reply to you specifically, hence the edit. Although a long time has gone by, I’m sure you’ve found the solution by now! This is more for anyone googling the same problem.

2 Likes