Project

General

Profile

DTXr doc » History » Version 87

David Fredriksson, 12/09/2025 05:46 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 1 Torbjorn Carlqvist Admin
82 84 David Fredriksson
h2. 1. Overview
83 86 David Fredriksson
84
h4. The DTXr web interface allows users to:
85 79 David Fredriksson
* View BACnet objects and their properties
86
* Modify writable properties (e.g., Present Value)
87
* Edit weekly schedules
88
* Switch between local and remote devices
89
* Monitor alarms, events, and notifications
90
* Use real-time updates through WebSocket (local device only)
91
92
---
93
94
h3. 2. Navigation Bar
95
96
h4. 2.1 Objects Menu
97
* *Refresh* reloads all object data and events.
98
99
_Note: Refresh is required when a remote device is selected._
100
101
h4. 2.2 Devices Menu
102
* Displays local device and all discovered BACnet devices.
103
* Devices are grouped by network.
104
* Selecting a device loads its object list.
105
106
h4. 2.3 Priority Menu
107
Controls the *BACnet write priority* used when writing Present Value.
108
109
Examples:
110
* Priority 1 – Manual Life Safety
111
* Priority 8 – Default
112
* Priority 16 – Lowest
113
114
h4. 2.4 Notifications Menu
115
Shows:
116
* Alarms
117
* Events
118
* Return-to-normal
119
120
The menu uses badge counters:
121
* Yellow = events  
122
* Red = alarms  
123
* Green = normal transitions  
124
125
---
126
127 84 David Fredriksson
h3. 3. Objects View
128 79 David Fredriksson
129
The main view lists all BACnet objects.
130
131
Features:
132
* Collapsible categories (accordions)
133
* Lazy loading of properties when expanded
134
* Editable Present Value fields where supported
135
* Real-time updates on the *local* device
136
* Manual refresh required for *remote* devices
137
138
h4. 3.1 Expanding an Object
139
Expanding an object loads:
140
* Properties
141
* Values
142
* Writable fields
143
* Schedule editor button (if applicable)
144
145
h4. 3.2 Writing Property Values
146
Steps:
147
# Edit a value in the input field.
148
# Press the Write/Save button.
149
# DTXr sends a BACnet WriteProperty with the selected priority.
150
# A popup shows success or error.
151
152
---
153
154
h3. 4. Device Discovery
155
156
h4. 4.1 Discovering Devices
157
Opening the *Devices* dropdown sends a Who-Is request and populates the list.
158
159
h4. 4.2 Selecting a Device
160
When switching devices:
161
* Properties reload
162
* Notification list reloads
163
* The selected device name appears in the navbar
164
165
h4. 4.3 Refreshing Content
166
*Mandatory* when using remote devices.
167
168
Use:
169
@Objects → Refresh@
170
171
This reloads:
172
* Object list
173
* Property values
174
* Notifications
175
176
---
177
178
h3. 5. Notifications and Events
179
180
Notifications include:
181
* Alarm
182
* Event
183
* Normal
184
185
Real-time updates:
186
* Enabled for local device
187
* Disabled for remote devices — manual refresh required
188
189
h4. 5.1 Acknowledgment
190
If a notification supports acknowledgment:
191
* Press _Acknowledge_
192
* DTXr sends BACnet AcknowledgeAlarm
193
* Notification updates when completed
194
195
---
196
197
h3. 6. Weekly Schedule Editor
198
199
h4. 6.1 Opening the Editor
200
Click the schedule property to open the weekly calendar modal.
201
202
h4. 6.2 Creating Events
203
Select a time in the calendar to create a new event.
204
205
h4. 6.3 Editing Events
206
Click an event to modify:
207
* Binary schedule → Active / Inactive
208
* Analog schedule → numeric value
209
210
h4. 6.4 Saving the Schedule
211
Click *@Save changes@* to store the weekly schedule.
212
213
The data is:
214
* Compiled into BACnet dailySchedule structures
215
* Sorted chronologically
216
* Sent to the device as JSON
217
218
---
219
220
h3. 7. Popups and Feedback
221
222
Popups indicate:
223
* Success
224
* Errors
225
* Info
226
* Warnings
227
228
---
229
230
h3. 8. Troubleshooting
231
232
h4. 8.1 Objects Not Updating
233
* Remote device selected → press Refresh  
234
* Network or device may be unreachable
235
236
h4. 8.2 Write Errors
237
Possible reasons:
238
* Incorrect priority  
239
* Object out of service  
240
* Invalid value  
241 1 Torbjorn Carlqvist Admin
242 79 David Fredriksson
h4. 8.3 Schedule Issues
243 1 Torbjorn Carlqvist Admin
* No events created  
244
* Missing object ID  
245
* Remote device requires manual refresh  
246
247
248
---
249 81 David Fredriksson
250 83 David Fredriksson
h2. Setup
251 79 David Fredriksson
252 80 David Fredriksson
DTXr is configured through the *Menu → Setup* page.  
253
All configuration settings are grouped into logical sections. Each section below provides a functional overview of what the user can configure.  
254
Values are stored in *settings.json* and applied system-wide after pressing *Save*.
255
256
*Important:*  
257
When a *remote device* is selected from the HUB interface, *a manual page refresh is required* to update configuration data.  
258
Local device information updates in real time.
259 78 David Fredriksson
h4. System
260 1 Torbjorn Carlqvist Admin
261 78 David Fredriksson
Contains all fundamental system-level access and identity configuration.
262 1 Torbjorn Carlqvist Admin
263 78 David Fredriksson
* Administrator Account  
264
  - Configure the password of the fixed “admin” user.  
265
* Operator Account  
266
  - Optional user with limited access for HMIs or machine operation.  
267
  - Username, password and start page can be assigned.  
268
* Developer Account  
269
  - Optional higher-level user with configurable module permissions  
270
    (code, objects, API, blocks, diagram, setup).  
271
* Logging  
272
  - Set the system-wide log level (Debug, Info, Warning, Error).  
273
* Hardware Platform  
274
  - Select hardware profile (PC/server, Mira/Mesh, LION, etc.).  
275
  - This controls the enable/disable state of platform-specific modules.
276
277 1 Torbjorn Carlqvist Admin
---
278 77 David Fredriksson
279 78 David Fredriksson
h4. BACnet
280 1 Torbjorn Carlqvist Admin
281 78 David Fredriksson
Defines all BACnet/IP protocol parameters for the device.
282 1 Torbjorn Carlqvist Admin
283 78 David Fredriksson
* Device Identity  
284
  - Device ID, Device Name.  
285
* Security  
286
  - BACnet password (used for Device Communication Control).  
287
* Protocol Settings  
288
  - Segmentation, Max APDU, Vendor ID and other low-level options.  
289
* Network Mode  
290
  - Basic IP communication behaviour (broadcast, BBMD usage when applicable).
291 1 Torbjorn Carlqvist Admin
292 78 David Fredriksson
This section is essential when integrating DTXr into a BACnet building automation network.
293 1 Torbjorn Carlqvist Admin
294
---
295 77 David Fredriksson
296 78 David Fredriksson
h4. Wireless Mesh
297 1 Torbjorn Carlqvist Admin
298 78 David Fredriksson
Provides access to the mesh radio configuration on supported hardware.
299 1 Torbjorn Carlqvist Admin
300 78 David Fredriksson
* Enable/Disable Mesh  
301
* Mesh Credentials  
302
  - Security keys, network key and authentication key.  
303
* Node Role  
304
  - Coordinator / Router / End Device.  
305
* Provisioning QR Code  
306
  - Device can generate a QR code containing mesh network credentials.
307 77 David Fredriksson
308 78 David Fredriksson
Note: Mesh options are disabled on platform types that do not support radio.
309 77 David Fredriksson
310
---
311
312 1 Torbjorn Carlqvist Admin
h4. Bluetooth
313 76 David Fredriksson
314 1 Torbjorn Carlqvist Admin
Configuration for onboard Bluetooth LE services (if supported by the platform).
315 76 David Fredriksson
316
* Bluetooth Console  
317 1 Torbjorn Carlqvist Admin
  - Enables BLE-based console output.  
318 76 David Fredriksson
* Beacon Mode  
319 1 Torbjorn Carlqvist Admin
  - Enables BLE advertisement and optional custom beacon name.  
320 76 David Fredriksson
* Address Visibility and Power Settings  
321
  - Controls how the device broadcasts itself to the environment.
322
323
These options are automatically enabled or disabled depending on the selected platform type.
324 1 Torbjorn Carlqvist Admin
325 76 David Fredriksson
---
326
327 1 Torbjorn Carlqvist Admin
h4. LION Interface
328 76 David Fredriksson
329
Shown only on LION-enabled platforms.
330
331
* Enable/Disable LION module support.  
332 1 Torbjorn Carlqvist Admin
* Hardware Extensions  
333 76 David Fredriksson
  - Configures behaviour of LION-specific IO hardware.  
334
* Channel Behavior  
335
  - Digital/analog features depending on LION product family.
336
337
---
338 75 David Fredriksson
339 76 David Fredriksson
h4. Davitor Advantage
340
341
Configuration for optional DAVITOR cloud lifecycle management.
342
343 75 David Fredriksson
* DRK (Davitor Reference Key)  
344 76 David Fredriksson
  - Used for remote maintenance and PLM link.  
345 75 David Fredriksson
* PLM Connectivity  
346 76 David Fredriksson
  - Service URL and communication settings when using cloud management.
347 75 David Fredriksson
348 76 David Fredriksson
---
349 75 David Fredriksson
350
h4. External Database Access
351 76 David Fredriksson
352
Lets the DTXr device communicate with an external SQL/NoSQL database.
353
354
* Connection  
355
  - Host, port and protocol information.  
356 75 David Fredriksson
* Credentials  
357 76 David Fredriksson
  - Username/password for authenticated connections.  
358
* Sync/Logging Options  
359
  - Defines how data is written externally (trend logs, events, custom data).
360
361
---
362
363 75 David Fredriksson
h4. File Integration
364 76 David Fredriksson
365
Tools for importing/exporting system content.
366
367
* Backup / Restore  
368
  - Download the current configuration or upload a saved configuration.  
369
* Project File Upload  
370 1 Torbjorn Carlqvist Admin
  - Add or replace project assets (HMIs, scripts, diagrams).  
371 76 David Fredriksson
* Logs  
372 42 David Fredriksson
  - Download generated logs for troubleshooting.
373 76 David Fredriksson
374 13 Torbjorn Carlqvist Admin
---
375 76 David Fredriksson
376
h4. HTTP Server
377 11 Torbjorn Carlqvist Admin
378 76 David Fredriksson
Controls how the embedded DTXr HTTP(S) service behaves.
379
380
* Port Configuration  
381
  - Default HTTP port is 9090.  
382
* HTTPS / TLS  
383 14 Torbjorn Carlqvist Admin
  - Optional encrypted access.  
384 76 David Fredriksson
* Session Timeout  
385
  - Auto-logout delay for inactive users.  
386 14 Torbjorn Carlqvist Admin
* Allowed Hosts  
387 11 Torbjorn Carlqvist Admin
  - Restrict network clients that can access the interface.
388 76 David Fredriksson
389 14 Torbjorn Carlqvist Admin
---
390 76 David Fredriksson
391
h4. Email
392
393
Allows the device to send or receive email for automation events.
394 11 Torbjorn Carlqvist Admin
395 76 David Fredriksson
* SMTP Server  
396 11 Torbjorn Carlqvist Admin
  - Address, port, TLS/STARTTLS.  
397 76 David Fredriksson
* Authentication  
398 14 Torbjorn Carlqvist Admin
  - Optional username/password.  
399 76 David Fredriksson
* Attachments Folder  
400
  - Path where incoming email attachments are stored.
401
402
---
403 11 Torbjorn Carlqvist Admin
404 76 David Fredriksson
h4. Location Services
405
406
The device can determine its location automatically.
407 1 Torbjorn Carlqvist Admin
408 76 David Fredriksson
* Automatic Geolocation  
409
  - Queries an external geolocation service to populate latitude/longitude.  
410
* Manual Input  
411
  - User can override location if browser access is restricted.
412
413 19 Torbjorn Carlqvist Admin
---
414 76 David Fredriksson
415 19 Torbjorn Carlqvist Admin
h4. IoT HUB (BETA)
416 76 David Fredriksson
417 1 Torbjorn Carlqvist Admin
Early-stage experimental cloud integration.
418 76 David Fredriksson
419
* Backend URL  
420 1 Torbjorn Carlqvist Admin
  - IoT gateway endpoint.  
421 76 David Fredriksson
* Device Token  
422
  - Authentication token for cloud usage.  
423 1 Torbjorn Carlqvist Admin
* Upload Options  
424 76 David Fredriksson
  - Define what data the device forwards (events, logs, telemetry).
425
426
---
427
428 1 Torbjorn Carlqvist Admin
h4. Save & Refresh
429 76 David Fredriksson
430
* Save  
431 1 Torbjorn Carlqvist Admin
  - Commits all modified settings to settings.json.  
432 76 David Fredriksson
* Refresh  
433
  - Reloads settings from device memory.  
434
  - Required after switching to a remote device.
435
436 1 Torbjorn Carlqvist Admin
437 76 David Fredriksson
---
438 1 Torbjorn Carlqvist Admin
439 83 David Fredriksson
h2. Blocks Editor (Blockly)
440 82 David Fredriksson
441
The *Blocks* page provides a visual programming environment based on Google Blockly.  
442
Users can build automation logic using drag-and-drop blocks instead of traditional code.  
443
All logic created here is converted into JavaScript and executed by the DTXr runtime.
444
445
The Blocks Editor is divided into four main areas:
446
* The *toolbox* (left side) containing categorized blocks  
447
* The *Blockly workspace* (center)  
448
* The *log and activity panels* (bottom)  
449
* Editor actions available in the top navigation bar
450
451
---
452
453
h5. Navigation Bar Features
454
455
* Blocks → *Refresh*  
456
  - Re-parses the block code displayed in the workspace.  
457
* Blocks → *Clear logs*  
458
  - Clears the log console in the footer area.  
459
* Test  
460
  - Executes the currently visible block code once, without saving.  
461
* Save  
462
  - Saves the current block workspace into the device configuration.  
463
* Activate  
464
  - Saves and also activates the block program so it runs continuously.  
465
* Notifications  
466
  - Shows system events, alarms, and normal transitions in real time.
467
468
---
469
470
h5. Blockly Workspace
471
472
The main canvas where blocks are placed and connected.
473
474
* Drag blocks from the toolbox onto the workspace.  
475
* Connect blocks to form logic chains.  
476
* Right-click a block to duplicate, delete, or collapse it.  
477
* Zoom and pan with the mouse wheel or gestures.
478
479
All changes in the workspace are local until *Save* or *Activate* is pressed.
480
481
---
482
483
h5. Toolbox Categories
484
485
The toolbox is organized into logical categories:
486
487
* JSON  
488
  - Blocks for constructing and parsing JSON objects.  
489
* Logic  
490
  - If/else, comparison, boolean operations.  
491
* Loops  
492
  - Repeat operations.  
493
* Math  
494
  - Arithmetic and numeric values.  
495
* Text  
496
  - String operations and concatenation.  
497
* Variables  
498
  - Create and manage global/local variables.  
499
500
*Events (DTX-specific)*  
501
  - Triggers for analog or binary input changes  
502
  - Astro events  
503
  - Timers  
504
  - Incoming text messages  
505
  - Diagram object push events  
506
507
*Set value / Read value (DTX BACnet extensions)*  
508
  - Write analog, binary, lighting outputs  
509
  - Read analog or binary values  
510
  - Compare input states  
511
512
*Timed tasks*  
513
  - Cron-like scheduling  
514
  - Start, cancel, pause, resume timers  
515
516
*HMI*  
517
  - Update graphical objects or maps in diagrams/HMI pages  
518
519
*Code*  
520
  - Insert raw JavaScript statements  
521
  - Create custom return statements  
522
  - Handle function call events  
523
524
*Misc*  
525
  - Print to log  
526
  - Date/time  
527
528
*Notifications*  
529
  - Send email from block logic  
530
531
These categories combine to cover automation, BACnet control, HMI interaction and notifications.
532
533
---
534
535
h5. Running and Activating Code
536
537
*Test*  
538
Executes the block logic one time, useful for debugging.
539
540
*Save*  
541
Stores the block script but does not run it automatically.
542
543
*Activate*  
544
Saves and deploys the block logic to the DTXr runtime engine.  
545
Activated logic will:
546
* Run automatically on device startup  
547
* Respond to events immediately  
548
* Allow scheduled logic to trigger without manual execution  
549
550
---
551
552
h5. Sidebars and Console
553
554
*Left Sidebar*  
555
May contain the workspace tree or additional contextual tools.
556
557
*Right Sidebar*  
558
Displays block metadata, help text or generated JavaScript depending on configuration.
559
560
*Footer Console*  
561
Two areas are available:
562
* *Log* — printed output from print blocks or runtime  
563
* *Activity* — messages about system behavior, activation, parsing, etc.
564
565
Both areas support resizing using draggable split panes.
566
567
---
568
569
h5. Working With Devices in Blocks Mode
570
571
The device selector is present but indicates:
572
573
*“Not applicable in Blocks mode”*
574
575
This is because Blockly logic always runs locally on the device that hosts DTXr.  
576
Remote devices cannot be programmed using the Blocks Editor.
577
578
---
579
580
h5. Saving Your Work
581
582
The block workspace is saved in the device’s internal configuration.  
583
A backup is included when exporting system configuration via the File Integration tools.
584
585
*Important:*  
586
If block logic interacts with remote devices (reading/writing values),  
587
use *Refresh* in Objects view to ensure the remote values have been updated recently.
588
589
---
590
591
h5. Error Handling
592
593
When errors occur:
594
* The error message appears in the log console  
595
* Pop-up notifications show parsing or execution issues  
596
* Common issues include:
597
  - Missing block connections  
598
  - Undefined variables  
599
  - Writing to unavailable BACnet objects  
600
601
---
602
603
h5. Best Practices
604
605
* Keep block structures grouped and well-organized  
606
* Name variables clearly  
607
* Use print statements during development  
608
* Test frequently before activation  
609
* Avoid long chains inside event triggers  
610
* Use timers for repeated actions, not loops
611
612
---
613
614 87 David Fredriksson
h2. BACnet
615 82 David Fredriksson
616 87 David Fredriksson
BACnet (Building Automation and Control Network) is an international open communication standard for building automation systems.  
617
It enables devices from different manufacturers to communicate, share data, and coordinate functions such as HVAC, lighting, alarms, access control and energy management.
618 76 David Fredriksson
619 87 David Fredriksson
BACnet is defined and maintained by the BACnet Committee (SSPC 135) under ASHRAE.
620
621
More information: https://bacnet.org
622
623 1 Torbjorn Carlqvist Admin
---
624
625 87 David Fredriksson
h3. Standards and Certification
626
627
BACnet is based on globally recognized standards:
628
629
* *ASHRAE Standard 135*  
630
  The core BACnet protocol specification, maintained by ASHRAE.
631
632
* *ISO 16484-5*  
633
  International standard for building automation and control networks.
634
635
* *ANSI/ASHRAE Addenda*  
636
  Regular updates ensure modern features and cyber-security enhancements.
637
638
Because BACnet is standardized internationally, devices are tested and validated against consistent technical rules.  
639
This ensures long-term compatibility and protects investments in automation systems.
640
641
---
642
643
h3. How BACnet Communication Works
644
645
BACnet defines:
646
* *Objects* — structured data models (AI, AO, BI, BO, Schedules, etc.)  
647
* *Properties* — attributes of each object (Present Value, Units, Status Flags…)  
648
* *Services* — methods for communicating (ReadProperty, WriteProperty, etc.)
649
650
Common communication mechanisms:
651
* **BACnet/IP** over UDP (default port 47808)  
652
* **Who-Is / I-Am** device discovery  
653
* **ReadProperty / WriteProperty** for data exchange  
654
* **COV (Change of Value) subscriptions** for event-driven updates  
655
* **Alarm and Event notifications**  
656
657
DTXr implements:
658
* Full BACnet/IP functionality  
659
* Device discovery  
660
* Automatic reading and writing of properties  
661
* Real-time event handling  
662
* COV subscriptions when available  
663
664
---
665
666
h3. Key Advantages of BACnet (Unique Selling Points)
667
668
*Open and vendor-neutral*  
669
BACnet is not controlled by a single private company. Any manufacturer can implement the standard.  
670
This eliminates vendor lock-in and ensures long-term system freedom.
671
672
*Large global ecosystem*  
673
Hundreds of companies worldwide produce BACnet-certified devices:
674
* HVAC controllers  
675
* Sensors and actuators  
676
* Lighting systems  
677
* VAV and damper controllers  
678
* Energy monitoring systems  
679
* User interfaces and visualizations  
680
681
This means integrators can mix-and-match equipment from different brands without special gateways.
682
683
*Interoperability by design*  
684
Because BACnet defines standard object types and required properties, devices share:
685
* Common naming conventions  
686
* Common alarm/event handling behavior  
687
* Standard scheduling objects  
688
* Standard data types  
689
690
This makes exchanging live data straightforward and predictable.
691
692
*Efficient Event-Driven Communication with COV*  
693
Rather than constantly polling for updates, BACnet supports **Change of Value (COV)** subscriptions:
694
* A device notifies subscribers only when a value *actually changes*  
695
* No wasted network traffic  
696
* Faster updates for dynamic values  
697
* Lower CPU and bandwidth usage  
698
* Ideal for large systems or wireless deployments
699
700
COV is one of BACnet’s biggest advantages over legacy systems that rely on heavy cyclic polling.
701
702
*Rich Metadata Built Into the Protocol*  
703
BACnet objects include a wide range of metadata:
704
* Object Name  
705
* Description  
706
* Units  
707
* Engineering limits  
708
* Reliability state  
709
* Status flags  
710
* Priority array  
711
* Object type  
712
713
Metadata allows tools like DTXr to:
714
* Auto-discover device capabilities  
715
* Display real names and units  
716
* Visualize systems without custom drivers  
717
* Auto-generate controls and dashboards  
718
719
This reduces engineering time and improves clarity for end users.
720
721
---
722
723
h3. Interoperability and Vendor Collaboration
724
725
BACnet has a long-standing interoperability testing ecosystem:
726
727
* *BACnet Testing Laboratories (BTL)*  
728
  Certifies devices against standardized profiles, ensuring correct communication.
729
730
* *BTL Listings*  
731
  Public database of certified devices that work together reliably.
732
733
* *Plugfests*  
734
  Manufacturers meet twice per year to test their devices against each other in real networks.
735
736
The result:
737
* Multi-brand BACnet systems work reliably  
738
* Integration cost is lower  
739
* Long-term compatibility is ensured  
740
* Devices can be replaced without redesigning the entire system  
741
742
BACnet is one of the strongest and most mature interoperability ecosystems in the automation industry.
743
744
---
745
746
h3. Why BACnet Works Exceptionally Well With DTXr
747
748
DTXr is built around BACnet’s strengths:
749
* Automatic discovery of BACnet devices  
750
* Real-time event and alarm handling  
751
* Full COV support  
752
* Multi-priority writing of Present Value  
753
* Automatic metadata integration (names, units, descriptions)  
754
* Native schedule editor compatible with BACnet Schedule objects  
755
* BACnet notifications shown directly in the interface  
756
757
DTXr can be used as:
758
* A BACnet central controller  
759
* A visualization/HMI layer  
760
* A programming environment (Code + Blocks)  
761
* A diagnostics tool for technicians  
762
* A multi-device integration and commissioning tool  
763
764
DTXr leverages the power of BACnet without requiring advanced protocol knowledge from the user.
765
766
---
767 76 David Fredriksson
768
* Davitor Advantage
769
** _TBD..._
770
771 1 Torbjorn Carlqvist Admin
* Wireless Mesh
772 76 David Fredriksson
** _TBD..._
773 1 Torbjorn Carlqvist Admin
774 76 David Fredriksson
* Bluetooth
775 1 Torbjorn Carlqvist Admin
** _TBD..._
776 76 David Fredriksson
777
* External Database Access
778
** _TBD..._
779 1 Torbjorn Carlqvist Admin
780 76 David Fredriksson
* File Integration
781 1 Torbjorn Carlqvist Admin
** _TBD..._
782 76 David Fredriksson
783
* HTTP
784
** _TBD..._
785 1 Torbjorn Carlqvist Admin
786 76 David Fredriksson
* LION Interface
787
** _TBD..._
788
789
* IoT HUB (BETA)
790 1 Torbjorn Carlqvist Admin
** _TBD..._
791 76 David Fredriksson
792 1 Torbjorn Carlqvist Admin
h3. User's Guide
793
794
h2. DTXr Web Interface – End User Documentation
795
796
*Important:*  
797
When selecting a *remote BACnet device*, the object list and notifications *do not update automatically*.  
798
You must press *@Objects → Refresh@* to reload the data.
799
800
For the *local device that hosts the web page*, all updates (property changes, events, alarms) are received *in real time*.
801
802
---
803
804
805
h3. Developer's Guide
806
807
[[IDE|IDE walk through]]
808
[[Javascript|The DTXr Javascript guide]]
809
[[Blockly|Blockly tutorials]]