1.5.1 • Published 1 year ago

@mschaeffler/node-red-format v1.5.1

Weekly downloads
-
License
LGPL-2.1
Repository
github
Last release
1 year ago

@mschaeffler/node-red-format

Nodes to format data for dashboard 2.0.

If the msg property invalid is present in the message, all nodes ignore the message.

Install

$ npm install @mschaeffler/node-red-format

formNumber

Formats the payload as a number.

image of nodes

Input

The message property to be used as payload can be defined with the Property property.

This value is then

  • if the value is a number: converted to a string according to the parameters and a unit is added
  • if the value is null or does not exist, null is sent
  • if a JSONata expression cannot be evaluated, null is sent
  • in other cases: been sent out unmodified

Output

msg.typedescription
payloadstringformated value

Parameters

configtypedescription
Propertystringdefines the message property to be used as payload.
Einheitstringunit of the value.
Tausenderstringcharacter to group the number in segments of 3 digits.
Dezimalstringcharacter to decimal separation.
Stellennumbernumber of digits after the decimal point.
Statusbooleanshows the actual value as a node status.
Filterbooleanblock sending of unchanged payload.

Example Flow

Aggregates data series for a chart of dashboard 2.0.

example flow

collectChart

Formats the payload as a number.

image of nodes

Input

The message property to be used as payload can be defined with the Property property.

msg.typedescription
topicstringseries of the input value.
payloadstringinput value.

Output

msg.typedescription
payloadarrayformated value for the dashboard 2.0 chart

Parameters

configtypedescription
Propertystringdefines the message property to be used as payload.
Contextstorecontext storecontext store for storing the values; none is no storage.
TopicsJSON arrayarray of the serieses of the chart. They can be either a string with just the name or an object with values from the next chapter.
Cyclicnumbercyclic time to send out the chart in seconds.
Löschzyklennumberevery how many cycles old data is deleted from the chart.
Hoursnumberhow many hours the chart should span over.
Stepsbooleanmake steps instead of linear chart.
Erase only with databooleando not delete outdated data, if there is no new data arriving at the input.
Statusbooleanshows the actual value as a node status.

Example Flow

example flow

Author

Mathias Schäffler

License

LGPL-2.1

1.5.1

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.2.3

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago