Project

General

Profile

DTXr doc » History » Version 17

Torbjorn Carlqvist Admin, 09/07/2021 09:04 PM

1 1 Torbjorn Carlqvist Admin
h1. DTXr doc
2
3 5 Torbjorn Carlqvist Admin
h3. Installation
4 2 Torbjorn Carlqvist Admin
5 6 Torbjorn Carlqvist Admin
6
* System Requirements
7
DTXr can run on any machine that can run Java 11 and has sufficient with RAM and disk capacity.
8
Absolute minimum 512Mbyte of RAM and 200Mb of disk space. But best is >1GByte of RAM and 1Gbyte of disk space available for DTXr runtime alone.
9 8 Torbjorn Carlqvist Admin
A good choice is a Raspberry 2,3 or 4 with >1GByte on board and a >8Gbyte SD installed and of course any PC/Server works equally good.
10 6 Torbjorn Carlqvist Admin
11
* Network Requirements
12 9 Torbjorn Carlqvist Admin
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.
13 6 Torbjorn Carlqvist Admin
14 10 Torbjorn Carlqvist Admin
* Download DTXr software packages
15
Currently only customers to DAVITOR can download DTXr. Contact info@davitor.com for purchase information.
16
17 15 Torbjorn Carlqvist Admin
* Install on Linux
18
** For Raspberry with Rasbian OS there is special install scripts, please follow these steps:
19
### _TBD..._
20
** For other Linux distributions follow this steps
21
### _TBD..._
22
23
* Install on Windows
24
** Follow these steps:
25
### _TBD..._
26
27 11 Torbjorn Carlqvist Admin
h3. Setup
28 10 Torbjorn Carlqvist Admin
29 11 Torbjorn Carlqvist Admin
DTXr is setup via Menu -> Setup page.
30 1 Torbjorn Carlqvist Admin
31 11 Torbjorn Carlqvist Admin
* System
32 13 Torbjorn Carlqvist Admin
** Administrator password - Password for the default (and not changeable) account "admin". Default is "davitor".
33
** Operator username - Username for the typical user of any HMI developed on this device. Typically a machine operator. [Optional]
34
** Operator password - Password for the operator user. [Optional]
35
** Operator start page - Set any web page in the project folder that will automatically shown on an operator login. [Optional]
36
** Log Level - The system severity level for the system_app.log in /Logs tree directory.
37 11 Torbjorn Carlqvist Admin
38
* BACnet
39 14 Torbjorn Carlqvist Admin
** _TBD..._
40 11 Torbjorn Carlqvist Admin
41
* Davitor Advantage
42 14 Torbjorn Carlqvist Admin
** _TBD..._
43 11 Torbjorn Carlqvist Admin
44
* Wireless Mesh
45 14 Torbjorn Carlqvist Admin
** _TBD..._
46 11 Torbjorn Carlqvist Admin
47
* Bluetooth
48 14 Torbjorn Carlqvist Admin
** _TBD..._
49 11 Torbjorn Carlqvist Admin
50
* External Database Access
51 14 Torbjorn Carlqvist Admin
** _TBD..._
52 11 Torbjorn Carlqvist Admin
53
* File Integration
54 14 Torbjorn Carlqvist Admin
** _TBD..._
55 11 Torbjorn Carlqvist Admin
56
* HTTP
57 14 Torbjorn Carlqvist Admin
** _TBD..._
58 11 Torbjorn Carlqvist Admin
59
* LION Interface
60 14 Torbjorn Carlqvist Admin
** _TBD..._
61 11 Torbjorn Carlqvist Admin
62
* IoT HUB (BETA)
63 14 Torbjorn Carlqvist Admin
** _TBD..._
64 11 Torbjorn Carlqvist Admin
65 1 Torbjorn Carlqvist Admin
66
h3. User's Guide
67 2 Torbjorn Carlqvist Admin
68 14 Torbjorn Carlqvist Admin
* _TBD..._
69
70 5 Torbjorn Carlqvist Admin
h3. Developer's Guide
71 14 Torbjorn Carlqvist Admin
72 17 Torbjorn Carlqvist Admin
* Javascript
73
74
[[#Commands|Commands]]
75
[[#Events|Events]]
76
77
---
78
79
h2. Commands
80
81
82
h3. *print*  - Prints a message to footer log window as well as the automation.log file
83
84
<pre><code class="javascript">print("hello");</code></pre>
85
86
h3. *readProperty*  - Reads an object property value
87
88
<pre><code class="javascript">
89
/***********************************************************************************************
90
 * @param {Number} device - The device id
91
 * @param {Number} objectType - The object type. Both id and enumerated names can be used.
92
 * @param {Number} objectInstance - The object instance. Must be a positive number.
93
 * @param {Number} propertyId - The property id. Both id and enumerated names can be used.
94
 * @return {*} The result can be of any type. It is dependent of the object type and property. Primitive values such as numbers and string but also JSON formatted text.
95
 ***********************************************************************************************/
96
97
//Reads a present value from analog input object 0.
98
Controller.readProperty(85343,analogInput,0,presentValue);
99
100
//Use the result to print and in logic
101
res = Controller.readProperty(85343,analogInput,0,presentValue);
102
print(res);
103
if ( res > 0 ){
104
  print("value larger than 0!");
105
}
106
</code></pre>
107
108
h3. *eventSubscribe*  - Send request for intrinsic reporting notification to a remote node.
109
110
<pre><code class="javascript">
111
/***********************************************************************************************
112
 * @param {Number} device - The device id
113
 * @param {Number} notificationClass - This is the instance of the remote notification class where the request will be handled.
114
 * @return N/A
115
 ***********************************************************************************************/
116
117
//Request for notification from device 84757 and notification class 0
118
Controller.eventSubscribe(84757,0);
119
120
</code></pre>
121
122
h2. Events
123
124
h3. *eventNotificationReceived* - Called when an intrinsic report notification is received.
125
126
<pre><code class="javascript">
127
/***********************************************************************************************
128
 * @param {Number} processIdentifier - Event process on the caller side
129
 * @param {Number} initiatingDevice - The device that send the event
130
 * @param {Number} object - The source object in readable format 
131
 * @param {Number} objectType - The source object of the event
132
 * @param {Number} objectInstance - The instance of source object
133
 * @param {String} timeStampUTC - Event timestamp in UTC format
134
 * @param {Number} notificationClass - The NC handling this event on remote node
135
 * @param {Number} priority - Event priority
136
 * @param {Number} eventType - The type of event received
137
 * @param {String} messageText - Readable notification message
138
 * @param {Number} notifyType - Type of notification [0:Event,1:Alamr,2:AckNotif]
139
 * @param {Boolean} ackRequired - true if ack is required to clear this event on the remote node
140
 * @param {String} fromState - The previous state
141
 * @param {String} toState - The current state after the change
142
 * @param {Object} eventValues - A map of specific map of values for the particular eventType
143
 ***********************************************************************************************/
144
function eventNotificationReceived(processIdentifier,initiatingDevice,object,objectType,objectInstance,timeStampUTC,notificationClass,priority,eventType,messageText,notifyType,ackRequired,fromState,toState,eventValues){
145
//Use this event to act on notifications that is set to be subscribed by this device.
146
}
147
</code></pre>