The second curly bracket within the sprintf function is always missing which means it is not possible parse the JSON correctly. Any ideas why or where this would be stripped?
I think you are going over the 63-byte limit for Spark.publish() data. Can you try cutting down “temperature” to say "t’ and “humidity” to “h” and “lux” to “l”? You can also add formatting directives to control the number digits you are printing to have an appropriate number of significant digits.
Sure! With sprintf() you have C print formatting and you can control the total width for the number and for floating point numbers, the number of digits after the decimal point. So if we assume that temperature and humidity are the normal range, you could do this: