LIRC bridge is not connecting to the lircd daemon

I have a well-functioning (via irsend) lirc configuration, running on the same host as OpenHAB2. OpenHAB2 also works to control some z-wave devices and a squeezelite client. However, I’m unable to get the lirc binding to do anything; I get log messages saying it’s trying to do things, but no errors and also no effects. I’m hoping for a couple of things, specifically:

  1. A working sitemap that calls the lirc binding, as the lirc bridge tutorial stops before the sitemap;
  2. Is there a way to increase the chattiness of the binding? I get messages in the logs, but no error messages;
  3. The binding documentation doesn’t discuss sending repeated messages; I have to use (at least) --count=2 with irsend to get my receiver to respond to the command, so I know I need the binding to send every message twice.
  • Platform information:
    • Hardware: x86_64//8GB RAM/128GB MMC
    • OS: MintBox Ubuntu, Ulyana
    • Java Runtime Environment: OpenJDK 1.8.0
    • openHAB version: 2.4.0

I’ve read most of the posts in the Community about lirc; most are about trying to get lirc itself working, but this is not the problem I’m seeing. I’m fairly sure the OpenHAB2 binding is not connecting to the lirc daemon.

Things I’ve tried / know:

  1. I’ve tried putting multiple sendCommand() calls into the rules to simulate --count, to no effect.
  2. I can send IR commands with irsend -a localhost:7547 ..., so I’ve confirmed lircd is listening and responding calls sent over the port
  3. I can control lircd with the LIRC-Client mobile app, so I can connect to lircd from a remote machine and issue commands.
  4. As I mentioned, OpenHAB2 and lircd are running on the same machine, so it’s not a network issue
  5. I’m using basicui with manually configured everything
  6. lircd emits logs when I send commands via irsend or the mobile app; it does not log any connection or action when I issue commands through OpenHAB2.
  7. OpenHAB2 reports that it’s receiving the instructions and passing them on to the binding, but it doesn’t log anything else – in particular, no error messages.
  8. I based most of my configuration on https://github.com/mediamanrit/RasLIRC – it also stops short of defining a sitemap.

Frankly, I doubt it’s the sitemap, but I’d still like to see a successful one.

lirc.things

Bridge lirc:bridge:local [ host="localhost", portNumber="7547" ] {
        Thing remote SonyAmp [ remote = "sony_RM-PP411_receiver-AV2" ]
}

I also tried using the localhost IP (127.0.0.1). The remote name is the same name as passed to irsend to identify the remote.

lirc.items

String Media_Sony_Amp_Remote "Sony Amp Remote Virtual Item"
String LIRC_Media_Sony_Amp { channel="lirc:remote:local:SonyAmp:transmit" }

Relevant sitemap section

        Frame label="Amp" {
                Switch item=Media_Sony_Amp_Remote mappings=["MUTE"="Mute"]
        }

Rules

rule "Media Sony Amp Remote Control"
when
        Item Media_Sony_Amp_Remote received command
then
        switch (receivedCommand) {
                case "MUTE": {
                        logInfo("RULE", "Media_Sony_Amp_Remote - MUTING")
                        sendCommand(LIRC_Media_Sony_Amp, "MUTING")
                }
        }
end

Relevant log messages

2020-12-09 14:35:34.633 [ome.event.ItemCommandEvent] - Item 'Media_Sony_Amp_Remote' received command MUTE
2020-12-09 14:35:34.642 [ome.event.ItemCommandEvent] - Item 'LIRC_Media_Sony_Amp' received command MUTING
2020-12-09 14:35:34.644 [nt.ItemStatePredictedEvent] - LIRC_Media_Sony_Amp predicted to become NULL

lircd logs

For good measure, here are the logs when I use irsend or the mobile app – I do not get these messages (or any other messages) when I trigger the OpenHAB2 binding.

Dec 09 13:40:14 media lircd[39844]: lircd-0.10.1[39844]: Notice: accepted new client from 127.0.0.1
Dec 09 13:40:14 media lircd-0.10.1[39844]: Notice: accepted new client from 127.0.0.1
Dec 09 13:40:21 media lircd[39844]: lircd-0.10.1[39844]: Info: removed client
Dec 09 13:40:21 media lircd-0.10.1[39844]: Info: removed client

Interestingly, I just noticed that the logInfo command isn’t emitting anything in the log. However, I specifically used “MUTE” instead of the IR “MUTING” command, and I see that the MUTING command is (apparently) being sent. Or it’s trying to.

I think I have to figure out why the binding isn’t connecting to lircd, because it’s obviously not (according to the lircd logs) – but the binding is also not reporting an error trying to connect and I’m not sure where to go next.