Dave, that's what I presumed.
I've now flooded the code with debug messages to the console and have found the error: msg.payload.toLowerCase()
So I've moved the checking code to before:
// check for numeric payload
if (typeof(msg.payload) === "number") {
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/0472f2c8-ff38-43ee-85b6-83485dd0fa5c%40googlegroups.com.