-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicate data indication 0x8002 #346
Comments
Firmware for testing can be taken here https://github.com/G1K/ZiGate/actions/runs/479754512 |
This is correct, and up to the application layer to deduplicate . This is at least what we do on hybrid and normal mode |
And what is the point of sending two identical messages via UART, is it possible to deduplicate at the firmware level? |
please feel free to propose a PR doing the deduplication. |
My knowledge of C is only enough to remove the re-call. Please tell me what this can affect and in what cases? |
I don't understand what you mean, just do the deduplication at the application level, this is also why the SQN is provided. I leave @fairecasoimeme to comment |
You have duplication due to the Hybrid mode, no ? |
@fairecasoimeme told me that hybrid mode can be used for messages unknown by zigate. |
The hybrid mode permit to catch messages which is not known by ZiGate and manage the "classic" packet too |
I wrote about the raw mode, not the hybrid mode. the duplication that I found is in this comment here #346 (comment) |
OK, we will see. thx |
I'm just investigate and this is not really a duplicate packet, It's just read attribute type which generate 2 callback handling. |
I add E_ZCL_CBET_READ_ATTRIBUTES_RESPONSE in filter for the same reason. Thanks to @KiwiHC16 sniff |
Verif previous sqn to know if it's new or no (used when attr responses contain multi attr)
Fixed |
It seems to me that the sqn selects the device itself and it is possible that two different devices will send messages with one sqn in turn. Then such a message will be filtered out. |
I added the short address to the SQN to differenciate
Ok you're right. I added the short address to the variable. |
Might it not be good with duplicated data for redundancy to better handle serial packet loss if you are using the adapter on a WiFi bridge and stream the raw data via a serial proxy server such as for example ser2net over a possibly unstable WiFi network? I do not know about the ZiGate WiFi bridge connection works internally but the EmberZNet Serial Protocol (EZSP) that Silicon Labs based products use does not do a good job at handling the loss of serial packages (serial communication faults) which could be caused by WiFi interference if network packages are lost or if WiFi goes down. Because of this, devs of the bellows library for zigpy has posted this warning against using Zigbee to WiFi bridges with EZSP: https://github.com/zigpy/bellows#warning-about-zigbee-to-wifi-bridges Warning about Zigbee to WiFi bridges zigpy requires a robust connection between the zigpy radio library and the serial port of the Zigbee radio. With solutions such as ITEAD Sonoff ZBBridge or a Ser2Net serial proxy connection over a WiFi network it is expected to see NCP entered failed state. Requesting APP controller restart in the logs. This is a normal part of the operation and indicates there was a drop in communication which caused packet loss to occurred between the zigpy radio library and the Zigbee radio. The use of serial network proxies/bridges/servers over WiFi is therefore not recommended when wanting a stable Zigbee environment with zigpy. |
firmware 31e |
In raw mode, messages are often duplicated with one sqn coming in 2 messages each. Judging by my tests, the callback for the endpoint in the sdk is called several times. I'm not sure about the correctness, but that's how it seems to work and doesn't cause duplication
G1K@be7d6a6
The text was updated successfully, but these errors were encountered: