Skip to content

Chart not always sending msg.topic to output #846

@My-Random-Thoughts

Description

@My-Random-Thoughts

What are the steps to reproduce?

I know these nodes are depreciated, and I am expecting this not to get fixed :)

Example code:

[{"id":"d7ef522a3ba2651b","type":"switch","z":"c07b047ac4d1031c","name":"","property":"topic","propertyType":"msg","rules":[{"t":"null"},{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":590,"y":360,"wires":[["11d1b9f70d9f5307"],["11d1b9f70d9f5307"],[]]},{"id":"11d1b9f70d9f5307","type":"debug","z":"c07b047ac4d1031c","name":"NO TOPIC - LOUNGE SENSOR","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":695,"y":360,"wires":[],"l":false},{"id":"6e2472f9d4bb5141","type":"ui_chart","z":"c07b047ac4d1031c","name":"","group":"226d5b24d8765c69","order":2,"width":7,"height":5,"label":"Chart 1","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":440,"y":360,"wires":[["d7ef522a3ba2651b"]]},{"id":"0f04e12c2b2372b5","type":"inject","z":"c07b047ac4d1031c","name":"Every 1s","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"TopicExists","payload":"","payloadType":"date","x":280,"y":360,"wires":[["6e2472f9d4bb5141"]]},{"id":"226d5b24d8765c69","type":"ui_group","name":"Testing Group","tab":"8aa1072b76950fed","order":1,"disp":true,"width":7,"collapse":false,"className":""},{"id":"8aa1072b76950fed","type":"ui_tab","name":"TESTING","icon":"build","order":2,"disabled":false,"hidden":false}]

What happens?

I have data coming in from various temperature sensors over MQTT topics.
The msg.topic is set to the MQTT-In topic (the name of the sensor) before being sent to a specific chart node (one per topic/sensor).
The output of the chart node is then sent onwards to a MQTT-Out node, but sometimes (not always), only the msg.payload is sent, nothing else in the msg object. It's so intermittent that it's hard to pinpoint.

What do you expect to happen?

msg.topic is sent every time to the output

Please tell us about your environment:

  • Node-RED : [email protected] /usr/src/node-red
  • Node.js : v22.12.0
  • npm : 10.9.0
  • Platform : Linux 6.1.0-18-amd64 x86_64
  • Browser : FireFox 133

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions