You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • If you put the message through to the debug node then you'll be able to see what's in it.

    At the moment it appears that what you'll be seeing is {"type":"Buffer","data":[11]}, so to get the data you need to do JSON.parse(msg.payload).data[0].

    However that was never the intention. If you pull the latest version of EspruinoHub I just fixed it so it reports a JSON array. It means you can check with msg.payload=="[11]" or can do JSON.stringify(msg.payload) and get an actual array.

About

Avatar for Gordon @Gordon started