Another component for ZiGate

Ok, things are slow because : somes devices are missing so we’re waiting timeout many times… (3sec each) and I notice a problem, the reporting process seems to start many times for the same device, I’ll check

Finally I found a real problem and not a user config problem !!
Anyway, missing devices are not missing, they are battery devices like aqara temperature and humidity sensor, cube, motion detector etc…

Another question: is it possible that zigate works too fast for hass component ?
I’m investigating my issue with automation from aqara wireless switch to osram smart plug.
I’ve removed nodered to be sure that this is not the failing part.
So my automation is quite simple:

- alias: "allumer gauche"
  #hide_entity: True
  trigger:
    - platform: state
      entity_id: binary_sensor.zigate_00158d0001f480c8_onoff
      from: 'off'
      to: 'on'   
  action:
    - service: homeassistant.toggle
      entity_id: switch.babyphone        
    - service: persistent_notification.create
      data:
        message: "TEST"      

I’ve also added a notification to be sure that the problem is not from the smart plug.

So here’s the thing, I can see all changes for the wireless switch in logs.
But only 30% or 50% are detected by hass and toggle the plug and create a notification.

Here’s the log for two clicks, first a 10:29:29 and second 1:29:31.
As you can see the first one runs the automation script but not the other.

Configuration issue, range issue or zigate too fast ?

yes, you’re right… the current component is too slow (or zigate too fast)
I’m not a HA guru and I know that events are badly handled.

But you could try to use the new HA event zigate.attribute_updated to catch the event

Hi,
I’m a beginner with zigate. I’ve 5 Xiaomi switch single button running on battery.
After a few hours, I have this message in the log file :
The device xxxx is missing
deps/lib/python3.6/site-packages/zigate/core.py (WARNING)
When I want to refresh the device, I’ve got this new lines in the log
RESPONSE 0x8702 - APS Data Confirm Fail : status:212, source_endpoint:1, dst_endpoint:1, dst_address_mode:2, dst_address:9320199428843241472, sequence:108, rssi:251
deps/lib/python3.6/site-packages/zigate/core.py (ERROR)
Can someone helps me ?
Thanks.
Lionel

I have got a third one of 5 :disappointed: this night
The device yyyy is missing
I don’t understand why

If you click on the button it works ?
Powered battery devices does not send events if it’s not mandatory. So after some time with no news zigate says device is missing.
But as soon as the device sends a message zigate should see it with no issue.

@biau is right.
the missing state is not always a problem. I suggest you to push the button of the xiaomi to see if it still working
if not, you have to pair it again
I hope the firmware 3.0f will solve this kind of problem

I tried, and it works, as usual :smiley:
I only need to find a better way to test multiple value in the payload with nodered because actually I use 4 switch nodes just to test entity_id, endpoint, event name and event value !

@doudz following 0.86 release of hass I’ve found that there’s an official zigbee component:

and its more integrated in hass with latest release:

And finally I’ve seen that you already made a lib for zigpy and zigate !

Are you going to continue your work on this component for integration in home assistant official component ?

Well, I don’t know yet.
Support for zigate in zigpy is not working yet and I don’t know if it’s possible, the current dev is very experimental.

But if zigate could be integrated in zigpy, I’ll stop the dev of the current HA component

Thanks all for your answers.
When I click to the button, it doesn’t work. There’s no message. I must pair again the switch with the zigate.
I didn’t know for the firmware. I update it this weekend and try after again.

Quick question, I have a lot of .json files (templates ?) in my config directory.
Is there a way to put them in a sub directory to clean up a little bit my conf tree ?

maybe you call “generate_template”.
You can safely remove them, it’s only for dev purpose
the only json file you should have is zigate.json

A service “generate_template” ? don’t think I’ve done that but I can’t be sure.
Ok i’ll delete them.
thanks

we are talking about file like lumi.sensor_cube.json, etc the name is the device type ? If yes you can remove them

Yes it’s done thanks.
They we’re all create the 23/1 I don’t remembre what I’ve done.

Just in case do you’ve already see this ? https://github.com/custom-components/custom_updater
Don’t really need this for custom components, I’m using it for custom cards.

Hello @doudz,

1st of all thanks for your effort you put into this.
i tried to get a tradfri motion sensor to work in HA but only getting the battery level. No other values are changing. Is this device supported already? and what needs to be done to make it work? any one any ideas?

thanks!

I don’t know how it works.
could you put the log in debug, catch some events when the sensor is detecting something and send me the log ?

I hope this is the information you are looking for:

2019-02-09 18:06:12 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\x98?\xa3\xbf\x02\x11\x02\x10\x02\x11\x02\x10 \x02\x10 \x02\x10\x02\x11\x1d*\x03'
2019-02-09 18:06:12 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'3fa3bf0100010020002000011d'
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:63, addr:a3bf, endpoint:1, cluster:1, attribute:32, status:0, data_type:32, size:1, data:29, rssi:42
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device Device TRADFRI motion sensor (a3bf) d0cf5efffe320f01 {'endpoint': 1, 'cluster': 1, 'addr': 'a3bf', 'attribute': 32, 'data': 29, 'name': 'battery_voltage', 'value': 29}
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-02-09 18:06:12 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zigate.attribute_updated[L]: endpoint=1, cluster=1, addr=a3bf, attribute=32, data=29, name=battery_voltage, value=29, ieee=d0cf5efffe320f01, device_type=TRADFRI motion sensor, entity_id=zigate.d0cf5efffe320f01>
2019-02-09 18:06:12 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zigate.d0cf5efffe320f01, old_state=<state zigate.d0cf5efffe320f01=2019-02-09 18:06:10; battery_voltage=None, battery_level=100, rssi_percent=16, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:10, mac_capability=10000000, rssi=42, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:10.764256+01:00>, new_state=<state zigate.d0cf5efffe320f01=2019-02-09 18:06:12; battery_voltage=None, battery_level=100, rssi_percent=16, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:12, mac_capability=10000000, rssi=42, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:12.603397+01:00>>
2019-02-09 18:06:12 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1849351344] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'zigate.d0cf5efffe320f01', 'old_state': <state zigate.d0cf5efffe320f01=2019-02-09 18:06:10; battery_voltage=None, battery_level=100, rssi_percent=16, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:10, mac_capability=10000000, rssi=42, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:10.764256+01:00>, 'new_state': <state zigate.d0cf5efffe320f01=2019-02-09 18:06:12; battery_voltage=None, battery_level=100, rssi_percent=16, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:12, mac_capability=10000000, rssi=42, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:12.603397+01:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 2, 9, 17, 6, 12, 603581, tzinfo=<UTC>), 'context': {'id': 'f4b5e4aad2ec41e1bf9c872dca224907', 'user_id': None}}}
2019-02-09 18:06:12 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\x80=\xa3\xbf\x02\x11\x02\x10\x02\x11\x02\x10 \x02\x10 \x02\x10\x02\x11\x1d0\x03'
2019-02-09 18:06:12 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\x1a\x983\x8c\x02\x11\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfef\x03'
2019-02-09 18:06:12 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'3da3bf0100010020002000011d'
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:61, addr:a3bf, endpoint:1, cluster:1, attribute:32, status:0, data_type:32, size:1, data:29, rssi:48
2019-02-09 18:06:12 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'98338c010008000000200001fe'
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device Device TRADFRI motion sensor (a3bf) d0cf5efffe320f01 {'endpoint': 1, 'cluster': 1, 'addr': 'a3bf', 'attribute': 32, 'data': 29, 'name': 'battery_voltage', 'value': 29}
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:152, addr:338c, endpoint:1, cluster:8, attribute:0, status:0, data_type:32, size:1, data:254, rssi:102
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-02-09 18:06:12 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zigate.attribute_updated[L]: endpoint=1, cluster=1, addr=a3bf, attribute=32, data=29, name=battery_voltage, value=29, ieee=d0cf5efffe320f01, device_type=TRADFRI motion sensor, entity_id=zigate.d0cf5efffe320f01>
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-02-09 18:06:12 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\x16\x02\x19Rp\x02\x11\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfef\x03'
2019-02-09 18:06:12 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zigate.d0cf5efffe320f01, old_state=<state zigate.d0cf5efffe320f01=2019-02-09 18:06:12; battery_voltage=None, battery_level=100, rssi_percent=16, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:12, mac_capability=10000000, rssi=42, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:12.603397+01:00>, new_state=<state zigate.d0cf5efffe320f01=2019-02-09 18:06:12; battery_voltage=None, battery_level=100, rssi_percent=19, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:12, mac_capability=10000000, rssi=48, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:12.603397+01:00>>
2019-02-09 18:06:12 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device Device RB 265 (338c) 00158d0002fe59e1 {'endpoint': 1, 'cluster': 8, 'addr': '338c', 'attribute': 0, 'data': 254, 'name': 'current_level', 'type': <class 'int'>, 'value': 100}
2019-02-09 18:06:12 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1849351344] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'zigate.d0cf5efffe320f01', 'old_state': <state zigate.d0cf5efffe320f01=2019-02-09 18:06:12; battery_voltage=None, battery_level=100, rssi_percent=16, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:12, mac_capability=10000000, rssi=42, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:12.603397+01:00>, 'new_state': <state zigate.d0cf5efffe320f01=2019-02-09 18:06:12; battery_voltage=None, battery_level=100, rssi_percent=19, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:06:12, mac_capability=10000000, rssi=48, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:06:12.603397+01:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 2, 9, 17, 6, 12, 930132, tzinfo=<UTC>), 'context': {'id': 'c069e31ff95248808af411caecdd1107', 'user_id': None}}}

2019-02-09 18:07:27 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xefQ\xa3\xbf\x02\x11\x02\x10\x02\x11\x02\x10 \x02\x10 \x02\x10\x02\x11\x1d3\x03'
2019-02-09 18:07:27 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xa1&3\x8c\x02\x11\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfec\x03'
2019-02-09 18:07:27 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'51a3bf0100010020002000011d'
2019-02-09 18:07:27 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:81, addr:a3bf, endpoint:1, cluster:1, attribute:32, status:0, data_type:32, size:1, data:29, rssi:51
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'26338c010008000000200001fe'
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:38, addr:338c, endpoint:1, cluster:8, attribute:0, status:0, data_type:32, size:1, data:254, rssi:99
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device Device TRADFRI motion sensor (a3bf) d0cf5efffe320f01 {'endpoint': 1, 'cluster': 1, 'addr': 'a3bf', 'attribute': 32, 'data': 29, 'name': 'battery_voltage', 'value': 29}
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-02-09 18:07:27 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\x88\x97Rp\x02\x11\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfef\x03'
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-02-09 18:07:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zigate.attribute_updated[L]: endpoint=1, cluster=1, addr=a3bf, attribute=32, data=29, name=battery_voltage, value=29, ieee=d0cf5efffe320f01, device_type=TRADFRI motion sensor, entity_id=zigate.d0cf5efffe320f01>
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device Device RB 265 (338c) 00158d0002fe59e1 {'endpoint': 1, 'cluster': 8, 'addr': '338c', 'attribute': 0, 'data': 254, 'name': 'current_level', 'type': <class 'int'>, 'value': 100}
2019-02-09 18:07:27 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-02-09 18:07:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zigate.d0cf5efffe320f01, old_state=<state zigate.d0cf5efffe320f01=2019-02-09 18:07:26; battery_voltage=None, battery_level=100, rssi_percent=22, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:07:26, mac_capability=10000000, rssi=57, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:07:26.959801+01:00>, new_state=<state zigate.d0cf5efffe320f01=2019-02-09 18:07:27; battery_voltage=None, battery_level=100, rssi_percent=20, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:07:27, mac_capability=10000000, rssi=51, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:07:27.975884+01:00>>
2019-02-09 18:07:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zigate.attribute_updated[L]: endpoint=1, cluster=8, addr=338c, attribute=0, data=254, name=current_level, type=int, value=100, ieee=00158d0002fe59e1, device_type=RB 265, entity_id=zigate.00158d0002fe59e1>
2019-02-09 18:07:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zigate.00158d0002fe59e1, old_state=<state zigate.00158d0002fe59e1=2019-02-09 18:07:26; battery_voltage=None, battery_level=100, rssi_percent=40, type=RB 265, manufacturer=None, receiver_on_when_idle=True, missing=False, generic_type=, discovery=, groups=, addr=338c, ieee=00158d0002fe59e1, last_seen=2019-02-09 18:07:26, mac_capability=10001110, rssi=102, friendly_name=Schlafzimmer Bulb 1, icon=mdi:access-point @ 2019-02-09T18:07:26.971215+01:00>, new_state=<state zigate.00158d0002fe59e1=2019-02-09 18:07:27; battery_voltage=None, battery_level=100, rssi_percent=39, type=RB 265, manufacturer=None, receiver_on_when_idle=True, missing=False, generic_type=, discovery=, groups=, addr=338c, ieee=00158d0002fe59e1, last_seen=2019-02-09 18:07:27, mac_capability=10001110, rssi=99, friendly_name=Schlafzimmer Bulb 1, icon=mdi:access-point @ 2019-02-09T18:07:27.989752+01:00>>
2019-02-09 18:07:27 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1849351344] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'zigate.d0cf5efffe320f01', 'old_state': <state zigate.d0cf5efffe320f01=2019-02-09 18:07:26; battery_voltage=None, battery_level=100, rssi_percent=22, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:07:26, mac_capability=10000000, rssi=57, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:07:26.959801+01:00>, 'new_state': <state zigate.d0cf5efffe320f01=2019-02-09 18:07:27; battery_voltage=None, battery_level=100, rssi_percent=20, type=TRADFRI motion sensor, manufacturer=None, receiver_on_when_idle=False, missing=False, generic_type=, discovery=auto-discovered, groups=, addr=a3bf, ieee=d0cf5efffe320f01, last_seen=2019-02-09 18:07:27, mac_capability=10000000, rssi=51, friendly_name=MotionSensor2, icon=mdi:access-point @ 2019-02-09T18:07:27.975884+01:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 2, 9, 17, 7, 27, 976130, tzinfo=<UTC>), 'context': {'id': '4b71dccf1b1e45ee8b1b4dd3f24a8666', 'user_id': None}}}
2019-02-09 18:07:28 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1849351344] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'zigate.00158d0002fe59e1', 'old_state': <state zigate.00158d0002fe59e1=2019-02-09 18:07:26; battery_voltage=None, battery_level=100, rssi_percent=40, type=RB 265, manufacturer=None, receiver_on_when_idle=True, missing=False, generic_type=, discovery=, groups=, addr=338c, ieee=00158d0002fe59e1, last_seen=2019-02-09 18:07:26, mac_capability=10001110, rssi=102, friendly_name=Schlafzimmer Bulb 1, icon=mdi:access-point @ 2019-02-09T18:07:26.971215+01:00>, 'new_state': <state zigate.00158d0002fe59e1=2019-02-09 18:07:27; battery_voltage=None, battery_level=100, rssi_percent=39, type=RB 265, manufacturer=None, receiver_on_when_idle=True, missing=False, generic_type=, discovery=, groups=, addr=338c, ieee=00158d0002fe59e1, last_seen=2019-02-09 18:07:27, mac_capability=10001110, rssi=99, friendly_name=Schlafzimmer Bulb 1, icon=mdi:access-point @ 2019-02-09T18:07:27.989752+01:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 2, 9, 17, 7, 27, 989865, tzinfo=<UTC>), 'context': {'id': '8595afc849e147eb84de3506b8a0c72b', 'user_id': None}}}

and the template json:
{
“addr”: “a3bf”,
“discovery”: “auto-discovered”,
“endpoints”: [
{
“clusters”: [
{
“attributes”: [
{
“attribute”: 5,
“data”: “TRADFRI motion sensor”,
“name”: “type”,
“type”: “str”,
“value”: “TRADFRI motion sensor”
}
],
“cluster”: 0
},
{
“attributes”: [
{
“attribute”: 32,
“data”: 29,
“name”: “battery_voltage”,
“value”: 29
}
],
“cluster”: 1
}
],
“device”: 2128,
“endpoint”: 1,
“in_clusters”: [
0,
1,
3,
9,
2821,
4096
],
“out_clusters”: [
3,
4,
6,
25,
4096
],
“profile”: 49246
}
],
“generictype”: “”,
“info”: {
“addr”: “a3bf”,
“ieee”: “d0cf5efffe320f01”,
“last_seen”: “2019-02-09 18:32:52”,
“mac_capability”: “10000000”,
“rssi”: 93
}
},

Thanks a lot.
Also having a Philips hue dimmer switch which is connecting to the zigate but not recognized as any specific device nor any of the 4 buttons changes any state or similar.
will try to collect same information

edit: corrected json