homeassistant-components icon indicating copy to clipboard operation
homeassistant-components copied to clipboard

请问德业除湿机是怎么接入的?

Open itispip opened this issue 4 years ago • 8 comments

是只要把mqtt组件放在custom_components下面吗?

itispip avatar Jan 31 '21 03:01 itispip

是的,但是需要获取到mqtt的相关配置,具体可以参考下:https://xiking.win/2020/11/12/3-deye-dehumidifer-add-to-homeassistant/

yongman avatar Jan 31 '21 04:01 yongman

是的,但是需要获取到mqtt的相关配置,具体可以参考下:https://xiking.win/2020/11/12/3-deye-dehumidifer-add-to-homeassistant/

谢谢,我去看了您的博客。其中模拟Post,没提到appid, extend两个关键字是怎么获得的。请问是我必须去自己反编译德业的APP才能获得吗?

itispip avatar Jan 31 '21 04:01 itispip

@itispip pushtype可以填“Ali”,extend字段{"cid":"111111122223333","type":"0"},其中cid应该可以随便填写。

yongman avatar Jan 31 '21 05:01 yongman

谢谢,果然可以。想接入德业很久了,全网就只找到你这唯一的一篇。

itispip avatar Jan 31 '21 05:01 itispip

谢谢,果然可以。想接入德业很久了,全网就只找到你这唯一的一篇。

我也尝试看社区有没有现成的方案,奈何德业除湿机可能受众比较小,只能自己动手了。:-)

yongman avatar Jan 31 '21 05:01 yongman

修改版的mqtt component无法启动

Logger: homeassistant.core Source: custom_components/mqtt/init.py:164 First occurred: 下午2:51:49 (1 occurrences) Last logged: 下午2:51:49

Error executing service: <ServiceCall homeassistant.restart (c:1fa8070b20c5c2fc8f0119f5641bee9d)> Traceback (most recent call last): File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/core.py", line 1461, in catch_exceptions await coro_or_task File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/core.py", line 1480, in _execute_service await handler.job.target(service_call) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/service.py", line 663, in admin_handler await result File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/homeassistant/init.py", line 117, in async_handle_core_service errors = await conf_util.async_check_ha_config_file(hass) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/config.py", line 874, in async_check_ha_config_file res = await check_config.async_check_ha_config_file(hass) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/check_config.py", line 123, in async_check_ha_config_file component = integration.get_component() File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/loader.py", line 416, in get_component cache[self.domain] = importlib.import_module(self.pkg_path) File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/root/.homeassistant/custom_components/mqtt/init.py", line 164, in cv.deprecated(CONF_TLS_VERSION, invalidation_version="0.115"), TypeError: deprecated() got an unexpected keyword argument 'invalidation_version'

Logger: aiohttp.server Source: custom_components/mqtt/init.py:164 First occurred: 下午2:50:22 (2 occurrences) Last logged: 下午2:51:31

Error handling request Traceback (most recent call last): File "/root/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/root/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/root/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl return await handler(request) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware return await handler(request) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware return await handler(request) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware return await handler(request) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 129, in handle result = await result File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/components/config/core.py", line 29, in post errors = await async_check_ha_config_file(request.app["hass"]) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/config.py", line 874, in async_check_ha_config_file res = await check_config.async_check_ha_config_file(hass) File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/check_config.py", line 123, in async_check_ha_config_file component = integration.get_component() File "/root/homeassistant/lib/python3.8/site-packages/homeassistant/loader.py", line 416, in get_component cache[self.domain] = importlib.import_module(self.pkg_path) File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/root/.homeassistant/custom_components/mqtt/init.py", line 164, in cv.deprecated(CONF_TLS_VERSION, invalidation_version="0.115"), TypeError: deprecated() got an unexpected keyword argument 'invalidation_version'

itispip avatar Jan 31 '21 06:01 itispip

@itispip 估计和homeassistant的版本有关系,你可以直接拷贝你正在运行版本的源码中的mqtt组件,然后根据 https://xiking.win/2020/11/12/3-deye-dehumidifer-add-to-homeassistant/ 修改一下源码

yongman avatar Feb 01 '21 03:02 yongman

我把德业除湿机封装了个独立插件,欢迎尝试 https://github.com/stackia/ha-deye-dehumidifier

stackia avatar Mar 14 '23 14:03 stackia