How about learning commands from a remote. For example a remote that controls a ceiling fan. How can this device learn those commands?
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.
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.