New custom component : ZiGate (obsolete)

I’m struggling with the same issue. Did you manage to make progress with this sensor ? @eLRIC thoughts ?

This sensor seems to use a different return message (one which is not the standard one for a presence detection sensor) and will not work with the current implementation
It should not be too complex to implement, but it needs someone to take care of it, ideally someone who owns the sensor and can test it

Thanks for feedback. Do I understand it correctly that it requires changes in the main zigate lib (in addition to custom HA component) ?

I’ve made small change in zigate lib and managed to get water sensor to work. @eLRIC, did you have something like this in mind ? If so, then I’m going to send a PR to your repo.

I’m afraid but i think this project is a little bit dead …

1 Like

There’s another project from doudz here Another component for ZiGate

1 Like

I can’t seem to order one of these from the ZiGate shop. It says invalid address for Australia and to contact the website, but there are no contact details anywhere on the website. @eLRIC?

Also, is this working with the Zigbee2MQTT project that is going on at the moment? They seem to have a complex method of firmware updating USB sniffer boards, so it would be nice to find something more user friendly. Thanks.

I don’t think it’s compatible, but try to see if you can find a key already flashed for zigbee2mqtt. I bought mine already flashed to avoid the trouble of flashing it.
I also found the support is much better with zigbee2mqtt than with the zigate (since much more user use zigbee2mqtt).

If you’re not in a hurry, do not upgrade yet to 0.84. Significative changes on state restore management broke the sensor part. Quickly patched in the github repo but not working properly yet (plugin does not hang anymore, still, restore is not working so you have to wait for the sensors to send data to see a value)

1 Like

Hi all,

First of all, thanks to everyone in this post for helping each other.
I just want to share some doubts about the initial config. I am running HA on docker in a Synology NAS.
Apparently zigate is detected and initialized correctly, here are the logs:

2018-12-23 21:13:02 DEBUG (MainThread) [custom_components.zigate] ZIGATE : Starting
2018-12-23 21:13:02 DEBUG (MainThread) [custom_components.zigate] ZIGATE : Finding zigate addresses
2018-12-23 21:13:02 DEBUG (MainThread) [custom_components.zigate] ZIGATE : All known addresses added
2018-12-23 21:13:03 WARNING (MainThread) [homeassistant.loader] You are using a custom component for light.zigate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-12-23 21:13:03 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE : Transport initialized : SerialTransport(<uvloop.Loop running=True closed=False debug=False>, <custom_components.zigate.zigate2hass.ZiGateProtocol object at 0x7f3d19d3cda0>, Serial<id=0x7f3d19e14358, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))

I have two philips hue bulbs, I plug one of them and run the command zigate.permit_join. In a moment I can see a notification saying “Zigate Breaking News ! New device c2cb paired !”

Then I add this to my configuration.yaml following the readme instructions, I only missed ‘light_type’ because I don’t know witch should I put. Restart the server:

light:
  - platform: zigate
    name: 'Luz mesa Juan'
    address: c2cb
    default_state: 'event'

I can see now in the dashboad a new light with a toggle button and is OFF, but the light is ON right now.
Does it make sense? Is there any useful information printed in the bulb?

If I toggle the button to ON nothing happens I can see this in the log:

2018-12-23 21:37:27 DEBUG (SyncWorker_3) [zigate] --------------------------------------
2018-12-23 21:37:27 DEBUG (SyncWorker_3) [zigate] REQUEST      : 0092 02c2cb0101
2018-12-23 21:37:27 DEBUG (SyncWorker_3) [zigate]   # standard : 01 00 92 00 05 9C 02 C2 CB 01 01 03
2018-12-23 21:37:27 DEBUG (SyncWorker_3) [zigate]   # encoded  : b'01021092021002159c0212c2cb0211021103'
2018-12-23 21:37:27 DEBUG (SyncWorker_3) [zigate] (timestamp : 21:37:27)
2018-12-23 21:37:27 DEBUG (SyncWorker_3) [zigate] --------------------------------------
2018-12-23 21:37:27 DEBUG (MainThread) [zigate] --------------------------------------
2018-12-23 21:37:27 DEBUG (MainThread) [zigate] RESPONSE 8000 : Status
2018-12-23 21:37:27 DEBUG (MainThread) [zigate]   * Status              : Success
2018-12-23 21:37:27 DEBUG (MainThread) [zigate]   - Sequence            : b'1b'
2018-12-23 21:37:27 DEBUG (MainThread) [zigate]   - Response to command : b'0092'
2018-12-23 21:37:27 DEBUG (MainThread) [zigate]   # encoded : b'0180021002100215021c02101b021092021003'
2018-12-23 21:37:27 DEBUG (MainThread) [zigate]   # decoded : 0180 00 00 05 0C 00 1B 00 92 0003
2018-12-23 21:37:27 DEBUG (MainThread) [zigate]   (@timestamp : 21:37:27)

If I toggle the button to OFF nothing happens I can see this in the log:

2018-12-23 21:38:12 DEBUG (SyncWorker_0) [zigate] --------------------------------------
2018-12-23 21:38:12 DEBUG (SyncWorker_0) [zigate] REQUEST      : 0092 02c2cb0100
2018-12-23 21:38:12 DEBUG (SyncWorker_0) [zigate]   # standard : 01 00 92 00 05 9D 02 C2 CB 01 00 03
2018-12-23 21:38:12 DEBUG (SyncWorker_0) [zigate]   # encoded  : b'01021092021002159d0212c2cb0211021003'
2018-12-23 21:38:12 DEBUG (SyncWorker_0) [zigate] (timestamp : 21:38:12)
2018-12-23 21:38:12 DEBUG (SyncWorker_0) [zigate] --------------------------------------
2018-12-23 21:38:12 DEBUG (MainThread) [zigate] --------------------------------------
2018-12-23 21:38:12 DEBUG (MainThread) [zigate] RESPONSE 8000 : Status
2018-12-23 21:38:12 DEBUG (MainThread) [zigate]   * Status              : Success
2018-12-23 21:38:12 DEBUG (MainThread) [zigate]   - Sequence            : b'1c'
2018-12-23 21:38:12 DEBUG (MainThread) [zigate]   - Response to command : b'0092'
2018-12-23 21:38:12 DEBUG (MainThread) [zigate]   # encoded : b'0180021002100215021b02101c021092021003'
2018-12-23 21:38:12 DEBUG (MainThread) [zigate]   # decoded : 0180 00 00 05 0B 00 1C 00 92 0003
2018-12-23 21:38:12 DEBUG (MainThread) [zigate]   (@timestamp : 21:38:12)

any ideas of what I am doing wrong?

Thanks in advance

Hi
Try address: c2cb01
(Need endpoint)

Thanks @eLRIC for the response. It didn’t work.
Did I miss something in the documentation?
Is there any place it describe how to add the lights, etc… Or it explains the endpoint topic?
light_type: ‘dual-white’, is this mandatory?

Sorry but I am little bit lost

I quickly looked at the code and I don’t get yet if light_type is used for something specific (I don’t have zigbee lights so never tested this part myself)

At first, I would try with the full configuration example stated here : https://github.com/elric91/homeassistant_zigate/wiki/Configuration-examples
If it is still not working, please open an issue on the github, so that we can have a deeper look on what’s wrong

If anyone is interested, problem with sensors “restore” on 0.84+ has been corrected with latest code on github

Like others before me here, I’m having some trouble getting started with the ZiGate. I’ve connected the ZiGate (without WiFi) through USB on a raspberry pi 3, running hassio.
I keep getting this error every time I run the zigate.permit_join service: Failed with event code: 128

2019-01-02 15:16:51 DEBUG (MainThread) [custom_components.zigate] ZIGATE : Starting
2019-01-02 15:16:51 DEBUG (MainThread) [custom_components.zigate] ZIGATE : Finding zigate addresses
2019-01-02 15:16:51 DEBUG (MainThread) [custom_components.zigate] ZIGATE : All known addresses added
2019-01-02 15:16:51 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE : Transport initialized : SerialTransport(<uvloop.Loop running=True closed=False debug=False>, <custom_components.zigate.zigate2hass.ZiGateProtocol object at 0x72ad4230>, Serial<id=0x72eb7fd0, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
2019-01-02 15:18:38 DEBUG (SyncWorker_4) [zigate] --------------------------------------
2019-01-02 15:18:38 DEBUG (SyncWorker_4) [zigate] REQUEST      : 0049 FFFC1E00
2019-01-02 15:18:38 DEBUG (SyncWorker_4) [zigate]   # standard : 01 00 49 00 04 50 FF FC 1E 00 03
2019-01-02 15:18:38 DEBUG (SyncWorker_4) [zigate]   # encoded  : b'010210490210021450fffc1e021003'
2019-01-02 15:18:38 DEBUG (SyncWorker_4) [zigate] (timestamp : 15:18:38)
2019-01-02 15:18:38 DEBUG (SyncWorker_4) [zigate] --------------------------------------
2019-01-02 15:18:38 DEBUG (MainThread) [zigate] --------------------------------------
2019-01-02 15:18:38 DEBUG (MainThread) [zigate] RESPONSE 8000 : Status
2019-01-02 15:18:38 DEBUG (MainThread) [zigate]   * Status              : Failed with event code: 128
2019-01-02 15:18:38 DEBUG (MainThread) [zigate]   - Sequence            : b'00'
2019-01-02 15:18:38 DEBUG (MainThread) [zigate]   - Response to command : b'0049'
2019-01-02 15:18:38 DEBUG (MainThread) [zigate]   # encoded : b'01800210021002154c800210021049021003'
2019-01-02 15:18:38 DEBUG (MainThread) [zigate]   # decoded : 0180 00 00 05 4C 80 00 00 49 0003
2019-01-02 15:18:38 DEBUG (MainThread) [zigate]   (@timestamp : 15:18:38)
2019-01-02 15:19:56 DEBUG (SyncWorker_9) [zigate] --------------------------------------

Strange : it seems that pairing is not working
What device are you trying to pair ?

A Philips Hue bulb. I have reset the hue bulb, and the hue bridge itself is turned off.
The failure response is instant though, it’s not like it’s timing out or anything. I did notice a led blinking on the TTL part of the zigate, not on the radio module…

Did you first “factory reset” your device ? (it apparently needs to be reset first to enable new pairing). Just a guess according to Zigate’s creator blog (http://faire-ca-soi-meme.fr/zigate/2017/11/27/maitrisez-vos-ampoules-zigbee/)

I did a factory reset. But I’m thinking that the issue is not with the device I’m trying to pair, since the error occurs instantly after sending the zigate.permit_join command.
I’ve found this in some zigbee documentation:

MALFORMED_COMMAND
0x80
The command appears to contain the wrong fields, as detected either by the presence of one or more invalid field entries or by there being missing fields. Command not carried out. Implementer has discretion as to whether to return this error or INVALID_FIELD.

https://mmbnetworks.atlassian.net/wiki/spaces/SPRC2/pages/111321476/Zigbee+Specification+References

Update: it started working after I called zigate.init. And I’ve been able to discover the light bulb with zigate. Now onto the configuration :slight_smile: I have to say that it’s quite a bit of trail & error setting this thing up, hope it’s worth it :slight_smile:

Glad it worked (and telling it as I was looking for a potential issue in the code …). Zigate is undoubtedly worth it if you value privacy and want a unique platform for all your zigbee devices.
Be careful with the config of the bulb as its endpoint may not be ‘01’ as many other devices (may be ‘0b’ according to zigate’s blog examples)