gdoor-org / gdoor

Wifi adapter and bus protocol documentation for the Gira TKS Door System
https://gdoor-org.github.io/
GNU General Public License v3.0
14 stars 4 forks source link

Last action gets repeated? #8

Closed jschroeter closed 2 months ago

jschroeter commented 2 months ago

I think there might be a bug in the firmware: apparently the last received action is repeated every now an then. In the screenshot there is a log of the actions received by Gdoor (note the increasing event_id). E.g. there are actions received during night time where there was clearly no user interaction. Maybe there are (yet unknown) things going on on the bus and due to a bug the last received action is detected again? Unfortunately I don't have a debug mode log recorded yet - I'll try to record one asap.

gdoor-log
DaSchaef commented 2 months ago

Reading the code, there may be a bug in https://github.com/gdoor-org/gdoor/blob/main/firmware/esp32/gdoor/src/gdoor_data.cpp#L56

I'll try to commit an easy fast fix

DaSchaef commented 2 months ago

Please check :)

jschroeter commented 2 months ago

Looks good, thanks! Do you know what triggered these?

DaSchaef commented 2 months ago

Glitches/Spikes on the bus triggered the receive logic. The ESP logic detected that it is only a glitch and aborted.

But the aborted receive was not checked by the serial communication part. So the last received data (still in RAM) was send out.