Skip to content
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

I2C(and normal components) Packet Decode Errors #452

Closed
tyeth opened this issue Jul 19, 2023 · 2 comments
Closed

I2C(and normal components) Packet Decode Errors #452

tyeth opened this issue Jul 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working Status: Needs Investigation

Comments

@tyeth
Copy link
Contributor

tyeth commented Jul 19, 2023

So this ticket is to cover current and future i2c packet decode errors like #381 #408 and #437 (also showed up in #451)
I initially had a false assumption that it related to unpublished components, but as we've seen in the past it mostly related to the adafruit mqtt library and the packet size and subscription maxlength.
I think because I built at least a few times during testing on the Arduino IDE it would have used the adafruit version of the mqtt library, whereas the platformio (VSCode IDE) and github CI have both been changed to use a forked version that @brentru maintains hotfixes/WipperSnapper experiments on.
This could have led to my decode error as there are noticable changes to those maxlengths e.g. adafruit/Adafruit_MQTT_Library@master...brentru:Adafruit_MQTT_Library:master#diff-240d52c08217f01fd327187461355707b15e7e24e0e6e3da37f0a67fa12006ceL110-L127

The Decode Error occurs at boot, after connecting to adafruit IO as part of receiving the I2C settings. This can occur when deleting a component (reset), or if wifi dropped / power loss etc, and the device will be fully functional beforehand and dead after this ocurrance. It can be fixed by removing the i2c components (to reduce the max packet size related to i2c components), and if the user is unaware then they can add all the components back again and data will flow for many more components than can be supported until when the device resets and receives the i2c settings again. This probably happens with non-i2c components too.

@tyeth
Copy link
Contributor Author

tyeth commented Aug 7, 2023

PUBLISHING -> I2C Device Sensor Event Message...ERROR: Failed to encode and publish I2CDeviceEvent!
Noted while near the feed limit (9 metrics/feeds and adding the 10th). Also noticed at/around the throttle limit, that new components aren't always initialised, despite the device appearing to wait for the throttle before attempting to send i2c device message. Must be removed and re-added. This was a second BMP388 being added, but after selecting the metrics frequency and choosing add component the device was throttled and failed to acknowledge the addition successfully. It would be nice if it retried.
image

@brentru
Copy link
Member

brentru commented Aug 31, 2023

This should be resolved by adafruit/Adafruit_MQTT_Library#227 and will be included in WipperSnapper Beta 71 (released later today).

Please try beta 71 and let me know in this issue if the packet decode error has been resolved or is still persistent.

@brentru brentru closed this as completed Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Needs Investigation
Projects
None yet
Development

No branches or pull requests

2 participants