Learn commands from a Bluetooth remote

How about learning commands from a remote. For example a remote that controls a ceiling fan. How can this device learn those commands?

It can’t.

Now now, that is a bit shortsighted.

As always, the answer is “it depends”. Bluetooth has several operating modes. It can be based on a connection model (usually bluetooth low energy, but classic BT would also be possible) or it can be connection-less. In case of a connection model, chances are it will be difficult (to say the least) to “learn commands”, especially if the connection is encrypted and authenticated. If they are not encrypted, BLE services can be reverse engineered. Takes a lot of effort, but it is possible.

However. In case of a connectionless model, the remote might just send beacons or advertisement packages with data in its manufacturer’s field. Those can be sniffed and learned. You do, however, need specific equipment to sniff those packets. An (Android) phone can do it (check “nRF Connect” for example, especially in conjunction with its separate logger tool). A better option would be to get a nRF52840 dongle and install nRF Connect on PC or wireshark with the proper tools for it.

It’s not an easy task though, unless you have the know-how. Once you have isolated those codes, you’ld probably need to write an app for it (and/or create a device that allows reproduction of the packets). Doable if you have the knowledge (and not even that expensive), but not for the faint of heart.

So in short: no, Homey can’t learn from a Bluetooth remote. You might be able to write an app for it, but there is no generic “learn this remote” option.

1 Like

Fair enough.

There is a “Discover devices” button in the Bluetooth LE tab of the developer tools which suggests something is possible though. Not that I ever got it to find any of my BLE peripherals but hey, something is there. Anyone knows the finer details from that?

It’s a simple BLE browser.

Hi,

I’m looking for the same thing!
Isn’t there a general BT device capable of learning BT commands and sending them, commanded by Homey?
Just like I use the SwitchBot Hub for unknown IR devices.

You missed the answer already given?

Hi,

No, I didn’t miss this answer. I do understand that Homey doesn’t have BT learning capabilities, but I was wondering if there is a device on the market that CAN do BT learning and also is compatible with Homey so that I can command it.
Just like using for infrared the SwitchBot Hub.

Never heard of that

That would make all Bluetooth as insecure as INFRARED or RF (433Mhz like KAKU)

What do you think?

As @Joost_Else already pointed out: it depends on how such remotes work.

There are plenty of BLE devices that basically just broadcast frames for everyone to pick up and interpret (similar to what beacons or Airtags do, or BLE sensors).

I think there are some ESP32-based projects that can be used for BLE replay: they record incoming BLE frames and can replay them (without the need for interpreting them). But I haven’t been able to find a consumer-friendly “BLE recorder” device.