Call Service Node .. no output... msg.payload undifined

“Previously, when I had a call service node in Node-RED, I could send the output to the next node, like a debug node, by setting msg.payload = Send Data at the bottom of the output. This allowed me to read the entity ID and the action that was performed by the follow up node. I used this setup to send a message to my phone when the screens were opened or closed. However, this no longer seems to work. When I enable debugging on the call service node itself, I can see the output, but the debug node shows msg.payload as undefined . It used to work, but now it doesn’t. Does anyone know why?” has something changed…?

There should be a box that you can select to have to output debug information.

This isn’t working for me either, it did at one time. If I set msg.topic to send data, sent data gets sent to msg.payload.

@Biscuit could you please look at this and confirm if this is a bug or am I just mistaken?

Reading the OP, I am assuming that this is about capturing some of the output properties from the call service node for use later in the flow.

The Call Service operation in Home Assistant now has a return value, and this change has been reflected in the way the Node-RED call service node works, recently adding an extra ‘return’ option.

The output properties section has setting options that include (amongst everything else)

  • sent data
  • results
  • config.

The documentation says, and a quick test shows, that ‘sent data’ returns the value from the “Data” UI field (this being just the data object part that was ‘sent’ to HA in the API call). For service calls with no requirement for a data field (eg generic homeassistant on/off/toggle) the data field is empty, hence ‘sent’ will also be empty.

The ‘config.’ option, with nothing in the field box, returns the entire set of configuration settings.

I am assuming that the OP wants these original settings. Also worth noting from our recent posts that a number (but not all) of the entity_id field names have changed to entityID.

msg. payload as confg. entityID

returns, for me at least, the entity ID (or array if more than one) of the subjects of the call service node.

I can’t recall if ‘sent data’ was previously the ‘config’ stuff, but this is how it appears to work now!

Hope that helps!

2 Likes