elric91 / homeassistant_zigate

Custom components for Home Assistant
MIT License
22 stars 5 forks source link

Aqara Temperature and Humidity sensor report "unknown" #19

Closed RiRomain closed 6 years ago

RiRomain commented 6 years ago

Hi,

I've added an aqara temperature and humidity sensor to my config, and linked it to my Zigate, however, it's value never got updated in home-assistant.

I use this config entry:

sensor:
  - platform: zigate
    name: 'Fridge Sensor'
    address: 034701
    default_state: temperature
    default_unit: '°C'

And I see that the Zigate receive and decrypt the value from the sensor without problem:

2018-04-04 10:21:10 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Measurement: Temperature
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Value: 7.69 °C
2018-04-04 10:21:10 INFO (MainThread) [zigate]   FROM ADDRESS      : b'0347'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Source EndPoint : b'01'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Cluster ID      : b'0402'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute ID    : b'0000'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute type  : b'29'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute size  : 2
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute data  : b'0301'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # encoded : b'018102120210021fe85a0213470211021402120210021002102902100212021302115403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # decoded : 0181 02 00 0F E8 5A 03 47 01 04 02 00 00 00 29 00 02 03 01 5403
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   (@timestamp : 10:21:10)
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Measurement: Humidity
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Value: 58.9 %
2018-04-04 10:21:10 INFO (MainThread) [zigate]   FROM ADDRESS      : b'0347'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Source EndPoint : b'01'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Cluster ID      : b'0405'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute ID    : b'0000'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute type  : b'21'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute size  : 2
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute data  : b'1702'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # encoded : b'018102120210021ff15b02134702110214021502100210021021021002121702125403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # decoded : 0181 02 00 0F F1 5B 03 47 01 04 05 00 00 00 21 00 02 17 02 5403
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   (@timestamp : 10:21:10)
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Atmospheric pressure
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Value: 969 mb
2018-04-04 10:21:10 INFO (MainThread) [zigate]   FROM ADDRESS      : b'0347'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Source EndPoint : b'01'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Cluster ID      : b'0403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute ID    : b'0000'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute type  : b'29'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute size  : 2
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute data  : b'03c9'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # encoded : b'018102120210021f275c02134702110214021302100210021029021002120213c95403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # decoded : 0181 02 00 0F 27 5C 03 47 01 04 03 00 00 00 29 00 02 03 C9 5403
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   (@timestamp : 10:21:10)
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Atmospheric pressure
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Value unknown
2018-04-04 10:21:10 INFO (MainThread) [zigate]   FROM ADDRESS      : b'0347'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Source EndPoint : b'01'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Cluster ID      : b'0403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute ID    : b'0014'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute type  : b'28'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute size  : 1
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute data  : b'ff'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # encoded : b'018102120210021e02155c02134702110214021302101402102802100211ff5403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # decoded : 0181 02 00 0E 05 5C 03 47 01 04 03 00 14 00 28 00 01 FF 5403
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   (@timestamp : 10:21:10)
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-04 10:21:10 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Atmospheric pressure
2018-04-04 10:21:10 INFO (MainThread) [zigate]   * Value: 969.3 mb
2018-04-04 10:21:10 INFO (MainThread) [zigate]   FROM ADDRESS      : b'0347'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Source EndPoint : b'01'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Cluster ID      : b'0403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute ID    : b'0010'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute type  : b'29'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute size  : 2
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   - Attribute data  : b'25dd'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # encoded : b'018102120210021f02155c0213470211021402130210100210290210021225dd5403'
2018-04-04 10:21:10 DEBUG (MainThread) [zigate]   # decoded : 0181 02 00 0F 05 5C 03 47 01 04 03 00 10 00 29 00 02 25 DD 5403

But it somehow doesn't get refreshed in home-assistant. Is maybe the address I'm using the wrong one?

aqara

Thanks in advance for any pointer in the right direction :-)

TheLama1993 commented 6 years ago

I have the exact same problem as you have! The address should be okay and pairing was easy, but I think that the configuration in the yaml file should be changed. The battery level is reported.

RiRomain commented 6 years ago

Maybe it has to do with the 4 vs 6 digit address?

RiRomain commented 6 years ago

It was indeed the address, but not because of the length, because it was only numeral character and thus evaluated as a number by home-assistant when not put into quote. I'll update the example in the wiki to reflect that.