rxwen / homeassistant-terncy-component Goto Github PK
View Code? Open in Web Editor NEWTerncy custom component for homeassistant
Home Page: https://www.terncy.com
Terncy custom component for homeassistant
Home Page: https://www.terncy.com
Would air conditioner VG01be supported?
什么时候可以支持**空调VG01?
错误
无法加载配置向导: 500 Internal Server Error Server got itself in trouble
HAOS 2023.10.5
It does not work when you upgrade HA core to 2022.3.1. Could you add support to the latest HA core?
Thanks.
请问插件能添加对小燕智能插座功率实体的支持吗
小燕官方未发布燃气及烟雾传感器,先用了豪恩zigbee的,但是在HomeKit上不能显示豪恩的设备
Failed to add integration
only Not all required fields are filled in showed
ha版本:2023.5.2
问题:小燕网关里面有一个调光模块。第一次添加小燕组件可以正常控制,但是重启后灯光可以读取状态但是无法控制,日志为Unable to find referenced entities light.1 or it is/they are currently not available。然后删除组件,在重新添加组件,小燕网关正常添加,但是调光模块无法发现。日志为:
2023-06-15 17:10:07.027 INFO (MainThread) [custom_components.terncy.config_flow] construct Terncy obj for 1c8259900e36 192.168.2.248
2023-06-15 17:10:10.804 WARNING (MainThread) [custom_components.terncy.config_flow] request a new token form terncy box-1c-82-59-90-0e-36
2023-06-15 17:10:11.414 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-0e-36 {'entities': [{'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}], 'intent': 'event', 'type': 'entityAvailable'}
2023-06-15 17:10:11.415 INFO (MainThread) [custom_components.terncy] [box-1c-82-59-90-0e-36] token-00000017 is available
2023-06-15 17:10:11.418 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-0e-36 {'entities': [{'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}], 'intent': 'event', 'type': 'entityAvailable'}
2023-06-15 17:10:11.418 INFO (MainThread) [custom_components.terncy] [box-1c-82-59-90-0e-36] token-00000017 is available
2023-06-15 17:10:11.421 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-0e-36 {'entities': [{'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}], 'intent': 'event', 'type': 'entityAvailable'}
2023-06-15 17:10:11.421 INFO (MainThread) [custom_components.terncy] [box-1c-82-59-90-0e-36] token-00000017 is available
2023-06-15 17:10:11.425 INFO (MainThread) [custom_components.terncy] update or create entity {'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}
2023-06-15 17:10:11.426 INFO (MainThread) [custom_components.terncy] update or create entity {'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}
2023-06-15 17:10:11.427 INFO (MainThread) [custom_components.terncy] update or create entity {'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}
2023-06-15 17:10:17.120 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-0e-36 {'entities': [{'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}], 'intent': 'event', 'type': 'entityUpdated'}
2023-06-15 17:10:17.120 INFO (MainThread) [custom_components.terncy] unsupported event type entityUpdated
2023-06-15 17:10:17.123 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-0e-36 {'entities': [{'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}], 'intent': 'event', 'type': 'entityUpdated'}
2023-06-15 17:10:17.123 INFO (MainThread) [custom_components.terncy] unsupported event type entityUpdated
2023-06-15 17:10:17.125 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-0e-36 {'entities': [{'id': 'token-00000017', 'model': 'TERNCY-TOKEN', 'type': 'token'}], 'intent': 'event', 'type': 'entityUpdated'}
2023-06-15 17:10:17.126 INFO (MainThread) [custom_components.terncy] unsupported event type entityUpdated
2023-06-15 17:10:21.256 WARNING (MainThread) [custom_components.terncy.config_flow] token valid, create entry for box-1c-82-59-90-0e-36
2023-06-15 17:10:21.262 INFO (MainThread) [custom_components.terncy] terncy domain async_setup_entry box-1c-82-59-90-0e-36
2023-06-15 17:10:21.263 INFO (MainThread) [custom_components.terncy] start connection to box-1c-82-59-90-0e-36 192.168.2.248
2023-06-15 17:10:21.277 INFO (MainThread) [homeassistant.components.light] Setting up light.terncy
2023-06-15 17:10:21.281 INFO (MainThread) [homeassistant.components.cover] Setting up cover.terncy
2023-06-15 17:10:21.286 INFO (MainThread) [homeassistant.components.switch] Setting up switch.terncy
2023-06-15 17:10:21.291 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.terncy
2023-06-15 17:10:21.297 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.terncy
2023-06-15 17:10:21.305 INFO (MainThread) [terncy.terncy] Terncy v0.3.5 starting connection to:
2023-06-15 17:10:21.305 INFO (MainThread) [terncy.terncy] box-1c-82-59-90-0e-36 192.168.2.248:443
2023-06-15 17:10:21.311 INFO (MainThread) [custom_components.terncy.light] setup terncy light platform
2023-06-15 17:10:21.313 INFO (MainThread) [custom_components.terncy.cover] setup terncy curtain platform
2023-06-15 17:10:21.315 INFO (MainThread) [custom_components.terncy.switch] setup terncy smart plug platform
2023-06-15 17:10:21.317 INFO (MainThread) [custom_components.terncy.binary_sensor] setup terncy curtain platform
2023-06-15 17:10:21.319 INFO (MainThread) [custom_components.terncy.sensor] setup terncy curtain platform
2023-06-15 17:10:21.854 INFO (MainThread) [terncy.terncy] connected to box-1c-82-59-90-0e-36
2023-06-15 17:10:21.855 INFO (MainThread) [custom_components.terncy] got connected event box-1c-82-59-90-0e-36
2023-06-15 17:10:21.859 INFO (MainThread) [custom_components.terncy] refresh devices now
2023-06-15 17:10:21.896 INFO (MainThread) [custom_components.terncy] update or create entity {'hwVersion': 2, 'id': '8cf681fffe4fa7ac-00', 'model': 'TERNCY-ST01-CV', 'online': True, 'ota': -1, 'services': [{'attributes': [{'attr': 'hue', 'value': 246}, {'attr': 'saturation', 'value': 254}, {'attr': 'colorTemperature', 'value': 0}, {'attr': 'brightness', 'value': 0}, {'attr': 'on', 'value': 0}], 'id': '8cf681fffe4fa7ac-01', 'name': '1', 'profile': 27}], 'type': 'device', 'version': 50}
2023-06-15 17:10:21.897 INFO (MainThread) [custom_components.terncy] Updating service {'attributes': [{'attr': 'hue', 'value': 246}, {'attr': 'saturation', 'value': 254}, {'attr': 'colorTemperature', 'value': 0}, {'attr': 'brightness', 'value': 0}, {'attr': 'on', 'value': 0}], 'id': '8cf681fffe4fa7ac-01', 'name': '1', 'profile': 27}, available=True
2023-06-15 17:10:21.897 INFO (MainThread) [custom_components.terncy] need to add dev 1 27 8cf681fffe4fa7ac-01 to platform
2023-06-15 17:10:21.897 INFO (MainThread) [custom_components.terncy] add device 1 of light to light
2023-06-15 17:10:21.907 ERROR (MainThread) [homeassistant.components.light] Platform terncy does not generate unique IDs. ID 8cf681fffe4fa7ac-01 already exists - ignoring light.1
2023-06-15 17:10:21.911 INFO (MainThread) [custom_components.terncy.light] update state event to [{'attr': 'hue', 'value': 246}, {'attr': 'saturation', 'value': 254}, {'attr': 'colorTemperature', 'value': 0}, {'attr': 'brightness', 'value': 0}, {'attr': 'on', 'value': 0}]
2023-06-15 17:10:21.912 INFO (MainThread) [custom_components.terncy] update or create entity {'hwVersion': 1, 'id': '8cf681fffeba93b1-00', 'model': 'SM0202', 'online': True, 'ota': -1, 'services': [{'attributes': [{'attr': 'battery', 'value': 200}, {'attr': 'iasZoneStatus', 'value': 0}], 'id': '8cf681fffeba93b1-01', 'name': '', 'profile': 21}], 'type': 'device', 'version': 71}
2023-06-15 17:10:21.912 INFO (MainThread) [custom_components.terncy] Updating service {'attributes': [{'attr': 'battery', 'value': 200}, {'attr': 'iasZoneStatus', 'value': 0}], 'id': '8cf681fffeba93b1-01', 'name': '', 'profile': 21}, available=True
2023-06-15 17:10:21.912 INFO (MainThread) [custom_components.terncy] unsupported profile 21
2023-06-15 17:10:21.912 INFO (MainThread) [custom_components.terncy] update or create entity {'hwVersion': 1, 'id': 'box-1c-82-59-90-0e-36', 'model': 'TERNCY-GW02', 'online': True, 'ota': 30187, 'services': [{'attributes': [{'attr': 'volume', 'value': 57}, {'attr': 'playState', 'value': 0}, {'attr': 'mute', 'value': 0}], 'id': 'box-1c-82-59-90-0e-36-01', 'name': '1c8259900e36', 'profile': 16}], 'type': 'device', 'version': 30098}
2023-06-15 17:10:21.912 INFO (MainThread) [custom_components.terncy] Updating service {'attributes': [{'attr': 'volume', 'value': 57}, {'attr': 'playState', 'value': 0}, {'attr': 'mute', 'value': 0}], 'id': 'box-1c-82-59-90-0e-36-01', 'name': '1c8259900e36', 'profile': 16}, available=True
2023-06-15 17:10:21.913 INFO (MainThread) [custom_components.terncy] unsupported profile 16
通过HACS自定义安装后,添加集成失败!1.036
无法加载配置向导: 500 Internal Server Error Server got itself in trouble
Please support HACS so this component can be managed through the UI
Logger: homeassistant
Source: custom_components/terncy/config_flow.py:150
Integration: terncy
First occurred: 22:10:27 (1 occurrences)
Last logged: 22:10:27
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 74, in async_process_pending_flows
await gather_with_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async.py", line 170, in gather_with_concurrency
return await gather(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in sem_task
return await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 197, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 224, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data, init_done)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 320, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/terncy/config_flow.py", line 150, in async_step_zeroconf
identifier = discovery_info.name
AttributeError: 'dict' object has no attribute 'name'
请问一下是否有支持旋钮开关旋钮操作的计划
从用小燕到现在,一直是这样,重载集成或者断电后再上电,HA就掉了,400的网关和200多的网关都 这样,目前看到400多的网关的日志,200多好像没日志,400多的点重载弯黄,200多的点集成不会黄,但灯什么的控制 不了,这是昨天的测试版21的日志
2023-02-09 14:54:12.456 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry 客厅百灵 for terncy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 533, in async_unload
result = await component.async_unload_entry(hass, self)
File "/config/custom_components/terncy/init.py", line 517, in async_unload_entry
hass.data[DOMAIN].pop(entry.entry_id)
KeyError: '8e54eb72f1ff399eefa867139ad50198'
2023-02-09 14:50:53.993 ERROR (MainThread) [homeassistant.components.light] Platform terncy does not generate unique IDs. ID 0x0000000018175187-01 already exists - ignoring light.123
2023-02-09 14:50:54.008 ERROR (MainThread) [homeassistant.components.light] Platform terncy does not generate unique IDs. ID 2c1165fffeebbbc6-01 already exists - ignoring light.jiu_ju_deng
2023-02-09 14:50:54.201 ERROR (MainThread) [homeassistant.components.light] Platform terncy does not generate unique IDs. ID 540f57fffe4eeeea-01 already exists - ignoring light.can_deng_4
如同小燕在家app中的可編程開關,希望這個功能也能被加入Home assistant。
HA重启后会出现实体不可用的情况,日志中未找到对应报错,不知道大佬们有没有相应的问题,多次重启后才能恢复,且问题随机出现。
extracted homeassistant-terncy-component-1.0.10 as instructed.
After re-start I have as below:
├── automations.yaml
├── blueprints
├── configuration.yaml
├── custom_components
├──__init__.py
├── pycache
├── binary_sensor.py
├── config_flow.py
├── const.py
├── cover.py
├── device_trigger.py
├── hub_monitor.py
├── light.py
├── manifest.json
├── sensor.py
├── strings.json
├── switch.py
├── translations
├──utils.py
├── deps
├── groups.yaml . . .
. . . .
Log:
Logger: homeassistant.loader
Source: custom_components/__init__.py:5
Integration: __init__.py
First occurred: 3:32:49 PM (1 occurrences)
Last logged: 3:32:49 PM
Error loading custom_components.panel_custom. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 639, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/__init__.py", line 5, in <module>
import terncy
ModuleNotFoundError: No module named 'terncy'
This on:
HA Version | core-2021.12.10
Python Version | 3.9.7
Linux Version | 5.10.63-v8
How to fix ?
听说小燕科技经营有问题了,这个项目还会一直更新吗?
For TERNCY-WS01 (Kiryo) wall switch, would it be possible to have all the buttons under one device?
For exemple: Device is switch 8cf(..)48-00 and it has 4 entities 8cf(..)48-01, 8cf(..)48-02, 8cf(..)48-03, and 8cf(..)48-04
Having every button as its own device makes it a lot harder to create automations and makes it impossible to use it with Switch Manager integration (https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/)
错误
无法加载配置向导
是必须要小燕家庭中心才能使用吗?否则会卡在集成的第一步,没有device信息?
After integration, Terncy device Entities all show in HA under HA Domain Light, regardless of light or switch..
I have many Terncy wall switches (4gang, 3, 2, and singles). All show up in HA entity list as Light.[devID]
Is this normal? Or is there a way to force switches to integrate as Switch.[ID] ?
Also, is there any documentation to show how device settings in Terncy app map to HA settings ?
Thanks
Temperature entities of door sensor are not shown.
目前在Home Assistant里感应开关的左右动作传感器被当做一个动作传感器,无法区分动作是由哪个传感器触发的,希望能增加对此的支持。另外,如果可以再增加光照度传感器的支持就再好不过了。
The left and right motion sensors are treated as one motion sensor in the Home Assistant, so it can't figure out the sensor which triggers. Adding the left and right motion support would be very thankful.
By the way it would be nice to add the light sensor support.
homeassistant.requirements.RequirementsNotFound: Requirements for terncy not found: ['websockets==10.3'].
请问这个问题如何解决?
之前homeassistant可以正常显示开合状态,不知道什么时候变未知了,从1.0.25,删除了custom_components/terncy,换成了1.035的terncy,还是未知。但是小燕在家app和HomeKit里是正常的,请问怎么处理
我看我的门磁开关状态显示的是unsupported 然后我布防跟撤防 好像也是没有任何状态变化的
開關被判斷為實體是light.
旋鈕開關有機會被整合進去嗎?
如题,麻烦大佬给开合帘增加停止的功能吧,现在只有开、关、特定开启比例的功能,希望能够增加停止的功能。
刚添加完集成时是可以在ha上控制的,状态读取也正常,没多久就只能读取状态了,你们有这种情况吗?怎么处理
主要问题表现为 网关断电重启以后 HA里的小燕设备显示不可用 必须重启HA
请问精卫DIM002如何在小燕APP里调节电流呢?
Summary: Enable control of LED indicators on Terncy Wall Switches within Home Assistant, particularly when the switch is in wireless mode.
Description:
The Terncy app has introduced a feature that allows visual representation of scene activation status through the switch LED. This is particularly useful as it provides intuitive feedback to users by indicating whether a scene or device is active. The feature is detailed in their blog post (https://terncy.com/en-us/blog/posts/button_led_and_scene_activation_status/).
Proposed Functionality:
Use Cases:
This feature would be beneficial in scenarios where the switch is in wireless mode and there's no direct visual feedback on the status of connected scenes or devices. By exposing LED control, users can incorporate them into automations, allowing for an easy and immediate understanding of their smart home setup’s state at a glance.
Additionally, also controlling the “power LED” would allow users to turn off the bright LED during sleep hours for a completely dark room. Currently, the Terncy app doesn't offer a way to automate this—it's either always on or always off.
Thank you for considering this feature request.
It does not work when you upgrade HA core to 2023.4.2. Could you add support to the latest HA core?
Thanks.
小燕智能感应开关集成了 温度/光照/左右人体传感器 但是目前在ha里只看到了一个温度和一个动作传感器。 能否支持一下或者提供一个修改入口
哈喽,大佬。刚买的精卫调光驱动无法在ha中设置渐变时间,只能在小燕app里设置。这点不好做场景,可否增加这项功能啊。感谢!
无法增加Device
Home assistant docker 部署
小燕 1.0.14 版本
正在设置 Terncy,请稍候 会转很久
我看你们的app支持在不连接互联网的通过发现局域网内的网关情况下添加绑定设备等操作,那在多网关情况下,小燕app会随机发现局域网内的一个网关还是都发现出来,让我们自己选择要接入哪个网关,还是只能我给一个网关断电,配置完另一个网关再把网关重新上电?以及在多网关和我的ha服务器都没有外网访问的情况下,可以正常操作这个插件吗?
判断一下门的开关状态,开门用户。
在小燕app中删除设备时,在HA中发现如下日志:
2023-03-13 20:41:35.029 INFO (MainThread) [custom_components.terncy] got event message box-1c-82-59-90-12-ab {'entities': [{'id': '943469fffe509173-00'}], 'intent': 'event', 'type': 'entityDeleted'}
2023-03-13 20:41:35.031 INFO (MainThread) [custom_components.terncy] [box-1c-82-59-90-12-ab] 943469fffe509173-00 is deleted
2023-03-13 20:41:35.032 INFO (MainThread) [custom_components.terncy] [box-1c-82-59-90-12-ab] 943469fffe509173 not found, try find prefix
2023-03-13 20:41:35.032 INFO (MainThread) [custom_components.terncy] [box-1c-82-59-90-12-ab] 943469fffe509173-01 is delete
2023-03-13 20:41:35.040 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 753, in async_remove_entity
await self.entities[entity_id].async_remove()
KeyError: 'switch.xiao_fang_jian_deng'
报错代码大约在 __init__.py
的 242 行附近
for dev in devs:
_LOGGER.info("[%s] %s is delete", tern.dev_id, dev.unique_id)
hass.async_create_task(
platform.async_remove_entity(dev.entity_id) # <--- line:242
)
parsed_devices.pop(dev.unique_id)
以下是 async_remove_entity
的实现
async def async_remove_entity(self, entity_id: str) -> None:
"""Remove entity id from platform."""
await self.entities[entity_id].async_remove()
# Clean up polling job if no longer needed
if self._async_unsub_polling is not None and not any(
entity.should_poll for entity in self.entities.values()
):
self._async_unsub_polling()
self._async_unsub_polling = None
深入调试了一下,发现 platform
的 self.entities
里并没有全部的实体(似乎没有switch,也没有禁用的light)
而且,其实这边应该要删除设备而不是删除实体
为什么我的添加网关以后会重复添加
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.