Closed max5962 closed 6 years ago
According https://github.com/sasu-drooz/Domoticz-Zigate there is deviceType : "'lumi.sensor_motion.aq2':{'Ep':{'01':{'0406','0400'}},'Type':'Motion/Lux'},"
It could be awesome having the same config file :)
I added handling for Illuminance measurement cluster to zigate.
Next thing is to change ZigateSensor code to support devices with multiple measurements from single endpoint. Probably the best way to do this is add parameter to config so user can specify which parameter is wanted.
Thanks a lot !
I upgraded pyzigate code and hass-component, i still don't see illuminance information. is it normal ? thanks
Seems well detected by the zigate code :
"2018-03-08 14:49:52 DEBUG (MainThread) [zigate] --------------------------------------
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE SIGNAL :
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Signal : zgt_signal_update_b4b501
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Property : last seen
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Data : 2018-03-08 14:49:52
2018-03-08 14:49:52 INFO (MainThread) [zigate] FROM ADDRESS : b'b4b5'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Source EndPoint : b'01'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Cluster ID : b'0400'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute ID : b'0000'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute type : b'21'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute size : 2
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute data : b'0051'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] # encoded : b'018102120210021fb271b4b502110214021002100210021021021002120210513903'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] # decoded : 0181 02 00 0F B2 71 B4 B5 01 04 00 00 00 00 21 00 02 00 51 3903
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] (@timestamp : 14:49:52)
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] --------------------------------------
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE SIGNAL :
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Signal : zgt_signal_update_b4b501
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Property : last seen
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Data : 2018-03-08 14:49:52
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE SIGNAL :
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Signal : zgt_signal_update_b4b501
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Property : event
2018-03-08 14:49:52 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Data : presence detected
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] * Presence detection
2018-03-08 14:49:52 INFO (MainThread) [zigate] FROM ADDRESS : b'b4b5'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Source EndPoint : b'01'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Cluster ID : b'0406'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute ID : b'0000'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute type : b'18'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute size : 1
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] - Attribute data : b'01'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] # encoded : b'018102120210021edc72b4b5021102140216021002100210180210021102113903'
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] # decoded : 0181 02 00 0E DC 72 B4 B5 01 04 06 00 00 00 18 00 01 01 3903
2018-03-08 14:49:52 DEBUG (MainThread) [zigate] (@timestamp : 14:49:52)
2018-03-08 14:50:06 DEBUG (MainThread) [zigate] --------------------------------------
2018-03-08 14:50:06 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
"
But no in the interface ... by the way : my detector are insert as switch
I'm using influxDB and grafana, if someone need help i may help :)
EDIT : after reinstalling evrything, still no illuminance. I continue to investigate :slight_smile:
EDIT 2 : In my pyzigate folder ( 0.1.3.post1) i have illuminance information :
interface.py: b'0400': 'Measurement: Illuminance',
zgt_parameters.py:ZGT_ILLUMINANCE_MEASUREMENT = 'illuminance'
attributes_helpers.py: # Illuminance Measurement
attributes_helpers.py: illuminance = int.from_bytes(attribute_data, 'big', signed=True)
attributes_helpers.py: self.set_device_property(device_addr, endpoint, ZGT_ILLUMINANCE_MEASUREMENT, illuminance)
In my custom_component I use the good zigate library :
__init__.py:REQUIREMENTS = ['pyserial-asyncio==0.4', 'pyzigate==0.1.3.post1']
In my log i have information ( cf previous post ) In my switch.yaml ::
- platform: zigate
name: 'sensor2'
address: b4b501
default_state: 'event'
type: 'momentary'
In the Web interface, no illuminance information :
switch.sensor2 off last seen: 2018-03-12 15:35:52
event: presence detected
friendly_name: sensor2
EDIT 3 : I tried to remove the switch declaration in order to add it as a sensor : same issues ...
Any idea ? :)
BIG NEWS :+1: Upgraded to the latest version of HASS ( 15.3 ) solved all my issues :
The ticket can be closed ( and add the information in the README :) ) thanks
good Still don't get where the issue was, but anyway ... cool :)
hello, There is no lumens indication for XIAOMI aquara body sensor : https://www.gearbest.com/alarm-systems/pp_659226.html
Here logs when motion is detected :)