Note Red Sample Application

Thanks, that helps in understanding the syntax, however, I am still having problems.

If I send short messages to the notecard things seem to work fine, but if I have multiple values in the JSON (4 sometimes works, 10 almost never works (but I can get “lucky”)) the transaction fails and I get this message in the terminal: (node:17838) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line options | Node.js v15.7.0 Documentation). (rejection id: 356)

Per this message, the issue seems to be with the I2CTransactor.

If I take the same JSON object format and shorten it to only include ,say, 2 name value pairs it works.

Hi Lee. Thanks very much. I’ll expect to take a deeper dive tomorrow afternoon.

I know what error message isn’t caught. I know why the error is thrown. But I’m not sure yet why the condition that the error message is thrown by is occurring. I’ll keep you updated on my progress.

I have been able to reproduce the issue. Working on figuring out the cause.

Thanks! Sounds great.

Found one issue where the I2C was sending message chunks too rapidly. When a message exceeds 253 bytes, it has to be chunked. I initially had the chunks stacking on top of each other on the Notecard.

I’m refactoring now to handle including delay between sending message chunks. I’ll update once that’s complete.

Pushed update to Node Red repo v1.0.1 :

This upgrade is more reliable, but stressing it with and object with 11 attributes, I get this message:
(node:1154) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line options | Node.js v15.8.0 Documentation). (rejection id: 8)

The upgraded node handles more name:value pairs / JSON, but still seems to have issues with pacing on the I2C or with data ingestion on the notecard … just my guess!

Best,

Lee

Oh, sorry, and with smaller JSON uploads, I get the ack { total: x }, but with larger JSON objects this does not occur & I get the console message above.

@leehouse
Able to reproduce the issue you are still experiencing. Not sure the reason why the is failing. Digging in now.

Resolved with a Notecard firmware upgrade. Build 12432 or later. Currently requires Blues Support staff to enable this upgrade. Please email support@blues.com and reference this thread on the forum.

I may enhance the Node Red Notecard Config node to enable a workaround that seems to avoid the issue. I will post here if I do include that enhancement.