『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 3948|回复: 3

[技术探讨] smartIR控制空调一直无法开启

[复制链接]

4

主题

118

帖子

444

积分

中级会员

Rank: 3Rank: 3

积分
444
金钱
326
HASS币
0
发表于 2019-7-12 17:13:56 | 显示全部楼层 |阅读模式
HA:0.92.2smartIR:
博联broadlink pro

遇到的问题:1、同时配置了空调、风扇、电视, 风扇和电视控制都没问题,打开关闭,调风速等设置都没问题。 2、唯独空调打开有问题,如果直接打开空调会报下面的错误。3、空调可以直接调成制冷、制热、自动等模式,风速调整也都没问题,唯独就是打开空调控制不了。不知道是什么原因, 还请哪位大神多多指教。

这是我得目录结构:

smartir/
├── climate.py
├── codes
│   ├── climate
│   │   └── 1181.json
│   ├── fan
│   │   └── 1020.json
│   └── media_player
│       └── 1040.json
├── controller.py
├── fan.py
├── __init__.py
├── manifest.json
├── media_player.py
├── __pycache__
│   ├── climate.cpython-35.pyc
│   ├── controller.cpython-35.pyc
│   ├── fan.cpython-35.pyc
│   ├── __init__.cpython-35.pyc
│   └── media_player.cpython-35.pyc
└── services.yaml

5 directories, 15 files


这是配置文件信息:

空调的代码
- platform: smartir
  name: keting_ac
  unique_id: keting_ac
  device_code: 1181
  controller_data: 192.168.88.166
  temperature_sensor: sensor.temperature
  humidity_sensor: sensor.humidity


风扇的代码:
- platform: smartir
  name: kayee_fan
  unique_id: kayee_fan 
  device_code: 1020
  controller_data: 192.168.88.166
电视机的代码:
- platform: smartir
  name: lg_tv
  unique_id: lg_tv
  device_code: 1040
  controller_data: 192.168.88.166


错误信息:
'low'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/core.py", line 1138, in async_call
    self._execute_service(handler, service_call))
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/core.py", line 1160, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
    required_features
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/home/pi/.homeassistant/custom_components/smartir/climate.py", line 313, in async_turn_on
    await self.async_set_operation_mode(self._last_on_operation)
  File "/home/pi/.homeassistant/custom_components/smartir/climate.py", line 295, in async_set_operation_mode
    await self.send_command()
  File "/home/pi/.homeassistant/custom_components/smartir/climate.py", line 327, in send_command
    command = self._commands[operation_mode][fan_mode][target_temperature]
KeyError: 'low'
调用服务 climate/turn_on 失败。 'low'


回复

使用道具 举报

3

主题

81

帖子

479

积分

中级会员

Rank: 3Rank: 3

积分
479
金钱
398
HASS币
0
发表于 2019-7-17 14:20:04 | 显示全部楼层
貌似也碰到过这种问题,换个码库或自己录码试试。
我的好久没折腾了,今晚回去搞搞。
回复

使用道具 举报

4

主题

199

帖子

1066

积分

金牌会员

Rank: 6Rank: 6

积分
1066
金钱
867
HASS币
0
发表于 2019-7-17 14:38:45 | 显示全部楼层
学下一下打开空调的码录入试试
回复

使用道具 举报

0

主题

20

帖子

104

积分

注册会员

Rank: 2

积分
104
金钱
84
HASS币
0
发表于 2019-7-30 16:49:02 | 显示全部楼层
学习一下~~~~~~~~~~~~~~~~~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 05:50 , Processed in 0.346202 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表