Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
456 stars 277 forks source link

State of ZiGate support #1037

Open Koenkk opened 3 weeks ago

Koenkk commented 3 weeks ago

In https://github.com/Koenkk/zigbee-herdsman/pull/1033 some issues with the ZiGate adapter were discovered, some parts of the code look broken. Since I've not seen any issues reported about ZiGate, I'm wondering wether anyone is still using it and if it still works.

Tagging some people who have worked on or used the ZiGate adapter: @G1K @devbis @kirovilya @yateeshc @eswenson1 @incognito1234 @rclsilver @darkxst @JC38

My question to you: are you still using the ZiGate adapter and if yes, does it work fine?

eswenson1 commented 3 weeks ago

I’m using Zigate with ThirdReality Zigbee USB dongle. After updating the firmware that came with the dongle, with works fine with HA OS/Zigbee2MQTT.

Nerivec commented 2 weeks ago

Some of the issues identified (that I could remember), related to frames handling only (may be others in other areas):

Inconsistent position increase: https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/buffaloZiGate.ts#L14

Typo resulting in passthrough to Buffalo (would also read instead of write): https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/buffaloZiGate.ts#L21

Typo resulting in passthrough to Buffalo: https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/buffaloZiGate.ts#L77

Inconsistent read/write (and inconsistent usage): https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/buffaloZiGate.ts#L103 https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/buffaloZiGate.ts#L108

Broken (messageType.ts and commandType.ts both need a detailed look-over): https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/messageType.ts#L215

Missing types (enum isn't used at all...): BUFFER_RAW, UINT16BE, UINT32BE, LIST_UINT16BE, MAYBE_UINT8, LOG_LEVEL, STRING https://github.com/Koenkk/zigbee-herdsman/blob/e90595a0b57d2f8e185744c7e64bf3f824d4f7c7/src/adapter/zigate/driver/parameterType.ts#L1


Some issues were corrected (hopefully) in https://github.com/Koenkk/zigbee-herdsman/pull/1033 but some stuff needs to be looked over by someone with zigate-specific knowledge.

JC38 commented 2 weeks ago

Hello, I am still using it, but just with 8 devices that I need to migrate to my other controllers (I have 4 zigbee2mqtt ;-) ) No issues with the 8.

darkxst commented 2 weeks ago

As mentioned above the Third Reality Zigbee Dongle, which is a relatively new product is using Zigate backend. I tried to ping a contact I have there about this, however his email is bouncing. However they are part of the "works with Home Assistant" program and so I would guess they make some efforts to support this backend.

eswenson1 commented 2 weeks ago

I have a contact at ThirdReality who has been very responsible and helped me get things working. I hesitate to put his email address here, but it you want to contact me directly, I’ll give you his email.

Nerivec commented 2 weeks ago

@eswenson1 If you can contact that person yourself, and let them know about this thread. It would be good if someone could go over the driver here in details. At first glance, some stuff still needs proper support, and likely several fixes and many optimizations to be done. Long story short, the zigate driver needs someone to take up the task of maintaining it; it pretty much stopped receiving updates 3 years ago... https://github.com/Koenkk/zigbee-herdsman/pulls?q=is%3Apr+zigate+in%3Atitle+

eswenson1 commented 2 weeks ago

I sent a message to my contact at ThirdReality and provided a link to this thread. Let’s see if it provokes any response.

eswenson1 commented 2 weeks ago

I have a contact at ThirdReality who has been very responsible and helped me get things working. I hesitate to put his email address here, but it you want to contact me directly, I’ll give you his email.

I wanted to point out that you will see errors with HA/Zigbee2MQTT with the ThirdReality Zigbee USB dongle until you update to the latest firmware. The dongle came with older firmware, and Zigbee-herdsman reported errors parsing the status that came back from the dongle.

llhappier commented 1 week ago

Hi. The Zigate Protocol Introduction Link: https://zigate.fr/documentation/commandes-zigate/ I’m using Zigate with ThirdReality Zigbee USB dongle,also with works fine with HA OS/Zigbee2MQTT. It will report some errors but do not affect normal use. I will take some time to review it. Thank you very much.

eswenson1 commented 1 week ago

I recently updated to the latest version of Zigbee2MQTT and now I can no longer successfully interact with my ThirdReality Zigbee USB Dongle. The log shows messages like this:

[2024-05-05 15:44:02] info:     zh:zigate:frame: {"msgCodeBytes":{"type":"Buffer","data":[132,1]},"msgLengthBytes":{"type":"Buffer","data":[0,12]},"checksumBytes":{"type":"Buffer","data":[204]},"msgPayloadBytes":{"type":"Buffer","data":[0,1,0,153,206,6,0,1,0,20,0]},"rssiBytes":{"type":"Buffer","data":[0]},"msgLengthOffset":-1}
[2024-05-05 15:44:02] error:    zh:zigate:driver: Parsing error: Error: Message '8401' not found
[2024-05-05 15:44:04] info:     zh:zigate:frame: {"msgCodeBytes":{"type":"Buffer","data":[128,2]},"msgLengthBytes":{"type":"Buffer","data":[0,23]},"checksumBytes":{"type":"Buffer","data":[106]},"msgPayloadBytes":{"type":"Buffer","data":[0,1,4,5,0,1,1,2,153,206,2,0,0,25,91,0,1,0,0,20,0,0]},"rssiBytes":{"type":"Buffer","data":[255]},"msgLengthOffset":-1}
[2024-05-05 15:44:04] info:     zh:zigate:frame: {"msgCodeBytes":{"type":"Buffer","data":[132,1]},"msgLengthBytes":{"type":"Buffer","data":[0,12]},"checksumBytes":{"type":"Buffer","data":[204]},"msgPayloadBytes":{"type":"Buffer","data":[0,1,0,153,206,6,0,1,0,20,0]},"rssiBytes":{"type":"Buffer","data":[0]},"msgLengthOffset":-1}
[2024-05-05 15:44:04] error:    zh:zigate:driver: Parsing error: Error: Message '8401' not found

I'm running version 1.37.0-1.

Nerivec commented 1 week ago

@eswenson1 Looks like frames that aren't implemented in the driver yet. That was only shown in debug mode before 1.37, so you wouldn't have seen these errors. I don't think that's the source of your problem. Can you upload a complete log file?

sebPomme commented 1 week ago

Hi, i still use my zigate+ it still works. I got some messages in the logs:

engine-1  | [2024-05-12 15:05:34] error:         zh:zigate:driver: Parsing error: Error: Message '8008' not found

those messages brings me here I use koenkk/zigbee2mqtt:1.37.1

mipsou commented 6 days ago

Same error with same version

ttyUSB0 /dev/serial/by-id/usb-FTDI_ZiGate_ZIGATE+-if00-port0 Sous-système: tty Chemin d’accès au périphérique: /dev/ttyUSB0 ID: /dev/serial/by-id/usb-FTDI_ZiGate_ZIGATE+-if00-port0 Attributs: DEVLINKS: >- /dev/serial/by-id/usb-FTDI_ZiGate_ZIGATE+-if00-port0 /dev/serial/by-path/platform-fd8c0000.usb-usb-0:1:1.0-port0 /dev/serial/by-path/platform-fd8c0000.usb-usbv1-0:1:1.0-port0 DEVNAME: /dev/ttyUSB0 DEVPATH: /devices/platform/fd8c0000.usb/usb5/5-1/5-1:1.0/ttyUSB0/tty/ttyUSB0 ID_BUS: usb ID_MODEL: ZiGate ID_MODEL_ENC: ZiGate ID_MODEL_ID: '6015' ID_PATH: platform-fd8c0000.usb-usb-0:1:1.0 ID_PATH_TAG: platform-fd8c0000_usb-usb-0_1_1_0 ID_PATH_WITH_USB_REVISION: platform-fd8c0000.usb-usbv1-0:1:1.0 ID_REVISION: '1000' ID_SERIAL: FTDI_ZiGate_ZIGATE+ ID_SERIAL_SHORT: ZIGATE+ ID_TYPE: generic ID_USB_DRIVER: ftdi_sio ID_USB_INTERFACES: ':ffffff:' ID_USB_INTERFACE_NUM: '00' ID_USB_MODEL: ZiGate ID_USB_MODEL_ENC: ZiGate ID_USB_MODEL_ID: '6015' ID_USB_REVISION: '1000' ID_USB_SERIAL: FTDI_ZiGate_ZIGATE+ ID_USB_SERIAL_SHORT: ZIGATE+ ID_USB_TYPE: generic ID_USB_VENDOR: FTDI ID_USB_VENDOR_ENC: FTDI ID_USB_VENDOR_ID: '0403' ID_VENDOR: FTDI ID_VENDOR_ENC: FTDI ID_VENDOR_ID: '0403' MAJOR: '188' MINOR: '0' SUBSYSTEM: tty TAGS: ':systemd:'