Xiaomi IR Remote - Learning codes? [SOLVED]

Hi Everyone!

New here, happy to meet you all.

I am running Hassio 0.84.6 on a Raspb 3+.
I am very new to everything but I’ve got some lights to work through RFlink on the 433Mhz range, a Z-wave sensor is running very smoothly and some automations are regulating the air supply in my aquarium. Great success so far!

Now I’ve bought a Xiaomi IR Remote


Looks good and all, after a long battle I’ve found the Token and now I need to learn commands to turn on my devices ect. This is where I am stuck, I don’t know how to set the remote in “learning-mode” or where I can find the codes that are being transferred.

I’ve checked this page for Hassio - Xiaomi IR Remote and they talk about

A raw command is a command learned from remote.xiaomi_miio_learn_command .

I have absolutely no idea to where I can enter such a command. I’ve tried directly on Pi using a keyboard and monitor directly connected, I’ve tried SSH, I’ve tried it as a script but nowhere do I get any confirmation that what I am doing is right or wrong.

Can you guys point me in the right direction?

Thank you in advance :slight_smile:

1 Like

Is it not a service call ?

Under the developer tools in the Hass webpage, the icon that looks like a remote with 3 ‘waves’ coming out of it…

You were absolutely right! Thank you so much, I still have a lot to learn. But documentation could be more “newbie friendly” sometimes :slight_smile:

1 Like

I think it is your lack of understanding of this on the page:

Platform Services

The Xiaomi IR Remote Platform registers two services.

Which is probably fair enough in a newbie. It perhaps requires the word “services” to be a link to an expanation.

I was thinking way too difficult haha. I’ll be sure to read the page again. Thank you for your time!

I also found this true to start with, but as i find things that i think need examples or expanding, i create a pull request on GitHub.

If the devs don’t think it needs it they will let you know, but it’s best the new users update the docs, as they are the ones that lean on them more.

Thanks! I’ve updated the page with some additional information so that everyone should be able to do it with minimal experience.

Sadly I too have absolutely no idea what I’m supposed to do now that my remote is showing up under ‘unused entities’.

Thanks @Proxiart, got this to work I think.

Can you also give a little more information on the purpose of the slots? Do we need to worry about them at all or can we ignore them?
Thanks,

1 Like

can some one help me please?
I can learn the command and I can send the commands through developer and services but I cannot add it on my dashboard as entity
my code looks like that:
remote:

platform: xiaomi_miio

name: “AC remote”

host: XXX

token: XXXX
slot: 1

timeout: 30

can some one tell me what is the next step ?

Set up a button card with the tap action being to call the service.

Hi
I am rocky
I searched but I couldnt find how to add a button card with call service
do you know how ?
Thanks

I found it

  1. Go to an UI dashboard
  2. Click on the three dots right top
  3. Choose „edit“
  4. Click „Add new card“
  5. Choose „button“
  6. In the button card config. dialog click „tap action“
  7. In the opened dropdown click „call service“
  8. In the second dropdown choose the service you want to call
  9. Fill in the form

took it from another thread