Function description

The dashboard for UV protection permits users to undertake measures against high levels of UV radiation. Click a city to view the UV index for this day. The weather service is queried once a day to ensure the data is current.

Flow

The entire flow can be copied from link https://flows.nodered.org/flow/d6c6f5951af49f74cba39896f1c8eb93.

Additional information on dashboards is available at: https://flows.nodered.org/node/node-red-dashboard.

Configuration

Node configuration

 

Node

Node details

Description

1

Inject

Function block Inject initiates the start of flow based on the entered time and days.

The following data can be entered or selected:

Name = Function name.

Payload = Select timestamp.

Repeat = Select at a specific time.

at = Enter execution time.

on = Select days.

 

2

Change

Function block Change defines the default value for the drop-down list.

The following data can be entered or selected:

Name = Function name.

Rules = Set / msg.payload

to = Name of default city.

3

Dropdown

Function block Dropdown defines the number of supported cities for the drop-down.

The following data can be entered or selected:

Group = Select an existing dashboard or create a new one.

Label = Describes the drop-down list on the dashboard.

Options = Defines the supported cities in the drop-down list. The names must match the data supplied in the http Request function block.

Select check box If msg ….

4

Change

The Change function block defines the variable in Function block Function.

The following data can be entered or selected:

Name = Function name.

Rules = Move / msg.payload

to = Variable name.

5

http request

The http Request function block defines the data source, e.g.: https://opendata.dwd.de/climate_environment/health/alerts/uvi.json.

The following data can be entered or selected:

Select Method = GET.

URL = Enter data source.

Enable source (SSL/TLS) = Select check box.

Use authentication = Select check box.

Type = basic authentication

Return = Select file type.

Name = Function name.

 

6

Function

Function block Function includes the associated JavaScript portion.

7

Gauge

Function block Gauge defines how the data is displayed in a tacho diagram on the dashboard.

The following data can be entered or selected:

Group = Select an existing dashboard.

Size = Set the dashboard size.

Type = Select the graphical depiction.

Value format = {{msg.payload.Index}}

Range = Set ranger as per the JavaScript.

Color gradient = Set sector colors.

Sectors = Set sectors as per the JavaScript.

Name = Function name.

8

Text

Function block Text defines the visibility of texts on the dashboard.

The following data can be entered or selected:

Group = Select an existing dashboard.

Size = Set the dashboard size.

Label = UV-Index: {{msg.payload.Index}}, {{msg.payload.UvText}}

Value format = {{msg.payload.UvMessage}}

Layout = Set text position for the recommendation.

Name = Function name.