Skip to content

Codes sometimes reproducibly don't work with Siri until I toggle the state twice in the Home app - debug help request #754

@hepcat72

Description

@hepcat72

I don't know if this is a problem with this plugin or my Broadlink RM Mini 3, but I have finally ruled out the TV and I think I've ruled out Siri. This had been happening quite some time with my previous dumb TV (a Magnavox) and now has happened with our new (hand-me-down) dumb LG TV, and it's more of a problem because CEC on the LG doesn't work (correctly).

PROBLEM: It appears that sometimes the code sent by the Mini doesn't work, and repeated sends of the same code reliably and reproducibly don't work either. The light on the mini flashes and the code in the homebridge log checks out (it is the correct code), so it thinks it is sending a code.

Notable details:

  • I am using discrete on/off codes, not a toggle (obtained from irdb.globalcache.com)
  • I am using Siri to issue the command (e.g. "Hey Siri, turn off the LG TV")
  • whenever this has happened, I have noted that the state of the button in the Home app is out of synch with the actual TV power state (e.g. the home app shows it is off, but it is on and I'm trying to turn it off).

WORKAROUND: When the problem happens, I can open up the home app and manually toggle the button twice. The first tap synchs the actual power state with the home button state so that it is accurate. The second tap actually changes the power state of the TV (e.g. if I am trying to turn off the TV, I turn it "on" in the home app [and the TV remains on] and then I turn it off in the home app [and the TV actually turns off]). Every subsequent Siri on/off command then works as expected and I am unable to reproduce the problem even if I intentionally put the TV power state and the home app button power state out of synch.

Since this has now happened with 2 different TV's, I no longer think that it is a failure of the TV to correctly respond to the code. I feel like it must be that either the Mini is screwing up the code or the plugin is somehow showing the right code in the log, but it differs from the actual code sent.

Here is the accessory in the config:

                {
                    "name": "LG TV",
                    "host": "192.168.1.61",
                    "type": "outlet",
                    "allowResend": true,
                    "data": {
                        "on": "260050000001289412121212123712121212121212121212123712371212123712371237123712371212121212371212121212121237123712371237121212371237123712121212120005a50001284a12000c980d05000000000000",
                        "off": "260050000001289412121212123712121212121212121212123712371212123712371237123712371237121212371212121212121237123712121237121212371237123712121212120005a50001284a12000c980d05000000000000"
                    }
                },

Note, I have 2 mini's, that's why the host is set.

I am creating this issue to see if anyone has any debug suggestions. How can I confirm that the mini is actually sending the correct code, aside from what's in the homebridge log?

Additional Information

To be transparent, I am technically equating 2 different situations with the 2 TVs, because I didn't want to complicate things, but I think that there is additional information that may provide a clue to the root of the problem. I never actually had discrete on/off codes for the Magnavox TV. Instead, I simply had the toggle code for both the on and the off codes:

                {
                    "name": "TV",
                    "host": "192.168.1.61",
                    "type": "outlet",
                    "allowResend": true,
                    "data": {
                        "on": "26004e002119211a3e1a211a201a2119211a201a2136211a3e1a21000b96201a211a3e1a201a211a201a211a201a213621193f1a20000b96201a211a3e1a201a211a201a211a201a2136201a3f1a20000d0500000000000000000000",
                        "off": "26004e002119211a3e1a211a201a2119211a201a2136211a3e1a21000b96201a211a3e1a201a211a201a211a201a213621193f1a20000b96201a211a3e1a201a211a201a211a201a2136201a3f1a20000d0500000000000000000000"
                    }
                },

And I created a shortcut in node-red for the workaround:

SHORTCUT FOR THE WORKAROUND: This is essentially the same workaround as above, but since both on and off are set to toggle, it only needs to issue the opposite command once. I implemented the shortcut in node-red. Using node-red's homekitd node, I created a separate "TV toggler" button which retrieves the state of the homebridge TV button and issues the opposite command. E.g. if I'm trying to turn off the TV and the home button says it's off, it issues the on command (which turns the TV off because they're both the toggle code).

Insight

Since the config for the old Magnavox TV had the same toggle code for both on and off, this rules out the possibility that the plugin is sending the opposite code (but reporting in the log that it is sending the intended code). So I have no reason to believe that it is sending the opposite code.

Since the light on the mini flashes, it seems that the mini at least things it is sending a code. I just have no way to confirm it is sending the code.

The physical TV remote always works and there is nothing obstructing the line of sight between the mini and the TV, so either the mini is sending the wrong code or it thinks it is sending a code but it is not.

My intuition tells me that since this only seems to happen when the state is out of synch between the home app and the mini knows nothing about that, the problem must be with the plugin. I should actually test this using the broadlink app. If I can get a discrete code in the broadlink app to work when the siri-initiated command doesn't, that should rule out an issue with the mini itself.

Since I cannot intentionally reproduce the problem, my guess is that it has something to do with the initial state of the plugin after a homebridge restart. Though I don't know if the way that I create the synch issue is important (e.g. I could stand in front of the emitter, push the physical button, use the physical remote). I will have to see if I can determine a way to reproduce the issue...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions