WebHook snprintf format challenge for device name to Firebase

I’m following the tutorial from Rikkas7 (excellent tutorial!) I have it all working for my 16 ParaTry webhook values going into Firebase… BUT when I add the final 17th variable to append my photon device name to the Firebase url, it breaks the webhook and none of my 16 variables get written to Firebase… just the variable names with “” in the values field… my code is below in the pic, highlighted with the source on top and output to the Particle Console in purple… I highlighted in Yellow where I should see some output like:


… I’ve poured over my snprintf() statement… tried different variations of the {{n}} mustache variable to try to get it to work… no luck… IF I remove the “n” variable and end my snprintf() at the “u” variable, all the 16 variable output to Firebase perfectly… but I don’t get my data structure with the “deviceName” branch


any help would be appreciated! I’m sooooo close!

When providing code, pleases do it in a copy-pastable form and not as image.

How long have you declared your qP?

publish can handle up to 255 bytes. If your string is longer than that… unexpected things may happen.

you can try a) shortening the names of your name-value pairs in the JSON expression b) reducing the number of trailing zeroes in your float values and c) using a less verbose timestamp (i.e. unix timestamp) as a few of the ways to shorten your message (if it turns out that it is indeed too long).

1 Like

that was it! my qP was too small. for my string. I put some publish strlen() functions in so I could see the size so I adjusted my name-value pairs. Thanks!

Yes! I will post code next time correctly, sorry about that.

1 Like