Project

General

Profile

DTXr doc » History » Version 99

David Fredriksson, 04/02/2026 03:00 PM

1 20 Torbjorn Carlqvist Admin
{{>toc}}
2
3
h1. DTXr documentation
4 1 Torbjorn Carlqvist Admin
5 5 Torbjorn Carlqvist Admin
h3. Installation
6 2 Torbjorn Carlqvist Admin
7 6 Torbjorn Carlqvist Admin
* System Requirements
8 74 David Fredriksson
DTXr can run on any machine that can run +Java 17+ and has sufficient with RAM and disk capacity.
9 1 Torbjorn Carlqvist Admin
10 21 Torbjorn Carlqvist Admin
|Requirement|System RAM|System DISK|Example|
11
|Minimal|512Mbyte|512Mbyte|Raspberry 1, Raspberry Zero|
12 31 Torbjorn Carlqvist Admin
|Better|512Mbyte|512Mbyte|Rasberry Zero 2|
13
|Avarage|1GByte|1Gbyte|Raspberry 2-4|
14 21 Torbjorn Carlqvist Admin
|Top|2GByte|8Gbyte|Raspberry 4, Raspberry CM4, Server, PC|
15
16 6 Torbjorn Carlqvist Admin
* Network Requirements
17
DTXr can run stand alone without any active network connection. In that case the management pages is accessible via localhost interface. But for DTXr to be a fully functional BACnet/IP device it must be connected to an IP network that offers IP address via DHCP and where broadcast traffic is allowed.
18 10 Torbjorn Carlqvist Admin
19 1 Torbjorn Carlqvist Admin
* Download DTXr software packages
20 10 Torbjorn Carlqvist Admin
Currently only customers to DAVITOR can download DTXr. Contact info@davitor.com for purchase information.
21
22 15 Torbjorn Carlqvist Admin
* Install on Linux
23 60 Torbjorn Carlqvist Admin
** There is special install scripts, please follow these steps:
24 22 Torbjorn Carlqvist Admin
### Download latest DTXr _base_ image and copy to a SD-card that has 16Gbyte capacity or more
25 64 David Fredriksson
26
Or install a new image and install java
27
<pre>sudo apt install default-jdk </pre>
28
29 22 Torbjorn Carlqvist Admin
### Insert the SD card, attach keyboard and screen via cable and start the device
30 41 David Fredriksson
### When you get prompt login as **admin/davitor**
31 72 Torbjorn Carlqvist Admin
### Download the installation script from davitor repository 
32
*(note dtx.sh has an update since Jan 17th, 2024 see new parameter 'installfolder' below)*
33
*(note dtx.sh has an update since Nov 6th, 2025 see new parameter 'type' below)*
34 59 Torbjorn Carlqvist Admin
<pre>wget --user=**** --password=**** https://artifacts.davitor.com/repository/dtx-raw/scripts/dtx.sh</pre>
35 56 Torbjorn Carlqvist Admin
There is also a utillity script that can set the host name and MAC adress. Note, optional and only applicable on LION product appliances.
36 59 Torbjorn Carlqvist Admin
<pre>wget --user=**** --password=****  https://artifacts.davitor.com/repository/dtx-raw/scripts/system.sh</pre>
37 56 Torbjorn Carlqvist Admin
Make the scripts exec
38
<pre>sudo chmod 770 *.sh</pre>
39 1 Torbjorn Carlqvist Admin
### Run installation as below where you first alter:
40 72 Torbjorn Carlqvist Admin
*** Required type (-t type) where type can be "scriptengine" for small platforms like RpiZ with 32-bit OS or "polyglot" for any 64-bits OS like servers or PC.
41 1 Torbjorn Carlqvist Admin
*** Required version (-v x.y.z)
42 69 Torbjorn Carlqvist Admin
*** The the install folder (-f myfolder) Note: Still relative to /usr/local so (-f myfolder) results in /usr/local/myfolder/dtx...
43 57 Torbjorn Carlqvist Admin
*** Partner user name (-u ****)
44
*** Partner password (-p ****)
45
*** Application password for the HTTP interface login on port 9090 (-app-password xxxxxxx)
46 58 Torbjorn Carlqvist Admin
*** BACnet Decvice Id (bac-device-id=nnnnn)
47 57 Torbjorn Carlqvist Admin
*** BACnet password which you will use to control the BACnet device DCC (bacnet-password=xxxxxx)
48 67 Torbjorn Carlqvist Admin
*** BACnet Device Name (bac-device-name=yyyy)
49 1 Torbjorn Carlqvist Admin
*** DAVITOR Reference Key (drk=xxxx) is used to mange and maintain this device from the DAVITOR PLM (Product Lifecycle Management) service. (drk=xxxx) The sequence of drk:s is in PLM instance database.
50
*** Hardware Platform Type (platform=xx) is used to control and switch on/off special features that is hardware dependent.
51
For LION products use:
52 73 David Fredriksson
<pre>sudo ./dtx.sh -t scriptengine|polyglot -v 3.2.2 -f myfolder -u **** -p **** -s "bac-device-id=nnnnn bac-device-name=yyyy app-password=xxxxxx bac-password=xxxxxx lion-enabled=true drk=xxxx platform=XX"</pre>
53 71 David Fredriksson
For other installations like PC, Servers etc. use:
54 72 Torbjorn Carlqvist Admin
<pre>sudo ./dtx.sh -t scriptengine|polyglot -v 3.1.23 -f myfolder -u **** -p **** -s "bac-device-id=nnnnn bac-device-name=yyyy app-password=xxxxxx bac-password=xxxxxx drk=xxxx platform=XX"</pre>
55 1 Torbjorn Carlqvist Admin
### Utillity script to set MAC and host name
56 54 Torbjorn Carlqvist Admin
<pre>sudo ./system.sh -mac 70:B3:D5:16:E8:99 -hn DTX-L1-8R8DI</pre>
57 62 Torbjorn Carlqvist Admin
* Upgrade on linux
58 69 Torbjorn Carlqvist Admin
If you already have DTX installed and should upgrade to a new version *(Don't forget to set correct installfolder with -f)*
59 72 Torbjorn Carlqvist Admin
<pre>sudo ./dtx.sh -t scriptengine|polyglot -v 3.1.23 -f myfolder -u **** -p ****</pre>
60 69 Torbjorn Carlqvist Admin
* Manage the DTX service *(Note, since 17th Jan, 2024 of dtx.sh the names of the services are appended with the instsall folder in order to install multiple instances of DTX in same machine.)*
61 70 Torbjorn Carlqvist Admin
Stop<pre>sudo systemctl stop dtx_{myfolder}</pre> 
62
Start<pre>sudo systemctl start dtx_{myfolder}</pre>
63
Check status<pre>systemctl status dtx_{myfolder}</pre>
64
Disable service, wont start at reboot<pre>sudo systemctl disable dtx_{myfolder}</pre>
65
Enable service, will start automatically at reboot<pre>sudo systemctl enable dtx_{myfolder}</pre>
66 15 Torbjorn Carlqvist Admin
67 55 Torbjorn Carlqvist Admin
* For other Linux distributions follow this steps
68 15 Torbjorn Carlqvist Admin
### _TBD..._
69
70 1 Torbjorn Carlqvist Admin
* Install on Windows
71
** Follow these steps:
72 32 David Fredriksson
### _TBD..._
73 38 Torbjorn Carlqvist Admin
74 32 David Fredriksson
h3. LION Fieldbus
75 38 Torbjorn Carlqvist Admin
76 15 Torbjorn Carlqvist Admin
* See LION [[LION:Wiki]] for howto in installataion, channel assigmnets and testing.
77 1 Torbjorn Carlqvist Admin
78
79
80 78 David Fredriksson
---
81 97 David Fredriksson
82 88 David Fredriksson
h1. User's Guide
83 1 Torbjorn Carlqvist Admin
84 88 David Fredriksson
h2. DTXr Web Interface – End User Documentation
85
86 84 David Fredriksson
h2. 1. Overview
87 86 David Fredriksson
88
h4. The DTXr web interface allows users to:
89 79 David Fredriksson
* View BACnet objects and their properties
90
* Modify writable properties (e.g., Present Value)
91
* Edit weekly schedules
92
* Switch between local and remote devices
93
* Monitor alarms, events, and notifications
94
* Use real-time updates through WebSocket (local device only)
95
96 88 David Fredriksson
97
*Important:*  
98
When selecting a *remote BACnet device*, the object list and notifications *do not update automatically*.  
99
You must press *@Objects → Refresh@* to reload the data.
100
101
For the *local device that hosts the web page*, all updates (property changes, events, alarms) are received *in real time*.
102
103 79 David Fredriksson
---
104
105
h3. 2. Navigation Bar
106
107
h4. 2.1 Objects Menu
108
* *Refresh* reloads all object data and events.
109
110
_Note: Refresh is required when a remote device is selected._
111
112
h4. 2.2 Devices Menu
113
* Displays local device and all discovered BACnet devices.
114
* Devices are grouped by network.
115
* Selecting a device loads its object list.
116
117
h4. 2.3 Priority Menu
118
Controls the *BACnet write priority* used when writing Present Value.
119
120
Examples:
121
* Priority 1 – Manual Life Safety
122
* Priority 8 – Default
123
* Priority 16 – Lowest
124
125
h4. 2.4 Notifications Menu
126
Shows:
127
* Alarms
128
* Events
129
* Return-to-normal
130
131
The menu uses badge counters:
132
* Yellow = events  
133
* Red = alarms  
134
* Green = normal transitions  
135
136
---
137
138 84 David Fredriksson
h3. 3. Objects View
139 79 David Fredriksson
140
The main view lists all BACnet objects.
141
142
Features:
143
* Collapsible categories (accordions)
144
* Lazy loading of properties when expanded
145
* Editable Present Value fields where supported
146
* Real-time updates on the *local* device
147
* Manual refresh required for *remote* devices
148
149
h4. 3.1 Expanding an Object
150
Expanding an object loads:
151
* Properties
152
* Values
153
* Writable fields
154
* Schedule editor button (if applicable)
155
156
h4. 3.2 Writing Property Values
157
Steps:
158
# Edit a value in the input field.
159
# Press the Write/Save button.
160
# DTXr sends a BACnet WriteProperty with the selected priority.
161
# A popup shows success or error.
162
163
---
164
165
h3. 4. Device Discovery
166
167
h4. 4.1 Discovering Devices
168
Opening the *Devices* dropdown sends a Who-Is request and populates the list.
169
170
h4. 4.2 Selecting a Device
171
When switching devices:
172
* Properties reload
173
* Notification list reloads
174
* The selected device name appears in the navbar
175
176
h4. 4.3 Refreshing Content
177
*Mandatory* when using remote devices.
178
179
Use:
180
@Objects → Refresh@
181
182
This reloads:
183
* Object list
184
* Property values
185
* Notifications
186
187
---
188
189
h3. 5. Notifications and Events
190
191
Notifications include:
192
* Alarm
193
* Event
194
* Normal
195
196
Real-time updates:
197
* Enabled for local device
198
* Disabled for remote devices — manual refresh required
199
200
h4. 5.1 Acknowledgment
201
If a notification supports acknowledgment:
202
* Press _Acknowledge_
203
* DTXr sends BACnet AcknowledgeAlarm
204
* Notification updates when completed
205
206
---
207
208
h3. 6. Weekly Schedule Editor
209
210
h4. 6.1 Opening the Editor
211
Click the schedule property to open the weekly calendar modal.
212
213
h4. 6.2 Creating Events
214
Select a time in the calendar to create a new event.
215
216
h4. 6.3 Editing Events
217
Click an event to modify:
218
* Binary schedule → Active / Inactive
219
* Analog schedule → numeric value
220
221
h4. 6.4 Saving the Schedule
222
Click *@Save changes@* to store the weekly schedule.
223
224
The data is:
225
* Compiled into BACnet dailySchedule structures
226
* Sorted chronologically
227
* Sent to the device as JSON
228
229
---
230
231
h3. 7. Popups and Feedback
232
233
Popups indicate:
234
* Success
235
* Errors
236
* Info
237
* Warnings
238
239
---
240
241
h3. 8. Troubleshooting
242
243
h4. 8.1 Objects Not Updating
244
* Remote device selected → press Refresh  
245
* Network or device may be unreachable
246
247
h4. 8.2 Write Errors
248
Possible reasons:
249
* Incorrect priority  
250
* Object out of service  
251
* Invalid value  
252 1 Torbjorn Carlqvist Admin
253 79 David Fredriksson
h4. 8.3 Schedule Issues
254 1 Torbjorn Carlqvist Admin
* No events created  
255
* Missing object ID  
256
* Remote device requires manual refresh  
257
258
259
---
260 81 David Fredriksson
261 83 David Fredriksson
h2. Setup
262 79 David Fredriksson
263 80 David Fredriksson
DTXr is configured through the *Menu → Setup* page.  
264
All configuration settings are grouped into logical sections. Each section below provides a functional overview of what the user can configure.  
265
Values are stored in *settings.json* and applied system-wide after pressing *Save*.
266
267
*Important:*  
268
When a *remote device* is selected from the HUB interface, *a manual page refresh is required* to update configuration data.  
269
Local device information updates in real time.
270 78 David Fredriksson
h4. System
271 1 Torbjorn Carlqvist Admin
272 78 David Fredriksson
Contains all fundamental system-level access and identity configuration.
273 1 Torbjorn Carlqvist Admin
274 78 David Fredriksson
* Administrator Account  
275
  - Configure the password of the fixed “admin” user.  
276
* Operator Account  
277
  - Optional user with limited access for HMIs or machine operation.  
278
  - Username, password and start page can be assigned.  
279
* Developer Account  
280
  - Optional higher-level user with configurable module permissions  
281
    (code, objects, API, blocks, diagram, setup).  
282
* Logging  
283
  - Set the system-wide log level (Debug, Info, Warning, Error).  
284
* Hardware Platform  
285
  - Select hardware profile (PC/server, Mira/Mesh, LION, etc.).  
286
  - This controls the enable/disable state of platform-specific modules.
287
288 1 Torbjorn Carlqvist Admin
---
289 77 David Fredriksson
290 78 David Fredriksson
h4. BACnet
291 1 Torbjorn Carlqvist Admin
292 78 David Fredriksson
Defines all BACnet/IP protocol parameters for the device.
293 1 Torbjorn Carlqvist Admin
294 78 David Fredriksson
* Device Identity  
295
  - Device ID, Device Name.  
296
* Security  
297
  - BACnet password (used for Device Communication Control).  
298
* Protocol Settings  
299
  - Segmentation, Max APDU, Vendor ID and other low-level options.  
300
* Network Mode  
301
  - Basic IP communication behaviour (broadcast, BBMD usage when applicable).
302 1 Torbjorn Carlqvist Admin
303 78 David Fredriksson
This section is essential when integrating DTXr into a BACnet building automation network.
304 1 Torbjorn Carlqvist Admin
305
---
306 77 David Fredriksson
307 78 David Fredriksson
h4. Wireless Mesh
308 1 Torbjorn Carlqvist Admin
309 78 David Fredriksson
Provides access to the mesh radio configuration on supported hardware.
310 1 Torbjorn Carlqvist Admin
311 78 David Fredriksson
* Enable/Disable Mesh  
312
* Mesh Credentials  
313
  - Security keys, network key and authentication key.  
314
* Node Role  
315
  - Coordinator / Router / End Device.  
316
* Provisioning QR Code  
317
  - Device can generate a QR code containing mesh network credentials.
318 77 David Fredriksson
319 78 David Fredriksson
Note: Mesh options are disabled on platform types that do not support radio.
320 77 David Fredriksson
321
---
322
323 1 Torbjorn Carlqvist Admin
h4. Bluetooth
324 76 David Fredriksson
325 1 Torbjorn Carlqvist Admin
Configuration for onboard Bluetooth LE services (if supported by the platform).
326 76 David Fredriksson
327
* Bluetooth Console  
328 1 Torbjorn Carlqvist Admin
  - Enables BLE-based console output.  
329 76 David Fredriksson
* Beacon Mode  
330 1 Torbjorn Carlqvist Admin
  - Enables BLE advertisement and optional custom beacon name.  
331 76 David Fredriksson
* Address Visibility and Power Settings  
332
  - Controls how the device broadcasts itself to the environment.
333
334
These options are automatically enabled or disabled depending on the selected platform type.
335 1 Torbjorn Carlqvist Admin
336 76 David Fredriksson
---
337
338 1 Torbjorn Carlqvist Admin
h4. LION Interface
339 76 David Fredriksson
340
Shown only on LION-enabled platforms.
341
342
* Enable/Disable LION module support.  
343 1 Torbjorn Carlqvist Admin
* Hardware Extensions  
344 76 David Fredriksson
  - Configures behaviour of LION-specific IO hardware.  
345
* Channel Behavior  
346
  - Digital/analog features depending on LION product family.
347
348
---
349 75 David Fredriksson
350 76 David Fredriksson
h4. Davitor Advantage
351
352
Configuration for optional DAVITOR cloud lifecycle management.
353
354 75 David Fredriksson
* DRK (Davitor Reference Key)  
355 76 David Fredriksson
  - Used for remote maintenance and PLM link.  
356 75 David Fredriksson
* PLM Connectivity  
357 76 David Fredriksson
  - Service URL and communication settings when using cloud management.
358 75 David Fredriksson
359 76 David Fredriksson
---
360 75 David Fredriksson
361
h4. External Database Access
362 76 David Fredriksson
363
Lets the DTXr device communicate with an external SQL/NoSQL database.
364
365
* Connection  
366
  - Host, port and protocol information.  
367 75 David Fredriksson
* Credentials  
368 76 David Fredriksson
  - Username/password for authenticated connections.  
369
* Sync/Logging Options  
370
  - Defines how data is written externally (trend logs, events, custom data).
371
372
---
373
374 75 David Fredriksson
h4. File Integration
375 76 David Fredriksson
376
Tools for importing/exporting system content.
377
378
* Backup / Restore  
379
  - Download the current configuration or upload a saved configuration.  
380
* Project File Upload  
381 1 Torbjorn Carlqvist Admin
  - Add or replace project assets (HMIs, scripts, diagrams).  
382 76 David Fredriksson
* Logs  
383 42 David Fredriksson
  - Download generated logs for troubleshooting.
384 76 David Fredriksson
385 13 Torbjorn Carlqvist Admin
---
386 76 David Fredriksson
387
h4. HTTP Server
388 11 Torbjorn Carlqvist Admin
389 76 David Fredriksson
Controls how the embedded DTXr HTTP(S) service behaves.
390
391
* Port Configuration  
392
  - Default HTTP port is 9090.  
393
* HTTPS / TLS  
394 14 Torbjorn Carlqvist Admin
  - Optional encrypted access.  
395 76 David Fredriksson
* Session Timeout  
396
  - Auto-logout delay for inactive users.  
397 14 Torbjorn Carlqvist Admin
* Allowed Hosts  
398 11 Torbjorn Carlqvist Admin
  - Restrict network clients that can access the interface.
399 76 David Fredriksson
400 14 Torbjorn Carlqvist Admin
---
401 76 David Fredriksson
402
h4. Email
403
404
Allows the device to send or receive email for automation events.
405 11 Torbjorn Carlqvist Admin
406 76 David Fredriksson
* SMTP Server  
407 11 Torbjorn Carlqvist Admin
  - Address, port, TLS/STARTTLS.  
408 76 David Fredriksson
* Authentication  
409 14 Torbjorn Carlqvist Admin
  - Optional username/password.  
410 76 David Fredriksson
* Attachments Folder  
411
  - Path where incoming email attachments are stored.
412
413
---
414 11 Torbjorn Carlqvist Admin
415 76 David Fredriksson
h4. Location Services
416
417
The device can determine its location automatically.
418 1 Torbjorn Carlqvist Admin
419 76 David Fredriksson
* Automatic Geolocation  
420
  - Queries an external geolocation service to populate latitude/longitude.  
421
* Manual Input  
422
  - User can override location if browser access is restricted.
423
424 19 Torbjorn Carlqvist Admin
---
425 76 David Fredriksson
426 19 Torbjorn Carlqvist Admin
h4. IoT HUB (BETA)
427 76 David Fredriksson
428 1 Torbjorn Carlqvist Admin
Early-stage experimental cloud integration.
429 76 David Fredriksson
430
* Backend URL  
431 1 Torbjorn Carlqvist Admin
  - IoT gateway endpoint.  
432 76 David Fredriksson
* Device Token  
433
  - Authentication token for cloud usage.  
434 1 Torbjorn Carlqvist Admin
* Upload Options  
435 76 David Fredriksson
  - Define what data the device forwards (events, logs, telemetry).
436
437
---
438
439 1 Torbjorn Carlqvist Admin
h4. Save & Refresh
440 76 David Fredriksson
441
* Save  
442 1 Torbjorn Carlqvist Admin
  - Commits all modified settings to settings.json.  
443 76 David Fredriksson
* Refresh  
444
  - Reloads settings from device memory.  
445
  - Required after switching to a remote device.
446
447 1 Torbjorn Carlqvist Admin
448 76 David Fredriksson
---
449 1 Torbjorn Carlqvist Admin
450 83 David Fredriksson
h2. Blocks Editor (Blockly)
451 82 David Fredriksson
452
The *Blocks* page provides a visual programming environment based on Google Blockly.  
453
Users can build automation logic using drag-and-drop blocks instead of traditional code.  
454
All logic created here is converted into JavaScript and executed by the DTXr runtime.
455
456
The Blocks Editor is divided into four main areas:
457
* The *toolbox* (left side) containing categorized blocks  
458
* The *Blockly workspace* (center)  
459
* The *log and activity panels* (bottom)  
460
* Editor actions available in the top navigation bar
461
462
---
463
464 95 David Fredriksson
h4. Navigation Bar Features
465 82 David Fredriksson
466
* Blocks → *Refresh*  
467
  - Re-parses the block code displayed in the workspace.  
468
* Blocks → *Clear logs*  
469
  - Clears the log console in the footer area.  
470
* Test  
471
  - Executes the currently visible block code once, without saving.  
472
* Save  
473
  - Saves the current block workspace into the device configuration.  
474
* Activate  
475
  - Saves and also activates the block program so it runs continuously.  
476
* Notifications  
477
  - Shows system events, alarms, and normal transitions in real time.
478
479
---
480
481 95 David Fredriksson
h4. Blockly Workspace
482 82 David Fredriksson
483
The main canvas where blocks are placed and connected.
484
485
* Drag blocks from the toolbox onto the workspace.  
486
* Connect blocks to form logic chains.  
487
* Right-click a block to duplicate, delete, or collapse it.  
488
* Zoom and pan with the mouse wheel or gestures.
489
490
All changes in the workspace are local until *Save* or *Activate* is pressed.
491
492
---
493
494 95 David Fredriksson
h4. Toolbox Categories
495 82 David Fredriksson
496
The toolbox is organized into logical categories:
497
498
* JSON  
499
  - Blocks for constructing and parsing JSON objects.  
500
* Logic  
501
  - If/else, comparison, boolean operations.  
502
* Loops  
503
  - Repeat operations.  
504
* Math  
505
  - Arithmetic and numeric values.  
506
* Text  
507
  - String operations and concatenation.  
508
* Variables  
509
  - Create and manage global/local variables.  
510
511
*Events (DTX-specific)*  
512
  - Triggers for analog or binary input changes  
513
  - Astro events  
514
  - Timers  
515
  - Incoming text messages  
516
  - Diagram object push events  
517
518
*Set value / Read value (DTX BACnet extensions)*  
519
  - Write analog, binary, lighting outputs  
520
  - Read analog or binary values  
521
  - Compare input states  
522
523
*Timed tasks*  
524
  - Cron-like scheduling  
525
  - Start, cancel, pause, resume timers  
526
527
*HMI*  
528
  - Update graphical objects or maps in diagrams/HMI pages  
529
530
*Code*  
531
  - Insert raw JavaScript statements  
532
  - Create custom return statements  
533
  - Handle function call events  
534
535
*Misc*  
536
  - Print to log  
537
  - Date/time  
538
539
*Notifications*  
540
  - Send email from block logic  
541
542
These categories combine to cover automation, BACnet control, HMI interaction and notifications.
543
544
---
545
546 95 David Fredriksson
h4. Running and Activating Code
547 82 David Fredriksson
548
*Test*  
549
Executes the block logic one time, useful for debugging.
550
551
*Save*  
552
Stores the block script but does not run it automatically.
553
554
*Activate*  
555
Saves and deploys the block logic to the DTXr runtime engine.  
556
Activated logic will:
557
* Run automatically on device startup  
558
* Respond to events immediately  
559
* Allow scheduled logic to trigger without manual execution  
560
561
---
562
563 95 David Fredriksson
h4. Sidebars and Console
564 82 David Fredriksson
565
*Left Sidebar*  
566
May contain the workspace tree or additional contextual tools.
567
568
*Right Sidebar*  
569
Displays block metadata, help text or generated JavaScript depending on configuration.
570
571
*Footer Console*  
572
Two areas are available:
573
* *Log* — printed output from print blocks or runtime  
574
* *Activity* — messages about system behavior, activation, parsing, etc.
575
576
Both areas support resizing using draggable split panes.
577
578
---
579
580 95 David Fredriksson
h4. Working With Devices in Blocks Mode
581 82 David Fredriksson
582
The device selector is present but indicates:
583
584
*“Not applicable in Blocks mode”*
585
586
This is because Blockly logic always runs locally on the device that hosts DTXr.  
587
Remote devices cannot be programmed using the Blocks Editor.
588
589
---
590
591 95 David Fredriksson
h4. Saving Your Work
592 82 David Fredriksson
593
The block workspace is saved in the device’s internal configuration.  
594
A backup is included when exporting system configuration via the File Integration tools.
595
596
*Important:*  
597
If block logic interacts with remote devices (reading/writing values),  
598
use *Refresh* in Objects view to ensure the remote values have been updated recently.
599
600
---
601
602 95 David Fredriksson
h4. Error Handling
603 82 David Fredriksson
604
When errors occur:
605
* The error message appears in the log console  
606
* Pop-up notifications show parsing or execution issues  
607
* Common issues include:
608
  - Missing block connections  
609
  - Undefined variables  
610
  - Writing to unavailable BACnet objects  
611
612
---
613
614 95 David Fredriksson
h4. Best Practices
615 82 David Fredriksson
616
* Keep block structures grouped and well-organized  
617
* Name variables clearly  
618
* Use print statements during development  
619
* Test frequently before activation  
620
* Avoid long chains inside event triggers  
621
* Use timers for repeated actions, not loops
622
623 93 David Fredriksson
---
624 92 David Fredriksson
625 93 David Fredriksson
h2. Code Editor (DTXr)
626 1 Torbjorn Carlqvist Admin
627 93 David Fredriksson
The Code Editor in DTXr provides a complete development environment for automation scripting, BACnet integration, file management, debugging, and interacting with both local and remote devices.  
628
The page is divided into several functional areas, each designed to support efficient automation development and system diagnostics.
629 1 Torbjorn Carlqvist Admin
630 93 David Fredriksson
---
631 92 David Fredriksson
632 93 David Fredriksson
h3. Overview of the Page Layout
633 1 Torbjorn Carlqvist Admin
634 93 David Fredriksson
DTXr Code Editor consists of four main UI regions:
635 1 Torbjorn Carlqvist Admin
636 93 David Fredriksson
* **Left Pane – File Browser**  
637
  Shows project files stored on the device, such as automation.js, HTML pages, CSS, JSON, XML, HMI/Diagram files, logs, and configuration files.
638 92 David Fredriksson
639 93 David Fredriksson
* **Center Pane – Code Editor (ACE Editor)**  
640
  A full-featured code editor with syntax highlighting, autocomplete, evaluation tools, and integration with the BACnet browser.
641 1 Torbjorn Carlqvist Admin
642 93 David Fredriksson
* **Right Pane – BACnet Browser**  
643
  Displays the connected BACnet networks, devices, objects, and properties with support for read, write, and object creation.
644 92 David Fredriksson
645 93 David Fredriksson
* **Bottom Area – Console & Activity Log**  
646
  Used for debugging JavaScript, viewing print output, receiving notifications, and tracking internal DTX events.
647 92 David Fredriksson
648 93 David Fredriksson
A **top navigation menu** provides commands such as Save, Activate, Evaluate, Reinitialize and Clear Log.
649 92 David Fredriksson
650
---
651
652 93 David Fredriksson
h3. Left Pane: File Browser
653 1 Torbjorn Carlqvist Admin
654 93 David Fredriksson
The file browser shows all project and system-related files available in the device’s storage.
655 92 David Fredriksson
656 93 David Fredriksson
Functions include:
657 92 David Fredriksson
658 93 David Fredriksson
* Navigating directories
659
* Opening files in the center code pane
660
* Creating new files (JS, HTML, JSON, XML, CSS, HMI/Diagram)
661
* Uploading multiple files at once
662
* Downloading files
663
* Cloning or renaming files
664
* Deleting files
665
* Choosing "Open With" (Diagram Editor, HMI Editor, Markdown Viewer, Raw Mode)
666
* Previewing HTML files in a new browser tab
667 1 Torbjorn Carlqvist Admin
668 93 David Fredriksson
Restrictions:
669 92 David Fredriksson
670 93 David Fredriksson
* Some protected system directories cannot be renamed or removed
671
* When connected to a *remote device*, execution of JavaScript is not supported (only storing/editing files)
672 1 Torbjorn Carlqvist Admin
673 93 David Fredriksson
DTXr warns before navigating away if unsaved edits exist.
674 92 David Fredriksson
675 1 Torbjorn Carlqvist Admin
---
676
677 93 David Fredriksson
h3. Right Pane: BACnet Browser
678 1 Torbjorn Carlqvist Admin
679 93 David Fredriksson
The BACnet browser displays:
680 1 Torbjorn Carlqvist Admin
681 93 David Fredriksson
* Networks  
682
* Devices  
683
* Object Types  
684
* Individual Objects  
685
* Properties (including writable flags and enumeration values)
686 1 Torbjorn Carlqvist Admin
687 93 David Fredriksson
Each node can be expanded independently and refreshed individually to minimize network traffic.
688 1 Torbjorn Carlqvist Admin
689
---
690
691 99 David Fredriksson
h2. ScheduleObject
692
693
h4. Overview
694
695
A Schedule Object in DTX is used to control the presentValue of another BACnet object (typically a Binary Output or Binary Value) based on time.
696
697
The Schedule does not act on its own — it must be explicitly linked to a target object via:
698
699
listOfObjectPropertyReferences
700
701
Typical use cases:
702
703
Turn a relay ON/OFF at specific times
704
Control system modes (e.g. GAME_MODE)
705
Temporary overrides (events, matches, etc.)
706
707
h4. How it works
708
709
A Schedule object:
710
711
Is configured with a target object
712
Has a default value (scheduleDefault)
713
Evaluates schedules in this order:
714
exceptionSchedule (highest priority)
715
weeklySchedule
716
Writes the resulting value to the target using:
717
priorityForWriting
718
719
h4. Required Conditions for Execution
720
721
For the Schedule to affect a target object, all of the following must be fulfilled:
722
723
Correct binding
724
** listOfObjectPropertyReferences must contain correct objectType, objectInstance and property (presentValue)
725
Valid priority
726
** priorityForWriting must be set (commonly 2)
727
** No higher priority must override the target
728
Schedule must be active
729
** outOfService = false
730
Time must be valid
731
** Current time must be within effectivePeriod
732
Schedule must contain valid data
733
** exceptionSchedule or weeklySchedule must contain valid entries
734
Correct data format
735
** Properties must be written as JSON strings
736
737
h4. Key Properties
738
739
|. Property |. Description |
740
| presentValue | Current evaluated value |
741
| scheduleDefault | Value when no schedule is active |
742
| priorityForWriting | Write priority |
743
| listOfObjectPropertyReferences | Target object binding |
744
| exceptionSchedule | Date-specific overrides |
745
| weeklySchedule | Recurring weekly schedule |
746
| effectivePeriod | Active date range |
747
748
h2. Weekly Schedule
749
750
h4. Overview
751
752
The Weekly Schedule defines recurring behavior based on day-of-week.
753
754
Monday → Sunday
755
Each day can contain multiple time entries
756
757
h4. Structure
758
759
Each day contains a list of time-based changes:
760
761
<pre> Monday: 08:00 -> active 17:00 -> inactive </pre>
762
763
h4. Behavior
764
765
Evaluated every week
766
Lower priority than exceptionSchedule
767
Used for normal operating patterns
768
769
h4. Example
770
771
<pre> Monday: 08:00 -> active 17:00 -> inactive </pre>
772
773
Timeline:
774
775
<pre> inactive --[08:00]--> active --[17:00]--> inactive </pre>
776
777
h4. When to use Weekly Schedule
778
779
Use when:
780
781
Behavior repeats every week
782
Standard operating hours
783
784
h2. Exception Schedule
785
786
h4. Overview
787
788
The Exception Schedule defines date-specific overrides.
789
790
This is the primary mechanism used for dynamic control in DTX.
791
792
h4. Event Concept
793
794
An event represents:
795
796
One specific date
797
A list of time-based changes (timeValues)
798
799
Example:
800
801
<pre> Date: 2026-04-02 timeValues: 14:12 -> active 14:13 -> inactive 14:14 -> active 14:15 -> inactive </pre>
802
803
h4. Important DTX Limitation
804
805
Even though BACnet allows multiple events per date:
806
807
On DTX nodes, only the first event is reliably executed.
808
809
h4. Recommended Usage
810
811
Always use:
812
813
One event per date
814
Multiple timeValues inside that event
815
816
h4. Correct Pattern
817
818
<pre> timeValues: 14:00 -> active 14:05 -> inactive 18:00 -> active 18:10 -> inactive </pre>
819
820
h4. Incorrect Pattern
821
822
<pre> Event 1: 14:00–14:05 Event 2: 18:00–18:10 </pre>
823
824
This may result in only the first event being executed.
825
826
h4. Example Payload
827
828
<pre> [ { "calendarEntry": { "date": { "year": 2026, "month": 4, "day": 2 } }, "timeValues": [ { "hour": 14, "minute": 12, "second": 0, "value": "active" }, { "hour": 14, "minute": 13, "second": 0, "value": "inactive" }, { "hour": 14, "minute": 14, "second": 0, "value": "active" }, { "hour": 14, "minute": 15, "second": 0, "value": "inactive" } ], "eventPriority": 1 } ] </pre>
829
830
h4. Timeline Visualization
831
832
Recommended for debugging:
833
834
<pre> inactive --[14:12]--> active --[14:13]--> inactive --[14:14]--> active --[14:15]--> inactive </pre>
835
836
h4. Execution Behavior
837
838
At runtime:
839
840
Start from scheduleDefault
841
Apply timeValues in chronological order
842
Write result to target object
843
844
h4. Common Issues
845
846
If the schedule does not trigger:
847
848
Incorrect binding
849
Wrong priority
850
Higher priority overriding target
851
Incorrect JSON formatting
852
Multiple events on same date
853
Time mismatch (timezone or seconds)
854
855
h4. Best Practices
856
857
Always use one event per date
858
Always sort timeValues chronologically
859
Always verify using timeline output
860
Monitor:
861
** schedule.presentValue
862
** target presentValue
863
** priorityArray
864
865
h4. Debugging Tip
866
867
If timeline is correct but behavior is wrong:
868
869
The issue is usually priority or binding, not the schedule itself.
870
871 93 David Fredriksson
h4. Reading & Writing Properties
872 92 David Fredriksson
873 93 David Fredriksson
From any BACnet property node, you may:
874 1 Torbjorn Carlqvist Admin
875 93 David Fredriksson
* Read the value  
876
* Write to writable properties  
877
* Refresh only that property  
878
* Inspect metadata such as engineering units, status flags, and enumeration states  
879 1 Torbjorn Carlqvist Admin
880 92 David Fredriksson
---
881 1 Torbjorn Carlqvist Admin
882 93 David Fredriksson
h4. Device-Level Actions
883 1 Torbjorn Carlqvist Admin
884 93 David Fredriksson
Available actions:
885 92 David Fredriksson
886 93 David Fredriksson
* *Who-Is* – Discover local devices  
887
* *Who-Is Global* – Discover devices across all accessible networks  
888
* *Reinitialize Device* – Warm start, cold start (requires password)  
889
* *Restart Device* – Full reboot (requires password)  
890
* *Read All Properties* – Retrieve a complete BACnet property set  
891 1 Torbjorn Carlqvist Admin
892
---
893
894 93 David Fredriksson
h4. Adding BACnet Objects (Virtual Objects)
895 1 Torbjorn Carlqvist Admin
896 93 David Fredriksson
DTXr allows creation of **virtual BACnet objects**, which exist entirely in software and not in physical hardware.
897 1 Torbjorn Carlqvist Admin
898 93 David Fredriksson
Supported types include:
899 1 Torbjorn Carlqvist Admin
900 93 David Fredriksson
* Analog Value (AV)  
901
* Binary Value (BV)  
902
* Multi-State Value (MSV)  
903
* Trend Logs  
904
* Schedules & Calendars  
905
* Notification Classes  
906
* File objects  
907
* Many additional standard object types  
908 92 David Fredriksson
909 93 David Fredriksson
Virtual objects behave exactly like real BACnet objects:
910 92 David Fredriksson
911 93 David Fredriksson
* They support ReadProperty and WriteProperty  
912
* They support COV subscriptions  
913
* They can be logged, alarmed and trended  
914
* They appear to all BACnet clients on the network  
915
916
These objects enable advanced automation without requiring hardware wiring.
917
918 92 David Fredriksson
---
919
920 93 David Fredriksson
h4. Benefits of Virtual BACnet Objects
921 92 David Fredriksson
922 93 David Fredriksson
Virtual objects make DTX highly flexible:
923 92 David Fredriksson
924 93 David Fredriksson
* Easily combine sensor inputs into new BACnet values  
925
* Represent logic states (HeatingDemand, OccupancyStatus, etc.)  
926
* Create synthetic points (averages, maximums, deltas, differences)  
927
* Produce outputs used by other BACnet controllers  
928
* Build complex automation logic without extra I/O modules  
929
* Use TrendLogs for computed metrics  
930 92 David Fredriksson
931
---
932
933 93 David Fredriksson
h3. Drag & Drop Integration (BACnet Browser → Code)
934 92 David Fredriksson
935 93 David Fredriksson
When dragging a device, object or property into the code pane, DTX automatically generates a usable JavaScript snippet.
936 92 David Fredriksson
937 93 David Fredriksson
Examples:
938 92 David Fredriksson
939 93 David Fredriksson
<pre>read("1234", "analogInput", 1, "presentValue")</pre>
940 92 David Fredriksson
941 93 David Fredriksson
<pre>write("1234", "binaryValue", 5, "presentValue", 1)</pre>
942 92 David Fredriksson
943 93 David Fredriksson
<pre>subscribeCOV("1234", "analogValue", 10, (value) => {
944
    print("COV update: " + value)
945
})</pre>
946 92 David Fredriksson
947 93 David Fredriksson
---
948 92 David Fredriksson
949 93 David Fredriksson
h3. Top Navigation Commands
950 92 David Fredriksson
951 93 David Fredriksson
* **Save** – Saves the current file  
952
* **Activate** – Activates JavaScript files on local device  
953
* **Evaluate** – Runs selected code  
954
* **Evaluate and Print** – Runs and prints output  
955
* **Reinitialize** – Reloads automation system  
956
* **Clear Log** – Clears console  
957 92 David Fredriksson
958 93 David Fredriksson
Remote nodes allow saving but cannot execute code from this page.
959
960 92 David Fredriksson
---
961
962 93 David Fredriksson
h3. Bottom Area: Console & Activity Log
963 92 David Fredriksson
964 93 David Fredriksson
The **Console Log** shows:
965 92 David Fredriksson
966 93 David Fredriksson
* print() output  
967
* JavaScript evaluation results  
968
* Errors and system warnings  
969
* WebSocket logs  
970
971
The **Activity Log** shows internal BACnet and automation notifications.
972
973 92 David Fredriksson
---
974
975 93 David Fredriksson
h3. JavaScript Automation in DTX
976 92 David Fredriksson
977 93 David Fredriksson
DTX includes a full ECMAScript engine:
978 92 David Fredriksson
979 93 David Fredriksson
* **Any JavaScript can be used**  
980
* Arrays, JSON, classes, functions, loops, math, state machines—all supported  
981
* DTX adds automation libraries on top of standard JavaScript  
982
983 92 David Fredriksson
---
984
985 93 David Fredriksson
h4. BACnet Communication Functions
986 92 David Fredriksson
987 93 David Fredriksson
<pre>read(deviceId, type, instance, property)</pre>
988
<pre>write(deviceId, type, instance, property, value)</pre>
989
<pre>subscribeCOV(deviceId, type, instance, callback)</pre>
990
<pre>readAllProperties(deviceId, type, instance)</pre>
991
<pre>whoIs()</pre>
992
<pre>iam()</pre>
993 92 David Fredriksson
994
---
995
996 93 David Fredriksson
h4. Timers & Scheduling
997 92 David Fredriksson
998 93 David Fredriksson
<pre>runEvery(seconds, callback)</pre>
999
<pre>runAt("HH:MM", callback)</pre>
1000
<pre>runSchedule(scheduleObj, callback)</pre>
1001 92 David Fredriksson
1002
---
1003
1004 93 David Fredriksson
h4. Logging & Notifications
1005 92 David Fredriksson
1006 93 David Fredriksson
<pre>trend("energy", value)</pre>
1007
<pre>getTrend("energy")</pre>
1008
<pre>notify(level, message)</pre>
1009
<pre>alarmOn(tag)</pre>
1010
<pre>alarmOff(tag)</pre>
1011 92 David Fredriksson
1012
---
1013
1014 93 David Fredriksson
h4. System Functions
1015 92 David Fredriksson
1016 93 David Fredriksson
<pre>restart()</pre>
1017
<pre>reinit()</pre>
1018
<pre>getSystemInfo()</pre>
1019
<pre>getDeviceList()</pre>
1020 92 David Fredriksson
1021
---
1022
1023 93 David Fredriksson
h3. Complete Automation Examples
1024 92 David Fredriksson
1025 93 David Fredriksson
h4. Averaging Temperatures
1026 92 David Fredriksson
1027 93 David Fredriksson
<pre>
1028
runEvery(10, () => {
1029
    let values = [
1030
        read("1001","analogInput",1,"presentValue"),
1031
        read("1001","analogInput",2,"presentValue"),
1032
        read("1001","analogInput",3,"presentValue"),
1033
        read("1001","analogInput",4,"presentValue")
1034
    ]
1035
    let avg = values.reduce((a,b)=>a+b) / values.length
1036
    write("local", "analogValue", 10, "presentValue", avg)
1037
})
1038
</pre>
1039 92 David Fredriksson
1040 93 David Fredriksson
h4. COV-Controlled Cooling
1041 92 David Fredriksson
1042 93 David Fredriksson
<pre>
1043
subscribeCOV("3000","analogInput",7,(value)=>{
1044
    write("local","binaryValue",5,"presentValue", value > 22 ? 1 : 0)
1045
})
1046
</pre>
1047 92 David Fredriksson
1048 93 David Fredriksson
h4. Humidity Alarm
1049 92 David Fredriksson
1050 93 David Fredriksson
<pre>
1051
runEvery(5, () => {
1052
    let humidity = read("ruuvi01","analogInput",8,"presentValue")
1053
1054
    if (humidity > 80) {
1055
        alarmOn("HumidityHigh")
1056
        notify("critical", "Humidity too high: " + humidity)
1057
    } else {
1058
        alarmOff("HumidityHigh")
1059
    }
1060
})
1061
</pre>
1062
1063
h4. Multi-State Virtual Logic
1064
1065
<pre>
1066
runEvery(1, () => {
1067
    let t = read("local","analogValue",10,"presentValue")
1068
    let state =
1069
        t < 18 ? 1 :
1070
        t < 22 ? 2 :
1071
        t < 25 ? 3 : 4
1072
1073
    write("local","multiStateValue",20,"presentValue",state)
1074
})
1075
</pre>
1076
1077 92 David Fredriksson
1078
1079
---
1080
1081 87 David Fredriksson
h2. BACnet
1082 82 David Fredriksson
1083 87 David Fredriksson
BACnet (Building Automation and Control Network) is an international open communication standard for building automation systems.  
1084
It enables devices from different manufacturers to communicate, share data, and coordinate functions such as HVAC, lighting, alarms, access control and energy management.
1085 76 David Fredriksson
1086 87 David Fredriksson
BACnet is defined and maintained by the BACnet Committee (SSPC 135) under ASHRAE.
1087
1088
More information: https://bacnet.org
1089
1090 1 Torbjorn Carlqvist Admin
---
1091
1092 87 David Fredriksson
h3. Standards and Certification
1093
1094
BACnet is based on globally recognized standards:
1095
1096
* *ASHRAE Standard 135*  
1097
  The core BACnet protocol specification, maintained by ASHRAE.
1098
1099
* *ISO 16484-5*  
1100
  International standard for building automation and control networks.
1101
1102
* *ANSI/ASHRAE Addenda*  
1103
  Regular updates ensure modern features and cyber-security enhancements.
1104
1105
Because BACnet is standardized internationally, devices are tested and validated against consistent technical rules.  
1106
This ensures long-term compatibility and protects investments in automation systems.
1107
1108
---
1109
1110
h3. How BACnet Communication Works
1111
1112
BACnet defines:
1113
* *Objects* — structured data models (AI, AO, BI, BO, Schedules, etc.)  
1114
* *Properties* — attributes of each object (Present Value, Units, Status Flags…)  
1115
* *Services* — methods for communicating (ReadProperty, WriteProperty, etc.)
1116
1117
Common communication mechanisms:
1118
* **BACnet/IP** over UDP (default port 47808)  
1119
* **Who-Is / I-Am** device discovery  
1120
* **ReadProperty / WriteProperty** for data exchange  
1121
* **COV (Change of Value) subscriptions** for event-driven updates  
1122
* **Alarm and Event notifications**  
1123
1124
DTXr implements:
1125
* Full BACnet/IP functionality  
1126
* Device discovery  
1127
* Automatic reading and writing of properties  
1128
* Real-time event handling  
1129
* COV subscriptions when available  
1130
1131
---
1132
1133 89 David Fredriksson
h3. Key Advantages of BACnet 
1134 87 David Fredriksson
1135
*Open and vendor-neutral*  
1136
BACnet is not controlled by a single private company. Any manufacturer can implement the standard.  
1137
This eliminates vendor lock-in and ensures long-term system freedom.
1138
1139
*Large global ecosystem*  
1140
Hundreds of companies worldwide produce BACnet-certified devices:
1141
* HVAC controllers  
1142
* Sensors and actuators  
1143
* Lighting systems  
1144
* VAV and damper controllers  
1145
* Energy monitoring systems  
1146
* User interfaces and visualizations  
1147
1148
This means integrators can mix-and-match equipment from different brands without special gateways.
1149
1150
*Interoperability by design*  
1151
Because BACnet defines standard object types and required properties, devices share:
1152
* Common naming conventions  
1153
* Common alarm/event handling behavior  
1154
* Standard scheduling objects  
1155
* Standard data types  
1156
1157
This makes exchanging live data straightforward and predictable.
1158
1159
*Efficient Event-Driven Communication with COV*  
1160
Rather than constantly polling for updates, BACnet supports **Change of Value (COV)** subscriptions:
1161
* A device notifies subscribers only when a value *actually changes*  
1162
* No wasted network traffic  
1163
* Faster updates for dynamic values  
1164
* Lower CPU and bandwidth usage  
1165
* Ideal for large systems or wireless deployments
1166
1167
COV is one of BACnet’s biggest advantages over legacy systems that rely on heavy cyclic polling.
1168
1169
*Rich Metadata Built Into the Protocol*  
1170
BACnet objects include a wide range of metadata:
1171
* Object Name  
1172
* Description  
1173
* Units  
1174
* Engineering limits  
1175
* Reliability state  
1176
* Status flags  
1177
* Priority array  
1178
* Object type  
1179
1180
Metadata allows tools like DTXr to:
1181
* Auto-discover device capabilities  
1182
* Display real names and units  
1183
* Visualize systems without custom drivers  
1184
* Auto-generate controls and dashboards  
1185
1186
This reduces engineering time and improves clarity for end users.
1187
1188
---
1189 90 David Fredriksson
1190 89 David Fredriksson
h2. Davitor Advantage
1191 90 David Fredriksson
1192 87 David Fredriksson
h3. Interoperability and Vendor Collaboration
1193
1194
BACnet has a long-standing interoperability testing ecosystem:
1195
1196
* *BACnet Testing Laboratories (BTL)*  
1197
  Certifies devices against standardized profiles, ensuring correct communication.
1198
1199
* *BTL Listings*  
1200
  Public database of certified devices that work together reliably.
1201
1202
* *Plugfests*  
1203
  Manufacturers meet twice per year to test their devices against each other in real networks.
1204
1205
The result:
1206
* Multi-brand BACnet systems work reliably  
1207
* Integration cost is lower  
1208
* Long-term compatibility is ensured  
1209
* Devices can be replaced without redesigning the entire system  
1210
1211
BACnet is one of the strongest and most mature interoperability ecosystems in the automation industry.
1212
1213
---
1214
1215
h3. Why BACnet Works Exceptionally Well With DTXr
1216
1217
DTXr is built around BACnet’s strengths:
1218
* Automatic discovery of BACnet devices  
1219
* Real-time event and alarm handling  
1220
* Full COV support  
1221
* Multi-priority writing of Present Value  
1222
* Automatic metadata integration (names, units, descriptions)  
1223
* Native schedule editor compatible with BACnet Schedule objects  
1224
* BACnet notifications shown directly in the interface  
1225
1226
DTXr can be used as:
1227
* A BACnet central controller  
1228
* A visualization/HMI layer  
1229
* A programming environment (Code + Blocks)  
1230
* A diagnostics tool for technicians  
1231 1 Torbjorn Carlqvist Admin
* A multi-device integration and commissioning tool  
1232 87 David Fredriksson
1233
DTXr leverages the power of BACnet without requiring advanced protocol knowledge from the user.
1234 1 Torbjorn Carlqvist Admin
1235
---
1236 89 David Fredriksson
h2. DTX Overview (Development Environment)
1237 1 Torbjorn Carlqvist Admin
1238
!https://www.davitor.com/Home/DTX!
1239 89 David Fredriksson
1240
DTX (by Davitor) is a powerful development and runtime environment designed for building automation, integration, and control — especially for BACnet-based systems.  
1241
The environment is directly integrated into the device, allowing engineers to create, test, and execute automation logic locally or remotely via a web browser.  
1242 96 David Fredriksson
DTX is suitable for controllers, gateways, cloud connectors, and industrial IO devices. 
1243 89 David Fredriksson
1244
---
1245
1246
h3. Core Concept: Development Inside the Device
1247
1248
DTX is described by Davitor as a **“Development Environment for BACnet devices”**.  
1249 96 David Fredriksson
Its philosophy centers around **self-contained automation**, where development tools live inside the device itself — eliminating lost code, mismatched versions, or external dependencies. This enhances system integrity and long-term maintainability. 
1250 89 David Fredriksson
1251 1 Torbjorn Carlqvist Admin
A major benefit of this approach:
1252 89 David Fredriksson
* Your automation project is stored and executed natively inside the device.  
1253
* You can access the development environment anywhere on the network.  
1254
* No separate development workstation is required.  
1255 98 David Fredriksson
* The same environment works on almost any hardware or operating system supporting Java 17 or higher. 
1256 89 David Fredriksson
1257 1 Torbjorn Carlqvist Admin
---
1258 89 David Fredriksson
1259 1 Torbjorn Carlqvist Admin
h3. Key Features of DTX
1260 89 David Fredriksson
1261
*Modular and Future-Proof Design*  
1262
DTX is built with modularity in mind:
1263
* The development environment runs on the device.  
1264 98 David Fredriksson
* It is platform-independent and OS-agnostic (runs wherever Java 17+ works).  
1265 96 David Fredriksson
* It acts as a **controller**, **cloud service**, or **gateway**, depending on need. 
1266 89 David Fredriksson
1267
*One Unified Environment*  
1268
DTX includes everything needed for automation development:
1269
* Full **code editor** with JavaScript (ES6) support.  
1270 1 Torbjorn Carlqvist Admin
* A built-in **BACnet browser** for object discovery and inspection.  
1271 89 David Fredriksson
* Easy **GUI and HMI creation** tools.  
1272 96 David Fredriksson
* Integrated script engine, REST API bindings, email notifications, and schedule management. 
1273 89 David Fredriksson
1274
*Use Any Developer, Any Skill Level*  
1275 96 David Fredriksson
Since DTX uses **JavaScript**, a widely accessible language, the need for specialized proprietary system knowledge is minimized. Anyone with basic JavaScript skills can build automation logic. 
1276 89 David Fredriksson
1277
---
1278
1279
h3. Protocol Integration and Interoperability
1280
1281
DTX natively supports protocols used in modern automation:
1282 1 Torbjorn Carlqvist Admin
* **BACnet/IP** (full stack with browser and read/write tools)  
1283 89 David Fredriksson
* **MODBUS** (both Master and Slave over TCP/RTU)  
1284
* **REST API** (both server and client capabilities for external application integration)  
1285
* Optional LION fieldbus support on specialized hardware  
1286
* MQTT broker capability for IoT use cases  
1287 96 David Fredriksson
* Serial port support (ASCII and HEX with configurable delimiter) 
1288 89 David Fredriksson
1289 96 David Fredriksson
The modular approach allows data from any source (BACnet or otherwise) to be exposed directly through DTX’s REST interface — enabling integration with cloud, database or analytics platforms while preserving metadata and object structure. 
1290 89 David Fredriksson
1291
---
1292
1293
h3. Unified Automation Stack
1294
1295
DTX unifies:
1296
* Development (IDE + editor inside the device)  
1297
* HMI design (visual diagram editor)  
1298 1 Torbjorn Carlqvist Admin
* Script execution (JavaScript engine)  
1299 89 David Fredriksson
* Protocol communication (BACnet, Modbus, HTTP, MQTT, etc.)  
1300
* Notifications and email support  
1301 96 David Fredriksson
* Database integration (built-in user database or external Postgres SQL) 
1302 89 David Fredriksson
1303
This makes DTX not only a controller but also a **full automation ecosystem** where:
1304
* Automation logic is developed, tested, and deployed locally  
1305
* Values and objects are available in real time  
1306
* Projects are stored in the device and cannot get disconnected from the runtime  
1307
1308
---
1309
1310
h3. Integration with Davitor Advantage
1311
1312
When combined with Davitor Advantage, DTX becomes a **remotely manageable node** in a scalable automation network:
1313
* Develop locally on any device  
1314
* Provision devices via Davitor cloud  
1315
* Manage and monitor projects across multiple sites and protocols  
1316
* Keep firmware, logic, and configuration synchronized across installations
1317
1318 96 David Fredriksson
See https://www.davitor.com for product details and documentation. 
1319 89 David Fredriksson
1320
---
1321
1322 91 David Fredriksson
h2. Radio Support & Supported Protocols
1323 1 Torbjorn Carlqvist Admin
1324 91 David Fredriksson
DTX provides flexible wireless communication depending on platform and hardware.  
1325 98 David Fredriksson
Because DTX can run on any system capable of Java 17 or later, wireless capabilities can range from WiFi-only devices to advanced multi-protocol gateways.
1326 1 Torbjorn Carlqvist Admin
1327 91 David Fredriksson
Below are the primary wireless technologies supported by DTX, in recommended reading order.
1328
1329
---
1330
1331
h3. WiFi (BACnet over WiFi)
1332
1333 98 David Fredriksson
DTX includes a complete BACnet/IP stack and can run on any Java 17+ capable WiFi device.  
1334 91 David Fredriksson
When DTX is installed on hardware with WiFi (e.g., Raspberry Pi, industrial WiFi gateways, embedded controllers), it automatically supports:
1335
1336
* Full BACnet/IP communication over WiFi  
1337
* COV subscriptions (efficient change-based updates)  
1338
* Who-Is / I-Am device discovery  
1339
* Reading and writing BACnet properties  
1340
* BACnet schedules, events, notifications, and alarms  
1341
* Participation in BACnet networks without wired Ethernet  
1342
1343
This makes DTX a fully wireless BACnet controller when running on WiFi-enabled hardware — ideal for commissioning, mobile diagnostics, or wireless installations.
1344
1345
---
1346
1347
h3. Bluetooth Devices (non-mesh)
1348
1349
DTX supports Bluetooth Low Energy (BLE) devices for direct sensor integration.  
1350
This includes well-known BLE beacon and sensor devices such as **RUUVI smart sensors**, which DTX can automatically detect and encapsulate as BACnet objects.
1351
1352
Examples of RUUVI sensor data mapped by DTX:
1353
1354
* **Temperature** (°C)  
1355
* **Humidity** (%)  
1356
* **Air Pressure** (Pa/hPa)  
1357
* **Movement / Acceleration** (X/Y/Z axis)  
1358
* **Battery level**  
1359
* **Signal strength (RSSI)**  
1360
1361
DTX automatically:
1362
1363
* Detects nearby BLE sensors  
1364
* Parses their advertisement data (no pairing required)  
1365
* Creates corresponding BACnet objects  
1366
* Updates values in real time  
1367
* Allows automation logic and HMI dashboards to use them like any other BACnet sensor  
1368
1369
This enables **fully wireless environmental measurement** with zero wiring and minimal configuration.
1370
1371
RUUVI devices are ideal for:
1372
1373
* HVAC monitoring  
1374
* Building comfort tracking  
1375
* Server room supervision  
1376
* Warehousing & storage  
1377
* Indoor air quality dashboards  
1378
* Asset or movement detection  
1379
1380
Because the sensors broadcast continuously, DTX receives updates passively, with extremely low energy usage on the sensor side.
1381
1382
---
1383
1384
h3. Wireless Long-Range DALI-2 Device (Davitor)
1385
1386
DTX supports integration with **Davitor’s Wireless Long-Range DALI-2 Device**, enabling wireless extension of DALI-2 lighting networks.  
1387
Instead of cabling DALI buses across long distances, the system uses Davitor’s long-range radio modules to connect DALI-2 control gear wirelessly.
1388
1389
Key features:
1390
1391
* Wireless connection between DTX and DALI-2 luminaires  
1392
* Maintains full DALI-2 functionality (dimming, groups, scenes, status)  
1393
* Extends DALI-2 coverage beyond normal cable distance limits  
1394
* Simplifies installation & retrofit work  
1395
* Reduces cable infrastructure costs  
1396
* All DALI-2 channels and objects appear in DTX as BACnet objects  
1397
1398
This allows DTX to become a **wireless lighting controller**, combining BACnet automation with DALI-2 lighting systems.
1399
1400
Suitable for:
1401
1402
* Industrial halls  
1403
* Large buildings  
1404
* Office retrofits  
1405
* Outdoor lighting  
1406
* Warehouses  
1407
* Locations where DALI cabling is impractical  
1408
1409
DTX treats wireless DALI-2 exactly like wired BACnet points, enabling seamless integration with automation scripts, schedules, alarms, and GUI pages.
1410
1411
---
1412
1413
h3. Radio Mesh (MIRA & BLE5 Mesh)
1414
1415
DTX integrates with radio-based mesh networks such as **MIRA Mesh** and **BLE5 Mesh** using Davitor’s multi-protocol radio interface.  
1416
Mesh networks provide long-range, self-healing wireless communication ideal for distributed sensors and actuators.
1417
1418
DTX can:
1419
1420
* Discover mesh nodes automatically  
1421
* Map mesh node values into BACnet objects  
1422
* Control mesh actuators through BACnet writes  
1423
* Use mesh-based sensors for automation logic  
1424
* Support large installations with many devices  
1425
1426
Common mesh technologies used with DTX:
1427
1428
* **MIRA Mesh** — IPv6-based, ultra-low power, long-range self-healing mesh  
1429
* **BLE5 Mesh** — Bluetooth-based many-to-many lighting & sensor networks  
1430
1431
Benefits of mesh:
1432
1433
* Extremely scalable  
1434
* Multi-hop routing increases range  
1435
* No single point of failure  
1436
* Low power consumption for battery nodes  
1437
* Ideal for smart buildings, lighting control, indoor/outdoor sensor grids  
1438
1439
Example applications:
1440
1441
* Wireless environmental sensors  
1442
* Industrial sensor networks  
1443
* Lighting control clusters  
1444
* Distributed monitoring systems  
1445
* Mesh-connected actuators or relay nodes  
1446
1447
DTX treats mesh nodes as native BACnet devices, providing seamless integration across wired, WiFi, Bluetooth, and mesh networks.
1448
1449
---
1450
1451
h3. Summary
1452
1453
DTX supports multiple wireless communication paths:
1454
1455
* **WiFi** — full BACnet/IP capability on wireless hardware  
1456
* **Bluetooth (RUUVI and others)** — automatic BLE sensor discovery and BACnet mapping  
1457
* **Wireless Long-Range DALI-2** — wireless lighting control integration  
1458
* **Radio Mesh (MIRA & BLE5)** — scalable multi-hop wireless automation  
1459
1460
This allows DTX to operate in environments where wired infrastructure is limited, expensive, or impossible — while maintaining complete BACnet interoperability and automation capabilities.
1461 1 Torbjorn Carlqvist Admin
1462
1463
---
1464
1465
1466
h3. Developer's Guide
1467
1468
[[IDE|IDE walk through]]
1469
[[Javascript|The DTXr Javascript guide]]
1470
[[Blockly|Blockly tutorials]]