Hi @Colin , yes it is definitely that influxdb node generating the error. I didn't expand the 2nd array element to fit it on the page better. It's just tag data which I add with the function node.
Here is an example flow showing the issue:
[{"id":"fac377e1.b80978","type":"function","z":"be5275e8.e06c78","name":"Format front door letterbox Aqara","func":"//Convert the contact payload to 1 or 0 value\nvar open = msg.payload.contact === false ? 1 : 0\n\n\n//Now configure the payload as normal for influxDB\n\n\nmsg.payload = [\n {\n contact_binary: open,\n contact: msg.payload.contact,\n batteryPercent: msg.payload.battery,\n linkQuality: msg.payload.linkquality,\n batteryVolts: msg.payload.voltage\n },\n {\n topic: \"zigbee2mqtt/Xiaomi_4_letterbox\",\n make: \"aqara\",\n location: \"hallway\",\n connection: \"zigbee\",\n power: \"battery\",\n friendlyname: \"Letterbox\"\n }\n];\n\nreturn msg;\n\n//877 info:\n//TAG KEYS are topic/make/location/connection/power\n//TAG VALUES are \"aqara/lounge/zigbee/battery\"\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":850,"y":4210,"wires":[["8e8d224e.117fd"]]},{"id":"d736fb41.90d238","type":"debug","z":"be5275e8.e06c78","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":4290,"wires":[]},{"id":"8e8d224e.117fd","type":"debug","z":"be5275e8.e06c78","name":"debug (goes to influxdb node)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1160,"y":4210,"wires":[]},{"id":"d175859e.f18018","type":"inject","z":"be5275e8.e06c78","name":"Complete payload","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"zigbee2mqtt/Xiaomi_4_letterbox","payload":"{\"battery\":97,\"contact\":true,\"linkquality\":39,\"voltage\":2995}","payloadType":"json","x":460,"y":4180,"wires":[["fac377e1.b80978","d736fb41.90d238"]]},{"id":"1cdf3b83.74b9f4","type":"inject","z":"be5275e8.e06c78","name":"Partial payload","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"zigbee2mqtt/Xiaomi_4_letterbox","payload":"{\"battery\":97,\"contact\":true,\"voltage\":2995}","payloadType":"json","x":450,"y":4240,"wires":[["fac377e1.b80978","d736fb41.90d238"]]}]
It does not only happen with this flow, it occurs with any flow where there is an missing payload, which end up as undefined
.
I'm sure there must be a way to deal with this in the function..