hass-xiaomi-miot
hass-xiaomi-miot copied to clipboard
philips.light.sread1 Got MiioException while fetching the state: Unable to discover the device
Device model / 设备型号
Component version / 插件版本
0.7.5
HA core version / HA版本
2022.12.1
Integrated mode / 集成方式
Automatic (自动模式)
The problem / 问题详情
Xiaomi Eyecare lamp unreachable on same network and same subnet
Entity attributes / 实体属性
supported_color_modes: brightness, onoff friendly_name: Bedroom Reading Lamp Light supported_features: 1
Home Assistant Logs / 系统日志
This error originated from a custom integration.
Logger: custom_components.xiaomi_miot.sensor
Source: custom_components/xiaomi_miot/sensor.py:691
Integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 24 January 2023 at 22:45:51 (1 occurrences)
Last logged: 24 January 2023 at 22:45:51
Get xiaomi message for 1628989846 failed: {}
Logger: custom_components.xiaomi_miot.core.xiaomi_cloud
Source: custom_components/xiaomi_miot/core/xiaomi_cloud.py:209
Integration: Xiaomi Miot Auto ([documentation](https://github.com/al-one/hass-xiaomi-miot), [issues](https://github.com/al-one/hass-xiaomi-miot/issues))
First occurred: 24 January 2023 at 22:45:51 (140 occurrences)
Last logged: 05:43:10
Request xiaomi api: v2/message/v2/typelist {} failed, response: None
This error originated from a custom integration.
Logger: custom_components.xiaomi_miot.light
Source: custom_components/xiaomi_miot/__init__.py:1374
Integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 24 January 2023 at 21:55:15 (263 occurrences)
Last logged: 05:43:21
Bedroom Reading Lamp(philips.light.sread1): Got MiioException while fetching the state: Unable to discover the device 192.168.1.66, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.brightness': {'siid': 2, 'piid': 2}}, max_properties: 10/2
- https://github.com/al-one/hass-xiaomi-miot/issues/500#offline
Try unplugging the device.
Unplugged and plugged it back up, turned the light, reloaded the integration in HA:
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:538
First occurred: 24 January 2023 at 22:15:55 (6 occurrences)
Last logged: 17:24:28
Update of light.philips_sread1_e8f9_light is taking over 10 seconds
This error originated from a custom integration.
Logger: custom_components.xiaomi_miot.light
Source: custom_components/xiaomi_miot/__init__.py:1374
Integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 24 January 2023 at 21:55:15 (684 occurrences)
Last logged: 17:25:01
Bedroom Reading Lamp(philips.light.sread1): Got MiioException while fetching the state: Unable to discover the device 192.168.1.66, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.brightness': {'siid': 2, 'piid': 2}}, max_properties: 10/2
yet problem persists.
When using Xiaomi Miio integration of home assistant, same thing was happening.
If unplugging and plugging back was solving the problem, I would still be not satisfied, because main point for integrating that lamp with home assistant is for me to be able to toggle it remotely. If I have to go and physically unplug and plug it back it so that it connects to network, then it is pointless, because I can more easily and quickly use interface on top of lamp to toggle it.
I was also searching for some esphome based software to flash that lamp, sadly didn't find it.
Try rebind it in Mihome APP.
Re-pairing it in mihomi app changed nothing but name of device
This error originated from a custom integration.
Logger: custom_components.xiaomi_miot.light
Source: custom_components/xiaomi_miot/__init__.py:1374
Integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 13:29:41 (1 occurrences)
Last logged: 13:29:41
Lamp(philips.light.sread1): Got MiioException while fetching the state: Unable to discover the device 192.168.1.66, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.brightness': {'siid': 2, 'piid': 2}}, max_properties: 10/2
Re-pairing in home assistant afterwards didn't help either.
I can control it remotely via Mihome App.
Version of lamp's software reported in Mihome App is 1.2.8.0024.
same problem here....
Try these shells when it's not available.
ping 192.168.1.66
miiocli -d device --ip 192.168.1.66 --token **** info
❯ ping 192.168.1.66
PING 192.168.1.66 (192.168.1.66) 56(84) bytes of data.
64 bytes from 192.168.1.66: icmp_seq=1 ttl=255 time=204 ms
64 bytes from 192.168.1.66: icmp_seq=2 ttl=255 time=124 ms
64 bytes from 192.168.1.66: icmp_seq=3 ttl=255 time=2.66 ms
64 bytes from 192.168.1.66: icmp_seq=4 ttl=255 time=2.29 ms
^C
--- 192.168.1.66 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
❯ miiocli -d device --ip 192.168.1.66 --token 6ef58de64e66280b427151dbe0324d22 info
INFO:miio.cli:Debug mode active
DEBUG:miio.click_common:Unknown model, trying autodetection. None None
DEBUG:miio.miioprotocol:Unable to discover a device at address 192.168.1.66
DEBUG:miio.click_common:Exception: Unable to discover the device 192.168.1.66
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/miio/click_common.py", line 51, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/miio/click_common.py", line 305, in wrap
kwargs["result"] = func(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/miio/click_common.py", line 270, in command_callback
return miio_command.call(miio_device, *args, **kwargs)
File "/usr/lib/python3.10/site-packages/miio/click_common.py", line 217, in call
return method(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/miio/click_common.py", line 183, in _wrap
self._fetch_info()
File "/usr/lib/python3.10/site-packages/miio/device.py", line 153, in _fetch_info
devinfo = DeviceInfo(self.send("miIO.info"))
File "/usr/lib/python3.10/site-packages/miio/device.py", line 107, in send
return self._protocol.send(
File "/usr/lib/python3.10/site-packages/miio/miioprotocol.py", line 161, in send
self.send_handshake()
File "/usr/lib/python3.10/site-packages/miio/miioprotocol.py", line 74, in send_handshake
raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device 192.168.1.66
fyi, token for lamp was detected via app itself
❯ miiocli discover
INFO:miio.miioprotocol:Sending discovery to <broadcast> with timeout of 5s..
(shortened)
INFO:miio.miioprotocol: IP 192.168.1.66 (ID: 032a6783) - token: b'6ef58de64e66280b427151dbe0324d22'
(shortened)
Device light.xiaomi_philips_eyecare_smart_lamp_2 defined as philips.light.sread1 And device sometimes turns off from HA