Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit 0554fcb

Browse files
committed
Merge branch 'staging/4.2' into release/4.2
2 parents 503bef0 + edbd2be commit 0554fcb

116 files changed

Lines changed: 4406 additions & 1674 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ collections:
8080
output: true
8181

8282
release:
83-
branch: release-4.2
83+
branch: release-4.2.1
8484
branch_major_next: master
85-
ver: 4.2
86-
ce_ver: 4.2
87-
ce_tag: v4.2
88-
ce_full_ver: 4.2.0
89-
pe_ver: 4.2pe
90-
pe_full_ver: 4.2.0PE
91-
wd_examples_commit: v4.2
85+
ver: 4.2.1
86+
ce_ver: 4.2.1
87+
ce_tag: v4.2.1
88+
ce_full_ver: 4.2.1
89+
pe_ver: 4.2.1pe
90+
pe_full_ver: 4.2.1PE
91+
wd_examples_commit: v4.2.1
9292
# >>> EDGE
9393
edge_ver: 4.2
9494
edge_tag: v4.2

_data/docs-home.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ toc:
214214
- title: AI models
215215
path: /docs/samples/analytics/ai-models/
216216
new: true
217+
- title: Local AI with Ollama
218+
path: /docs/samples/analytics/ollama/
219+
new: true
217220
- title: Trendz Analytics
218221
path: /docs/trendz/
219222
- title: Kafka Streams
@@ -229,6 +232,8 @@ toc:
229232
path: /docs/pe/user-guide/reporting/scheduling-reports/
230233
- title: Embedding subreports
231234
path: /docs/pe/user-guide/reporting/subreport/
235+
- title: Embedding charts
236+
path: /docs/pe/user-guide/reporting/embedding-charts/
232237
- title: Embedding dashboards
233238
path: /docs/pe/user-guide/reporting/embedding-dashboards-widgets/
234239
- title: Attaching report to notification

_data/paas-eu/docs-home.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ toc:
248248
- title: AI models
249249
path: /docs/paas/eu/samples/analytics/ai-models/
250250
new: true
251+
- title: Local AI with Ollama
252+
path: /docs/paas/eu/samples/analytics/ollama/
253+
new: true
251254
- title: Trendz Analytics
252255
path: /docs/trendz/
253256
- title: Kafka Streams
@@ -263,6 +266,8 @@ toc:
263266
path: /docs/paas/eu/user-guide/reporting/scheduling-reports/
264267
- title: Embedding subreports
265268
path: /docs/paas/eu/user-guide/reporting/subreport/
269+
- title: Embedding charts
270+
path: /docs/paas/eu/user-guide/reporting/embedding-charts/
266271
- title: Embedding dashboards
267272
path: /docs/paas/eu/user-guide/reporting/embedding-dashboards-widgets/
268273
- title: Attaching report to notification

_data/paas/docs-home.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ toc:
248248
- title: AI models
249249
path: /docs/paas/samples/analytics/ai-models/
250250
new: true
251+
- title: Local AI with Ollama
252+
path: /docs/paas/samples/analytics/ollama/
253+
new: true
251254
- title: Trendz Analytics
252255
path: /docs/trendz/
253256
- title: Kafka Streams
@@ -263,6 +266,8 @@ toc:
263266
path: /docs/paas/user-guide/reporting/scheduling-reports/
264267
- title: Embedding subreports
265268
path: /docs/paas/user-guide/reporting/subreport/
269+
- title: Embedding charts
270+
path: /docs/paas/user-guide/reporting/embedding-charts/
266271
- title: Embedding dashboards
267272
path: /docs/paas/user-guide/reporting/embedding-dashboards-widgets/
268273
- title: Attaching report to notification

_data/pages_info.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,9 @@
18461846
"/docs/paas/eu/samples/analytics/mcp-server-ai-insights/":
18471847
url: "/docs/paas/eu/samples/analytics/mcp-server-ai-insights/"
18481848
redirect_from: []
1849+
"/docs/paas/eu/samples/analytics/ollama/":
1850+
url: "/docs/paas/eu/samples/analytics/ollama/"
1851+
redirect_from: []
18491852
"/docs/paas/eu/samples/sia-connect/":
18501853
url: "/docs/paas/eu/samples/sia-connect/"
18511854
redirect_from: []
@@ -2125,6 +2128,9 @@
21252128
"/docs/paas/eu/user-guide/reporting/attaching-report-to-notification/":
21262129
url: "/docs/paas/eu/user-guide/reporting/attaching-report-to-notification/"
21272130
redirect_from: []
2131+
"/docs/paas/eu/user-guide/reporting/embedding-charts/":
2132+
url: "/docs/paas/eu/user-guide/reporting/embedding-charts/"
2133+
redirect_from: []
21282134
"/docs/paas/eu/user-guide/reporting/embedding-dashboards-widgets/":
21292135
url: "/docs/paas/eu/user-guide/reporting/embedding-dashboards-widgets/"
21302136
redirect_from: []
@@ -2382,6 +2388,9 @@
23822388
"/docs/paas/samples/analytics/mcp-server-ai-insights/":
23832389
url: "/docs/paas/samples/analytics/mcp-server-ai-insights/"
23842390
redirect_from: []
2391+
"/docs/paas/samples/analytics/ollama/":
2392+
url: "/docs/paas/samples/analytics/ollama/"
2393+
redirect_from: []
23852394
"/docs/paas/samples/sia-connect/":
23862395
url: "/docs/paas/samples/sia-connect/"
23872396
redirect_from: []
@@ -2662,6 +2671,9 @@
26622671
"/docs/paas/user-guide/reporting/attaching-report-to-notification/":
26632672
url: "/docs/paas/user-guide/reporting/attaching-report-to-notification/"
26642673
redirect_from: []
2674+
"/docs/paas/user-guide/reporting/embedding-charts/":
2675+
url: "/docs/paas/user-guide/reporting/embedding-charts/"
2676+
redirect_from: []
26652677
"/docs/paas/user-guide/reporting/embedding-dashboards-widgets/":
26662678
url: "/docs/paas/user-guide/reporting/embedding-dashboards-widgets/"
26672679
redirect_from: []
@@ -3537,6 +3549,9 @@
35373549
"/docs/pe/samples/analytics/mcp-server-ai-insights/":
35383550
url: "/docs/pe/samples/analytics/mcp-server-ai-insights/"
35393551
redirect_from: []
3552+
"/docs/pe/samples/analytics/ollama/":
3553+
url: "/docs/pe/samples/analytics/ollama/"
3554+
redirect_from: []
35403555
"/docs/pe/search/":
35413556
url: "/docs/pe/search/"
35423557
redirect_from: []
@@ -3738,6 +3753,10 @@
37383753
url: "/docs/pe/user-guide/reporting/attaching-report-to-notification/"
37393754
redirect_from:
37403755
- "/docs/user-guide/reporting/attaching-report-to-notification/"
3756+
"/docs/pe/user-guide/reporting/embedding-charts/":
3757+
url: "/docs/pe/user-guide/reporting/embedding-charts/"
3758+
redirect_from:
3759+
- "/docs/user-guide/reporting/embedding-charts/"
37413760
"/docs/pe/user-guide/reporting/embedding-dashboards-widgets/":
37423761
url: "/docs/pe/user-guide/reporting/embedding-dashboards-widgets/"
37433762
redirect_from:
@@ -4067,6 +4086,9 @@
40674086
"/docs/samples/analytics/mcp-server-ai-insights/":
40684087
url: "/docs/samples/analytics/mcp-server-ai-insights/"
40694088
redirect_from: []
4089+
"/docs/samples/analytics/ollama/":
4090+
url: "/docs/samples/analytics/ollama/"
4091+
redirect_from: []
40704092
"/docs/samples/cricket-wifi/cricket-wifi/":
40714093
url: "/docs/samples/cricket-wifi/cricket-wifi/"
40724094
redirect_from: []
@@ -5012,6 +5034,9 @@
50125034
"/docs/user-guide/rule-engine-2-0/nodes/action/device-state/":
50135035
url: "/docs/user-guide/rule-engine-2-0/nodes/action/device-state/"
50145036
redirect_from: []
5037+
"/docs/user-guide/rule-engine-2-0/nodes/action/generate-dashboard-report/":
5038+
url: "/docs/user-guide/rule-engine-2-0/nodes/action/generate-dashboard-report/"
5039+
redirect_from: []
50155040
"/docs/user-guide/rule-engine-2-0/nodes/action/generate-report/":
50165041
url: "/docs/user-guide/rule-engine-2-0/nodes/action/generate-report/"
50175042
redirect_from: []

_data/pages_redirect_info.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ docs/pe/user-guide/contribution/widgets-development-before-3.0/:
254254
"/docs/user-guide/reporting/attaching-report-to-notification/":
255255
url: "/docs/pe/user-guide/reporting/attaching-report-to-notification/"
256256
redirect_from: "/docs/user-guide/reporting/attaching-report-to-notification/"
257+
"/docs/user-guide/reporting/embedding-charts/":
258+
url: "/docs/pe/user-guide/reporting/embedding-charts/"
259+
redirect_from: "/docs/user-guide/reporting/embedding-charts/"
257260
"/docs/user-guide/reporting/embedding-dashboards-widgets/":
258261
url: "/docs/pe/user-guide/reporting/embedding-dashboards-widgets/"
259262
redirect_from: "/docs/user-guide/reporting/embedding-dashboards-widgets/"

_data/pe/docs-home.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ toc:
242242
- title: AI models
243243
path: /docs/pe/samples/analytics/ai-models/
244244
new: true
245+
- title: Local AI with Ollama
246+
path: /docs/pe/samples/analytics/ollama/
247+
new: true
245248
- title: Trendz Analytics
246249
path: /docs/trendz/
247250
- title: Kafka Streams
@@ -257,6 +260,8 @@ toc:
257260
path: /docs/pe/user-guide/reporting/scheduling-reports/
258261
- title: Embedding subreports
259262
path: /docs/pe/user-guide/reporting/subreport/
263+
- title: Embedding charts
264+
path: /docs/pe/user-guide/reporting/embedding-charts/
260265
- title: Embedding dashboards
261266
path: /docs/pe/user-guide/reporting/embedding-dashboards-widgets/
262267
- title: Attaching report to notification

_includes/code.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
</td></tr>
99
</table>
1010
{% else %}
11-
{% capture samplecode %}{% include_relative {{include.file}} %}{% endcapture %}
11+
{% assign first_char = include.file | slice: 0 %}
12+
{% if first_char == '/' %}
13+
{% assign absolute_path = include.file | remove_first: '/' %}
14+
{% capture samplecode %}{% include {{ absolute_path }} %}{% endcapture %}
15+
{% else %}
16+
{% capture samplecode %}{% include_relative {{ include.file }} %}{% endcapture %}
17+
{% endif %}
1218
{% capture mysample %}
1319
```{{include.language}}
1420
{{ samplecode | raw | strip }}

_includes/docs/samples/analytics/ai-models.md

100644100755
Lines changed: 98 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,27 @@ ThingsBoard allows you to configure and connect to different AI providers, manag
1919

2020
To add an AI model in ThingsBoard, follow these steps:
2121

22-
- Open the "<b>Settings</b>" page in your ThingsBoard instance.
23-
- Go to the "<b>AI models</b>" tab.
22+
- Go to the "<b>AI models</b>" tab of the "<b>Settings</b>" page.
2423
- Click the "<b>Add model</b>" button (located in the top-right corner).
2524
- This will open a form where you can configure AI model:
2625
- <b>Name</b> - provide a meaningful name for the AI model.
27-
- [Provider](#provider-configuration) select the AI provider and specify its authentication credentials.
28-
- [Model ID](#model-configuration) – choose which model to use (or deployment name, in the case of Azure OpenAI).
26+
- [Provider](#provider-configuration) select the **AI provider**, specify the **base URL** (required only for [OpenAI](#openai) and [Ollama](#ollama)), and enter the provider&#39;s **authentication credentials**.
27+
- [Model ID](#model-configuration) – choose which model to use (or deployment name, in the case of **Azure OpenAI**).
2928
- [Advanced settings](#advanced-model-settings) – configure optional parameters (such as temperature, top P, max tokens) if supported by the provider.
3029
- Click "<b>Save</b>" to complete adding the new AI model.
3130

32-
Once saved, the model becomes available for use in the [AI request node](/docs/{{docsPrefix}}user-guide/rule-engine-2-0/external-nodes/#ai-request-node){:target="_blank"} of the Rule Engine.
31+
Once saved, the model becomes available for use in the [AI request node](/docs/{{docsPrefix}}user-guide/rule-engine-2-0/nodes/external/ai-request/){:target="_blank"} of the [Rule Engine](/docs/{{docsPrefix}}user-guide/rule-engine-2-0/overview/){:target="_blank"}.
3332

3433
{% include images-gallery.html imageCollection="adding-ai-model" %}
3534

3635
## Provider configuration
3736

38-
In the "<b>Provider</b>" section you need to select the <b>AI provider</b> you want to use, as well as the authentication method for that provider (e.g., API key, key file, etc.).
37+
In the <b>Provider</b> section, select the <b>AI provider</b>, specify the <b>base URL</b> (required only for [OpenAI](#openai) and [Ollama](#ollama)), and enter the <b>authentication credentials</b> (e.g., API key, key file, etc.).
3938

4039
{% if docsPrefix == "pe/" or docsPrefix == "paas/" or docsPrefix == "paas/eu/" %}
41-
> We recommend using [Secrets storage](/docs/{{docsPrefix}}user-guide/secrets-storage/){:target="_blank"} to securely store your credentials.
40+
{% capture difference %}
41+
We recommend using [Secrets storage](/docs/{{docsPrefix}}user-guide/secrets-storage/){:target="_blank"} to securely store your credentials.{% endcapture %}
42+
{% include templates/info-banner.md content=difference %}
4243
{% endif %}
4344

4445
<br><b><font size="4">Supported AI providers</font></b>
@@ -49,9 +50,44 @@ ThingsBoard currently supports integration with the following AI providers:
4950

5051
#### OpenAI
5152

52-
- Authentication: <b>API key</b>.
53+
- <b>Base URL</b>: Specify the address for accessing the OpenAI API.
54+
- <b>Authentication</b>: API key.
5355
- You can obtain your API key from the [OpenAI dashboard](https://platform.openai.com/api-keys){:target="_blank"}.
5456

57+
##### Using OpenAI-compatible models
58+
59+
{% assign sinceVersion = "4.2.1" %}
60+
{% include templates/since.md %}
61+
62+
When working with models compatible with the OpenAI API, an important parameter is the **base URL**, which defines the address used to send requests to the API.
63+
64+
<b><font size="3">Official Base URL</font></b>
65+
66+
The standard OpenAI API endpoint, preconfigured in ThingsBoard. Use this to access models hosted by OpenAI.
67+
68+
<b><font size="3">Custom Base URL</font></b>
69+
70+
An alternative endpoint for providers that implement the OpenAI-compatible API protocol.
71+
Use this when there is no dedicated integration for your provider and they offer an OpenAI-compatible API (e.g., DeepSeek, Qwen, self-hosted Ollama).
72+
73+
{% capture difference %}
74+
When using a custom base URL, the **API key becomes optional**. This enables working with models that do not require authentication, such as locally hosted models. However, most cloud model providers will still require a valid API key.
75+
{% endcapture %}
76+
{% include templates/info-banner.md content=difference %}
77+
78+
<b>Example base URLs:</b>
79+
80+
| Provider | Base URL |
81+
|--------------------------|----------------------------------------------------------|
82+
| DeepSeek | `https://api.deepseek.com` |
83+
| Alibaba Qwen (Singapore) | `https://dashscope-intl.aliyuncs.com/compatible-mode/v1` |
84+
| Ollama (local) | `http://localhost:11434/v1` |
85+
86+
{% capture ollama_note %}
87+
[Ollama](#ollama) is also available as a separate integration with additional configuration options.
88+
{% endcapture %}
89+
{% include templates/info-banner.md content=ollama_note %}
90+
5591
<hr>
5692

5793
#### Azure OpenAI
@@ -102,7 +138,10 @@ ThingsBoard currently supports integration with the following AI providers:
102138
- Secret access key.
103139
- AWS region (where inference will run).
104140

105-
> <b>Note</b>: Authentication with Bedrock API keys is not supported.
141+
{% capture bedrock_note %}
142+
Authentication with Bedrock API keys is not supported.
143+
{% endcapture %}
144+
{% include templates/info-banner.md content=bedrock_note %}
106145

107146
<hr>
108147

@@ -114,6 +153,41 @@ ThingsBoard currently supports integration with the following AI providers:
114153

115154
<hr>
116155

156+
#### Ollama
157+
158+
{% assign sinceVersion = "4.2.1" %}
159+
{% include templates/since.md %}
160+
161+
[Ollama](https://ollama.com/){:target="_blank"} allows you to easily run open large language models, such as **Llama 3** and **Mistral**, directly on your own machine. This enables local experimentation, offline usage, and greater control over your data.
162+
163+
To connect to your Ollama server, you need its **base URL** (e.g., *http://localhost:11434*) and an **authentication method**. The following options are supported:
164+
165+
![image](https://img.thingsboard.io/samples/analytics/ai-models/ollama-authentication-method.png)
166+
167+
- <b>None</b>
168+
- Default method for a standard Ollama installation.
169+
- No authentication is required, and no credentials are sent with requests.
170+
171+
- <b>Basic</b>
172+
- Use when Ollama is secured behind a reverse proxy requiring **HTTP Basic Authentication**.
173+
- The provided username and password are combined into a `username:password` string, Base64-encoded, and sent in the header:
174+
```text
175+
Authorization: Basic <encoded_credentials>
176+
```
177+
- <b>Token</b>
178+
- Use when Ollama is secured behind a reverse proxy requiring **Bearer Token Authentication**.
179+
- The provided token is sent in the header:
180+
```text
181+
Authorization: Bearer <token>
182+
```
183+
184+
{% capture difference %}
185+
**Security Recommendation:** When using **Basic** or **Token** authentication, always connect via an `HTTPS` URL. Using plain `HTTP` will transmit credentials in clear text, which is insecure.
186+
{% endcapture %}
187+
{% include templates/info-banner.md content=difference %}
188+
189+
<hr>
190+
117191
## Model configuration
118192

119193
After you&#39;ve selected and authenticated your AI provider, you need to specify which particular AI model to use (or deployment name in the case of [Azure OpenAI](#azure-openai)).
@@ -129,13 +203,16 @@ For <b>production usage</b>, we recommend using model snapshots to ensure predic
129203
Some models support advanced configuration parameters (depending on the provider), such as:
130204
- <b>Temperature</b> – Adjusts the level of randomness in the model's output. Higher values increase randomness, while lower values decrease it.
131205
- <b>Top P</b> – Creates a pool of the most probable tokens for the model to choose from. Higher values create a larger and more diverse pool, while lower values create a smaller one.
132-
- <b>Top K</b> - Restricts the model's choices to a fixed set of the "K" most likely.
133-
tokens.
206+
- <b>Top K</b> - Restricts the model's choices to a fixed set of the "K" most likely tokens.
134207
- <b>Presence penalty</b> - Applies a fixed penalty to the likelihood of a token if it has already appeared in the text.
135208
- <b>Frequency penalty</b> - Applies a penalty to a token's likelihood that increases based on its frequency in the text.
136-
- <b>Maximum output tokens</b> – limit response length. Sets the maximum number of tokens that the model can generate in a single response.
209+
- <b>Maximum output tokens</b> – Sets the maximum number of tokens that the model can generate in a single response.
210+
- <b>Context length</b> – Defines the size of the context window in tokens. This value sets the total memory limit for the model, including both the user's input and the generated response.
137211

138-
> If advanced settings cause errors, try removing their values. In this case, defaults will be applied. This often resolves incompatibility issues for certain models.
212+
{% capture advanced_settings_tip %}
213+
If advanced settings cause errors, try removing their values. In this case, defaults will be applied. This often resolves incompatibility issues for certain models.
214+
{% endcapture %}
215+
{% include templates/info-banner.md content=advanced_settings_tip %}
139216

140217
{% include images-gallery.html imageCollection="advanced-model-settings" %}
141218

@@ -148,15 +225,21 @@ If the response is successful, you will see a ✅ <b>green checkmark</b>.
148225

149226
{% include images-gallery.html imageCollection="check-connectivity-1" %}
150227

151-
> <b>Best practice</b>: Always use the connectivity check after configuring a provider to ensure smooth runtime execution.
228+
{% capture best_practice %}
229+
Always use the connectivity check after configuring a provider to ensure smooth runtime execution.
230+
{% endcapture %}
231+
{% include templates/info-banner.md content=best_practice %}
152232

153233
If an error occurs (e.g., invalid API key, non-existing model), an error message with details will be displayed ❌.
154234

155235
{% include images-gallery.html imageCollection="check-connectivity-2" %}
156236

157237
This feature ensures your configuration is valid and prevents runtime errors when models are used in production.
158238

159-
> <b>Note</b>: Even though the test request is trivial (e.g., “What is the capital of X country?”), providers usually charge for it. However, the cost is minimal.
239+
{% capture test_cost_note %}
240+
Even though the test request is trivial (e.g., "What is the capital of X country?"), providers usually charge for it. However, the cost is minimal.
241+
{% endcapture %}
242+
{% include templates/info-banner.md content=test_cost_note %}
160243

161244
## Next steps
162245

0 commit comments

Comments
 (0)