FlowFuse / nr-project-nodes

A set of Node-RED nodes for inter-project communication within the FlowFuse platform
Apache License 2.0
5 stars 0 forks source link

Include `msg.projectLink.deviceId` if message sent by device #17

Closed knolleary closed 1 year ago

knolleary commented 1 year ago

To help distinguish messages coming from multiple devices, we should include the deviceId as msg.projectLink.deviceId in the message sent by the Project In node.

This will have to be passed across in the userProperties object of the message as we cannot determine it from the received topic.

Steve-Mcl commented 1 year ago

@knolleary busy with this one now.

Question: As well as adding deviceId I propose we also add deviceName and deviceType to msg.projectLink

Rationale: I may need to regenerate device.yml but dont want to modify flows to update the deviceId - instead I want to use deviceName since the named device "device-machine-1-monitor" never changes and sometimes I want to use the device type for actioning messages from specific device types.

knolleary commented 1 year ago

Yup - sounds good.