New custom component : ZiGate (obsolete)

Hmm, just my luck… I’ll try again later.
My xiaomi temperature sensor works with the following config:

sensor:

  • platform: zigate
    name: ‘Woonkamer Temperatuur’
    address: f7a501
    default_state: temperature
    default_unit: ‘°C’

  • platform: template
    sensors:
    pressure1:
    friendly_name: ‘Woonkamer Luchtvochtigheid’
    unit_of_measurement: ‘%’
    value_template: ‘{{ states.sensor.livingroom_sensor.attributes.humidity }}’

It does take a few hours before it stars updating the status. First it shows nothing, then it starts showing battery and after that it will show temperature and humidity

I have the same basic config. The Xiaomi temperature sensors (I’m using v1) only report temperature on change. If I’m impatient, I blow on them for a moment. They report immediately and correct fairly quickly again to the real temperature.

While I’m in here. Doe anyone have the round Xiaomi buttons working with multiclick being recognized?

I managed to get them working with single click, but I want multiclick to trigger different automations.

The xiaomi sensor, I see them reporting temperature to the Zigate (output in HA log), but the value is never transported in HA, it always display as unknown.

For the button I have the same. Single click only.
By configuring it as a sensor I could recognized the double click, triple click and simple. But only the state change would be recognised, a simple click after another simple click wouldn’t be reported.

The temperature sensors work fine for me. I use:

sensor:
  - platform: zigate
    name: 'Living room'
    address: d02801
    default_state: 'temperature'
    default_unit: '°C'
 - platform: template
   sensors:
      humidity1:
        friendly_name: 'Living room humidity'
        unit_of_measurement: '%'
        value_template: '{{ 
states.sensor.living_room.attributes.humidity 
}}'

What do you use for your button? I’m wondering if I should configure it as a momentary button with a 1-2 second reset time…

Do you have the aqara or the xiaomi temperature sensor? (The round one)

I use this config for the button:

switch:
  - platform: zigate
    name: 'aqara_push_button_1'
    address: f5c901
    autotoggle_delay: 2
    default_state: 'state'
    type: 'toggle'

I think the problem when configured as a sensor, is that the change from on_pressed to off_release is almost instantaneous, and ha doesn’t have time to register that a state change has occurred.

After the state change, this function is called:

self.schedule_update_ha_state()

But I guess the state is changed back to off_release before HA had had time to perform the state update.

Since I’m cheap and don’t care about pressure, I have the round Xiaomi ones. Not the Aqara one.

Thanks for the config. I’ll try this when I get home.

Not relevant, problem found

Can you do me a favor and share the log output of the temperature sensor update? :slightly_smiling_face:
Activate the debug mode for ZiGate:

logger:
  default: info
  logs:
    zigate: debug

The log entry should start like that:

2018-04-07 12:33:20 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-07 12:33:20 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-07 12:33:20 INFO (MainThread) [zigate]   * Measurement: Temperature
2018-04-07 12:33:20 INFO (MainThread) [zigate]   * Value: 11.23 °C
2018-04-07 12:33:20 INFO (MainThread) [zigate]   FROM ADDRESS      : b'0347'

This way I could check what’s the difference between the round sensor and the new aqara one and hopefully fix the code for those aqara sensor.

…I found the problem, the address of my sensor was all numerical 034701, and I have to surround it with quote…

Sure! That would be the following: (note that previous state is unknown due to the restart for logging setting changes)

2018-04-07 14:30:40 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-04-07 14:30:40 INFO (MainThread) [zigate] * Measurement: Temperature
2018-04-07 14:30:40 INFO (MainThread) [zigate] * Value: 24.15 °C
2018-04-07 14:30:40 INFO (MainThread) [zigate] FROM ADDRESS : b'XXXX'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Source EndPoint : b'01'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Cluster ID : b'0402'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute ID : b'0000'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute type : b'29'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute size : 2
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute data : b'096f' 2018-04-07 14:30:40 DEBUG (MainThread) [zigate] # encoded : b'018102120210021f135d2be8021102140212021002100210290210021202196f4b03'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] # decoded : 0181 02 00 0F 13 5D 2B E8 01 04 02 00 00 00 29 00 02 09 6F 4B03
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] (@timestamp : 14:30:40)
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] --------------------------------------
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response 
2018-04-07 14:30:40 INFO (MainThread) [zigate] * Measurement: Humidity
2018-04-07 14:30:40 INFO (MainThread) [zigate] * Value: 45.29 %
2018-04-07 14:30:40 INFO (MainThread) [zigate] FROM ADDRESS : b'XXXX'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Source EndPoint : b'01'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Cluster ID : b'0405'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute ID : b'0000'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute type : b'21'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute size : 2
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] - Attribute data : b'11b1'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] # encoded : b'018102120210021fd95e2be8021102140215021002100210210210021211b14b03'
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] # decoded : 0181 02 00 0F D9 5E 2B E8 01 04 05 00 00 00 21 00 02 11 B1 4B03
2018-04-07 14:30:40 DEBUG (MainThread) [zigate] (@timestamp : 14:30:40)
2018-04-07 14:30:40 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.c_room, old_state=<state sensor.c_room=unknown; unit_of_measurement=°C, friendly_name=C room @ 2018-04-07T14:24:00.244640+02:00>, new_state=<state sensor.c_room=24.15; last seen=2018-04-07 14:30:40, temperature=24.15, humidity=45.29, unit_of_measurement=°C, friendly_name=C room @ 2018-04-07T14:30:40.537348+02:00>>
1 Like

Thanks for the help, I found my issue, the address of my sensor is 034701, and that mean I need to surround the address with quote or it’s evaluated as an integer per home-assistant and ignored when compared with the string address of Zigate… :relaxed:

Hi,

sorry for the noob question. I want to buy zigate to continue using my devices without having multiple gateways (philips, ikea, xiaomi etc).

Can you confirm me that I have to choose between Zigate OR Hue app to manage my lights?

I can’t keep both configuration right?

you’ll have to pair your lights with either Hue or Zigate, so you’ll only be able to manage your lights from one gateway.

I’m using both zigate and the xiaomi gateway that way.

offtopic but it looks like zigate development (both main zigate and this component) is quite dead at the moment, no improvements, no new features, and still a custom component.

Isn’t that a bit harsh? I’ve seen plenty of open source projects that had a temporary slow down. Both the main Zigate project as well as this component have had updates in the last month…

Sleeping for sure (I do code for pleasure on my free time, which is scarce for the time being … I think the same goes with ISO-B), but certainly not dead !

Things going under the hood :

  • refactoring of the zigate lib to make it easier to maintain (and add new components. In the unstable branch)
  • trying to progressively merge the proposed commits
  • moving back presence & door sensors to sensor without breaking anything

And at the same time, we’ll have to stabilize it (quality-wise) to try to bring it to the main repo and stop having to use a custom component

I know how frustrating it can be to have to wait for stupid corrections and important enhancements for your use cases, just keep in mind that we may sometimes have a life outside the time we dedicate to OSS contributions :wink:

3 Likes

hey we all know how oss projects work and we all know how to tease and how to trigger some reactions, but that might be me being double standard :slight_smile: sorry if my offtopic sounded harsh, if it sounds like troll please don’t waste any of your precious time answering “it” :wink:

how would it be possible to make use of the latest zha/zll developments in HASS with the zigate ?
in another words, how could it be possible to make the zigate a generic zigbee gateway with regard to HASS ?

@eLRIC I wanted to thank you for the great work!
I just managed to get my basic setup working with super cheap Xiaomi Aqara sensors (temperature and human body detection) :slight_smile:

Here’s my config:

sensor:
  - platform: zigate
    name: 'LivingRoom Sensor'
    address: XXXXXX
    default_state: temperature
    default_unit: '°C'
  - platform: template
    sensors:
        humidity1:
          friendly_name: 'Living room humidity'
          unit_of_measurement: '%'
          value_template: '{{ states.sensor.livingroom_sensor.attributes.humidity }}'
  - platform: template
    sensors:
      pressure1:
        friendly_name: 'LivingRoom Atmospheric Pressure'
        unit_of_measurement: 'mb'
        value_template: '{{ states.sensor.livingroom_sensor.attributes.pressure }}'

switch:
  - platform: zigate
    name: 'Presence detection'
    address: XXXXXX
    default_state: 'event'
    type: 'momentary'

Looking forward for mentioned “under the hood” improvements.

Hello Everyone,
is it now safe to upgrade to the latest version of HASS ? :slight_smile:

THnaks

safe if you use an updated version of the zigate component

1 Like

Hé guys,

Another question! I got a few Osram lightify rgbww bulbs and I managed to pair them with zigate! Turning them on and off and changing brightness works perfectly and super fast, but I have no way of changing colours. Warm white/cold white works a little if I configure the bulb as dual-white, but the temperature is not really correct. Anyone managed to do this already? How did you configure it?

Yaml:

light:

  • platform: zigate
    name: ‘Televisie’
    address: “320c03”
    light_type: ‘dual-white’
    default_state: ‘event’

@eLRIC Are there any updates planned for this component? :slight_smile:

1 Like