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

 找回密码
 立即注册
查看: 1253|回复: 16

[技术探讨] 求助!绿米的E1人体传感器不会感应

[复制链接]

1

主题

15

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
57
HASS币
0
发表于 2023-3-23 19:57:54 | 显示全部楼层 |阅读模式
我通过z2m把绿米的E1传感器接入到hass里,可是这个人体传感器不会更新状态,而且检测人体一直是空的,各位有这样情况的吗,有什么办法解决吗,请大佬教教我,感谢!!

                               
登录/注册后可看大图


                               
登录/注册后可看大图

回复

使用道具 举报

1

主题

15

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
57
HASS币
0
 楼主| 发表于 2023-3-23 22:46:44 | 显示全部楼层
状态是这个,就没有occupancy的参数出来
{
    "battery": 100,
    "detection_interval": 60,
    "device_temperature": 25,
    "illuminance": 131,
    "linkquality": 72,
    "power_outage_count": 0,
    "state": "ON",
    "voltage": 3110
}
回复

使用道具 举报

2

主题

52

帖子

785

积分

高级会员

Rank: 4

积分
785
金钱
733
HASS币
0
发表于 2023-3-23 22:56:56 | 显示全部楼层
同问,我也刚遇到同样的问题
回复

使用道具 举报

1

主题

15

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
57
HASS币
0
 楼主| 发表于 2023-3-24 15:07:26 | 显示全部楼层
有些超时的报错,Publish 'set' 'detection_interval' to '0x54ef4410007c9b48' failed: 'Error: Write 0x54ef4410007c9b48/1 aqaraOpple({"258":{"value":[60],"type":32}}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 48482 - 1 - 3 - 64704 - 4 after 10000ms)'
回复

使用道具 举报

1

主题

15

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
57
HASS币
0
 楼主| 发表于 2023-3-25 00:27:42 | 显示全部楼层
求助!!!!
回复

使用道具 举报

1

主题

15

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
57
HASS币
0
 楼主| 发表于 2023-3-25 23:51:08 | 显示全部楼层
折腾一天了,还是没搞定
回复

使用道具 举报

62

主题

581

帖子

6061

积分

论坛元老

Rank: 8Rank: 8

积分
6061
金钱
5405
HASS币
240

教程狂人论坛风云人物

发表于 2023-3-26 08:22:27 | 显示全部楼层
这个错误提示看起来像是一个设备通信错误,可能是由于设备无法响应设置请求导致的。

这个错误信息的意思是,尝试将 "detection_interval" 设置为 60 秒,但是无法将设置写入 "0x54ef4410007c9b48" 设备。错误类型为超时错误,意味着设备在规定的时间内没有响应请求。

建议您尝试以下步骤来解决这个问题:

确认设备是否连接到网络,并且网络信号良好。您可以尝试通过其他方式与设备进行通信(例如使用设备的原始应用程序或浏览器插件)来测试设备连接和网络质量。

确认设备是否支持 "detection_interval" 设置,并且设置参数是否正确。

重置设备并尝试重新连接设备。

如果问题仍然存在,请联系设备制造商或技术支持人员,以获得更多帮助和建议。

请注意,这只是一些常见的解决方法,具体解决方法取决于设备和应用程序的具体情况。
尝试过萝卜,我想你一定会忘记青瓜
回复

使用道具 举报

1

主题

15

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
57
HASS币
0
 楼主| 发表于 2023-3-26 21:20:21 | 显示全部楼层
antsunzj 发表于 2023-3-26 08:22
这个错误提示看起来像是一个设备通信错误,可能是由于设备无法响应设置请求导致的。

这个错误信息的意思是 ...

感谢大佬,后面设置成功了,还是有问题,这是我后面重装的日志,就是没有读取到occupancy的状态,是不是e1本身的z2m代码有问题啊


Info 2023-03-25 17:05:28MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara E1 human body movement and illuminance sensor","exposes":[
{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},
{"access":1,"description":"Measured illuminance in lux","name":"illuminance_lux","property":"illuminance","type":"numeric","unit":"lx"},
{"access":1,"description":"Measured illuminance in lux","name":"illuminance","property":"illuminance","type":"numeric","unit":"lx"},
{"access":7,"description":"Time interval for detecting actions","name":"detection_interval","property":"detection_interval","type":"numeric","unit":"s","value_max":65535,"value_min":2},
{"access":1,"description":"Temperature of the device","name":"device_temperature","property":"device_temperature","type":"numeric","unit":"°C"},
{"access":1,"description":"Remaining battery in %, can take up to 24 hours before reported.","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},
{"access":1,"description":"Voltage of the battery in millivolts","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},
{"access":1,"description":"Number of power outages","name":"power_outage_count","property":"power_outage_count","type":"numeric"},
{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ15LM","options":[
{"access":2,"description":"Time in seconds after which occupancy is cleared after detecting it (default is \"detection_interval\" + 2 seconds). The value must be equal to or greater than \"detection_interval\", and it can also be a fraction.","name":"occupancy_timeout","property":"occupancy_timeout","type":"numeric","unit":"s","value_min":0,"value_step":0.1},
{"access":2,"description":"Sends a message the last time occupancy (occupancy: true) was detected. When setting this for example to [10, 60] a `{\"no_occupancy_since\": 10}` will be send after 10 seconds and a `{\"no_occupancy_since\": 60}` after 60 seconds.","item_type":
{"access":3,"name":"time","type":"numeric"},"name":"no_occupancy_since","property":"no_occupancy_since","type":"list"},
{"access":2,"description":"Calibrates the illuminance value (percentual offset), takes into effect on next report of device.","name":"illuminance_calibration","property":"illuminance_calibration","type":"numeric"},
{"access":2,"description":"Calibrates the illuminance_lux value (percentual offset), takes into effect on next report of device.","name":"illuminance_lux_calibration","property":"illuminance_lux_calibration","type":"numeric"},
{"access":2,"description":"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.","name":"device_temperature_calibration","property":"device_temperature_calibration","type":"numeric"}],
"supports_ota":true,"vendor":"Xiaomi"},"friendly_name":"0x54ef4410007c9b48","ieee_address":"0x54ef4410007c9b48","status":"successful","supported":true},"type":"device_interview"}'






Received Zigbee message from '0x54ef4410007c9b48', type 'attributeReport', cluster 'genBasic', data '{"modelId":"lumi.motion.acn001"}' from endpoint 1 with groupID 0
Debug 2023-03-25 21:27:51Received Zigbee message from '0x54ef4410007c9b48', type 'attributeReport', cluster 'aqaraOpple', data '
{"247":{"data":[1,33,244,11,3,40,25,4,33,0,0,5,33,1,0,8,33,10,0,10,33,87,136,12,32,30,100,16,0,101,33,79,0],"type":"Buffer"}}' from endpoint 1 with groupID 0
Debug 2023-03-25 21:27:51lumi.motion.acn001: Processed buffer into data {"1":3060,"3":25,"4":0,"5":1,"8":10,"10":34903,"12":30,"100":0,"101":79}
Debug 2023-03-25 21:27:51lumi.motion.acn001: Processed data into payload {"voltage":3060,"battery":100,"device_temperature":25,"power_outage_count":0,"illuminance":79}
Debug 2023-03-25 21:27:51lumi.motion.acn001: Processed data into payload {"voltage":3060,"battery":100,"device_temperature":25,"power_outage_count":0,"illuminance":79}
Info 2023-03-25 21:27:51MQTT publish: topic 'zigbee2mqtt/0x54ef4410007c9b48', payload '{"battery":100,"detection_interval":60,"device_temperature":25,"illuminance":79,
"linkquality":105,"occupancy":null,"power_outage_count":0,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":3060}'
回复

使用道具 举报

62

主题

581

帖子

6061

积分

论坛元老

Rank: 8Rank: 8

积分
6061
金钱
5405
HASS币
240

教程狂人论坛风云人物

发表于 2023-3-26 21:47:30 | 显示全部楼层
这段代码看起来是用于记录和处理一个名为lumi.motion.acn001的设备的Zigbee消息,这个设备也是一个Aqara E1人体运动和光照传感器。它有以下几个步骤:

Received Zigbee message from ‘0x54ef4410007c9b48’: 这表示从一个ID为0x54ef4410007c9b48的设备接收了一条Zigbee消息,这个ID是设备的唯一标识符。

type ‘attributeReport’: 这表示消息的类型是属性报告,也就是设备上报了它的一些属性值。

cluster ‘genBasic’: 这表示消息属于通用基础(genBasic)集群,这是一个包含了设备的基本信息和配置的集群。

data ‘{“modelId”:“lumi.motion.acn001”}’: 这表示消息的数据部分,包含了设备的型号ID,也就是lumi.motion.acn001。

from endpoint 1 with groupID 0: 这表示消息来自设备的端点1,属于组ID为0的组。

Received Zigbee message from ‘0x54ef4410007c9b48’: 这表示又从同一个设备接收了一条Zigbee消息。

type ‘attributeReport’: 这表示消息的类型还是属性报告。

cluster ‘aqaraOpple’: 这表示消息属于aqaraOpple集群,这是一个包含了设备的特定功能和参数的集群。

data ‘{“247”:{“data”:[1,33,244,11,3,40,25,4,33,0,0,5,33,1,0,8,33,10,0,10,33,87,136,12,32,30,100,16,0,101,33,79,0],“type”:“Buffer”}}’: 这表示消息的数据部分,包含了一个键为247的对象,它的值是一个字节缓冲区(Buffer),包含了一系列数字。

from endpoint 1 with groupID 0: 这表示消息来自设备的端点1,属于组ID为0的组。

lumi.motion.acn001: Processed buffer into data {“1”:3060,“3”:25,“4”:0,“5”:1,“8”:10,“10”:34903,“12”:30,“100”:0,“101”:79}: 这表示对字节缓冲区进行了处理,将其转换为一个对象,包含了一些键值对,每个键对应一个属性,每个值对应一个数值。

lumi.motion.acn001: Processed data into payload {“voltage”:3060,“battery”:100,“device_temperature”:25,“power_outage_count”:0,“illuminance”:79}: 这表示对处理后的数据进行了进一步处理,将其转换为一个有效载荷(payload),包含了一些有意义的属性和数值。这些属性和数值分别是:

voltage: 设备的电池电压,单位是毫伏(mV),值是3060。
battery: 设备的剩余电量百分比,单位是百分比(%),值是100。
device_temperature: 设备的温度,单位是摄氏度(°C),值是25。
power_outage_count: 设备的断电次数,值是0。
illuminance: 设备测量的光照强度,单位是勒克斯(lx),值是79。
linkquality":105,“occupancy”:null,“power_outage_count”:0,“update”:{“installed_version”:-1,“latest_version”:-1,“state”:null},“update_available”:null,“voltage”:3060}': 这表示有效载荷的其他部分,包含了以下属性和数值:

linkquality: 设备的信号强度,单位是链路质量指标(lqi),值是105。
occupancy: 设备是否检测到有人存在,是一个布尔值,null表示未知。
power_outage_count: 设备的断电次数,值是0。
update: 设备的更新信息,是一个对象,包含了以下属性和数值:
installed_version: 设备安装的版本号,值是-1表示未知。
latest_version: 设备最新的版本号,值是-1表示未知。
state: 设备更新的状态,值是null表示未知。
update_available: 设备是否有可用的更新,是一个布尔值,null表示未知。
voltage: 设备的电池电压,单位是毫伏(mV),值是3060。
topic ‘zigbee2mqtt/0x54ef4410007c9b48’: 这表示发布消息的主题(topic),是一个字符串,用于标识消息的来源和目的地。这个主题是由zigbee2mqtt和设备ID组成的。

payload ‘{“battery”:100,“detection_interval”:60,“device_temperature”:25,“illuminance”:79, “linkquality”:105,“occupancy”:null,“power_outage_count”:0,“update”:{“installed_version”:-1,“latest_version”:-1,“state”:null},“update_available”:null,“voltage”:3060}’: 这表示发布消息的有效载荷(payload),是一个对象,包含了设备的所有属性和数值。
尝试过萝卜,我想你一定会忘记青瓜
回复

使用道具 举报

62

主题

581

帖子

6061

积分

论坛元老

Rank: 8Rank: 8

积分
6061
金钱
5405
HASS币
240

教程狂人论坛风云人物

发表于 2023-3-26 21:48:03 | 显示全部楼层
没看出问题,你看看还有没有其他的日志的提醒。
尝试过萝卜,我想你一定会忘记青瓜
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-3 20:36 , Processed in 0.081211 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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