Project

General

Profile

DTXr doc » History » Version 93

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