Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chuangmi IR remote doesn't work, configuration error? #15086

Closed
xcray opened this issue Jun 22, 2018 · 2 comments
Closed

chuangmi IR remote doesn't work, configuration error? #15086

xcray opened this issue Jun 22, 2018 · 2 comments

Comments

@xcray
Copy link

xcray commented Jun 22, 2018

Home Assistant release with the issue:

0.71.0

Last working Home Assistant release (if known):
don't know

Operating environment (Hass.io/Docker/Windows/etc.):

uname -a:
Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l GNU/LinuxComponent/platform:

https://www.home-assistant.io/components/remote.xiaomi_miio/

Description of problem:

  1. Command learning works fine, that's all.
  2. While trying send command with json { "entity_id": "remote.miir","command":"ac28"} , it failed.
    with or without "raw:" at the beginning of the learned command.
    If the command is beginning with "raw" or ending with ":38400" , it will fail with exception: {'code': -5008, 'message': 'magic error'}.
    If the command doesn't have either of beginning "raw:" and endding ":38400", the remote controller will die! The light will go off and network connection also lost.
    Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
remote:
  - platform: xiaomi_miio
    host: 10.0.1.95
    token: f670e9d4aab90a6b64a565b5ed943fc0
    name: miIR
    commands:
      ac29:
        command:
                - raw:a6WbADcAAACDAAAA9QEAAHECAAC9BgAAygsAABAMAAA3EQAA2TEAAH5FAADgKAEAAAAAAAAAAAAAAAAAAAAAAAAAAABWdkIyQjIyQjJCQkIyMjJCQkkIyMkJCMkIyQjIyQjIyQkIyMjIyMkJCMjIyMjIyMjIyMjIyQjIyMjIyMjIyMjIyMjJCQkJCMjJCQqOAkAE=:38400
      ac28:
        command:
                - raw:Z6WdAC0AAACGAAAA/QEAAGsCAAC0BgAA8AsAAFERAAB+OwAAvD8AAJ9CAABA5wAAAAAAAAAAAAAAAAAAAAAAAAAAAABVZUIyQjIyQjJCQkIyMjJCQkkIyMkJCMkIyQjIyQjJCMkIyMjIyMkJCMjIyMjIyMjIyMjIyQjIyMjIyMjIyMjIyMjJCQkJCMkJCQpNwgKAB

Traceback (if applicable):

Jun 22 20:00:41 raspberrypi hass[1389]: 2018-06-22 20:00:41 INFO (MainThread) [homeassistant.setup] Setup of domain remote took 10.0 seconds.
Jun 22 20:00:41 raspberrypi hass[1389]: 2018-06-22 20:00:41 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=remot>
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.components.remote] Setting up remote.xiaomi_miio
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.components.remote.xiaomi_miio] Initializing with host 10.0.1.95 (token f670e...)
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.components.remote.xiaomi_miio] chuangmi.ir.v2 1.2.4_38 MC200 detected
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=remote, service=xiaomi_miio_learn_command>
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state remote.miir=on; friendly_name=小米遥控器, hidden=True @ 2018-06-22T20:01:12.560817+08:00>, entity_id=remote.miir, old_state=None>
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975287888-7, domain=group, service_data=visible=False, entities=['remote.miir'], object_id=all_remotes, name=all remotes, service=set>
Jun 22 20:01:12 raspberrypi hass[1389]: 2018-06-22 20:01:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state group.all_remotes=on; order=3, auto=True, hidden=True, friendly_name=all remotes, entity_id=('remote.miir',), homebridge_hidden=True @ 2018-06-22T20:01:12.589188+08:00>, entity_id=group.all_remotes, old_state=None>
Jun 22 20:01:36 raspberrypi hass[1389]: 2018-06-22 20:01:36 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975287888-8, domain=remote, service_data=command=ac29, entity_id=remote.miir, service=send_command>
Jun 22 20:01:36 raspberrypi hass[1389]: 2018-06-22 20:01:36 ERROR (Thread-10) [homeassistant.components.remote.xiaomi_miio] Transmit of IR command failed, raw:a6WbADcAAACDAAAA9QEAAHECAAC9BgAAygsAABAMAAA3EQAA2TEAAH5FAADgKAEAAAAAAAAAAAAAAAAAAAAAAAAAAABWdkIyQjIyQjJCQkIyMjJCQkkIyMkJCMkIyQjIyQjIyQkIyMjIyMkJCMjIyMjIyMjIyMjIyQjIyMjIyMjIyMjIyMjJCQkJCMjJCQqOAkAE=:38400, exception: {'code': -5008, 'message': 'magic error'}
Jun 22 20:02:09 raspberrypi hass[1389]: 2018-06-22 20:02:09 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975287888-9, domain=remote, service_data=command=6WbADcAAACDAAAA9QEAAHECAAC9BgAAygsAABAMAAA3EQAA2TEAAH5FAADgKAEAAAAAAAAAAAAAAAAAAAAAAAAAAABWdkIyQjIyQjJCQkIyMjJCQkkIyMkJCMkIyQjIyQjIyQkIyMjIyMkJCMjIyMjIyMjIyMjIyQjIyMjIyMjIyMjIyMjJCQkJCMjJCQqOAkAE=, entity_id=remote.miir, service=send_command>
Jun 22 20:02:09 raspberrypi hass[1389]: 2018-06-22 20:02:09 ERROR (Thread-15) [homeassistant.components.remote.xiaomi_miio] Transmit of IR command failed, 6WbADcAAACDAAAA9QEAAHECAAC9BgAAygsAABAMAAA3EQAA2TEAAH5FAADgKAEAAAAAAAAAAAAAAAAAAAAAAAAAAABWdkIyQjIyQjJCQkIyMjJCQkkIyMkJCMkIyQjIyQjIyQkIyMjIyMkJCMjIyMjIyMjIyMjIyQjIyMjIyMjIyMjIyMjJCQkJCMjJCQqOAkAE=, exception: {'code': -5008, 'message': 'magic error'}
Jun 22 20:02:45 raspberrypi hass[1389]: 2018-06-22 20:02:45 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975287888-10, domain=remote, service_data=command=ac28, entity_id=remote.miir, service=send_command>
Jun 22 20:02:55 raspberrypi hass[1389]: 2018-06-22 20:02:55 ERROR (Thread-7) [homeassistant.components.remote.xiaomi_miio] Transmit of IR command failed, raw:Z6WdAC0AAACGAAAA/QEAAGsCAAC0BgAA8AsAAFERAAB+OwAAvD8AAJ9CAABA5wAAAAAAAAAAAAAAAAAAAAAAAAAAAABVZUIyQjIyQjJCQkIyMjJCQkkIyMkJCMkIyQjIyQjJCMkIyMjIyMkJCMjIyMjIyMjIyMjIyQjIyMjIyMjIyMjIyMjJCQkJCMkJCQpNwgKAB, exception: Unable to discover the device 10.0.1.95

Additional information:

@syssi
Copy link
Member

syssi commented Jun 29, 2018

Please try to update the learned commands. I assume they are improper.

@xcray
Copy link
Author

xcray commented Jun 30, 2018

after upgraded to 0.72.1, retried as @syssi advised, and succeed. I don't know if it's because of the versions's difference.

re-enable ir remote in configuration.yaml, restart HA, learn the commands again and edit configuration again (add blank after "- raw:", which is not correct), and restart HA again. then failed again while trying send command:

Jun 30 14:02:08 raspberrypi hass[8653]: 2018-06-30 14:02:08 ERROR (Thread-20) [homeassistant.components.remote.xiaomi_miio] Transmit of IR command failed, OrderedDict([('raw', 'Z6WVAP4BAABqAgAArwYAAMkLAAAEDAAAUREAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0VCAQIBAQIBAgICAQECAgEBAQEBAgEBAQEBAQIBAQECAgEBAgECAgEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAgICAgEBAQEAE=')]), exception: {'code': -5008, 'message': 'magic error'}

Jun 30 14:02:40 raspberrypi hass[8653]: 2018-06-30 14:02:40 ERROR (Thread-6) [homeassistant.components.remote.xiaomi_miio] Transmit of IR command failed, OrderedDict([('raw', 'Z6WVAPwBAABrAgAAtgYAAMsLAAACDAAAUxEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0VCAQIBAQIBAgICAQICAgEBAQEBAgEBAQEBAQIBAQECAgEBAgECAgEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEAE=')]), exception: {'code': -5008, 'message': 'magic error'}

remove the blank after "raw:" and restart HA, it succeed!
Thank you @syssi , so the commands I put into the configuration file last time (on 0.71.0) maybe have some problems.

@xcray xcray closed this as completed Jun 30, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants