Telem-app configuration: Difference between revisions
No edit summary |
|||
Line 26: | Line 26: | ||
|- | |- | ||
| conf.xml.path | | conf.xml.path | ||
| / | | usrWorkingDirectory / "config.xml | ||
| Path to XML setup file | | Path to XML setup file | ||
|- | |- | ||
Line 34: | Line 34: | ||
|- | |- | ||
| conf.bin.path | | conf.bin.path | ||
| / | | usrWorkingDirectory / "gwSetup.bin | ||
| Binary setup file | | Binary setup file | ||
|- | |- | ||
| conf.log.path | | conf.log.path | ||
| / | | usrWorkingDirectory / "log-conf.xml | ||
| Logging configuration file | | Logging configuration file | ||
|- | |- | ||
Line 58: | Line 58: | ||
|- | |- | ||
| db.backup.path | | db.backup.path | ||
| / | | varWorkingDirectory / "object_backup.xml | ||
| Path to object backup XML file | | Path to object backup XML file | ||
|- | |- | ||
| db.sync.interval | | db.sync.interval | ||
| 00: | | 00:00:20 | ||
| Database sync interval | | Database sync interval | ||
|- | |- | ||
Line 90: | Line 90: | ||
|- | |- | ||
| log.telem.path | | log.telem.path | ||
| / | | varWorkingDirectory / "log | ||
| Path to log telem | | Path to log telem | ||
|- | |- | ||
| sms.local.path | | sms.local.path | ||
| / | | varWorkingDirectory / "sms | ||
| Path to local sms directory | | Path to local sms directory | ||
|- | |- | ||
| var.telem.path | | var.telem.path | ||
| | | varWorkingDirectory | ||
| Path to temporary /var/local/telem directory | | Path to temporary /var/local/telem directory | ||
|- | |- | ||
Line 106: | Line 106: | ||
|- | |- | ||
| cmd.path | | cmd.path | ||
| | | varWorkingDirectory | ||
| Path to cmd file directory | | Path to cmd file directory | ||
|- | |- | ||
Line 114: | Line 114: | ||
|- | |- | ||
| conf.xml.custom.path | | conf.xml.custom.path | ||
| / | | usrWorkingDirectory / "custom.xml | ||
| Path to custom XML setup file | | Path to custom XML setup file | ||
|- | |- | ||
Line 134: | Line 134: | ||
|- | |- | ||
| feature.list.path | | feature.list.path | ||
| / | | varWorkingDirectory / "enabled_features | ||
| GWS check for available features via this file | | GWS check for available features via this file | ||
|- | |- | ||
Line 156: | Line 156: | ||
| 24.684477 | | 24.684477 | ||
| Device longitude | | Device longitude | ||
|- | |||
| start-count | |||
| varWorkingDirectory / "stats/app_start_count | |||
| App start count file | |||
|- | |||
| total-start-count | |||
| varWorkingDirectory / "stats/app_start_count_total | |||
| App start count total file | |||
|- | |||
| date-time-zone-spec.path | |||
| "Time zone info file") | |||
| Time zone info file | |||
|- | |- | ||
| watchdog | | watchdog | ||
Line 228: | Line 240: | ||
| 15 | | 15 | ||
| How many objects should be polled from modbus before issuing protocol change on channel | | How many objects should be polled from modbus before issuing protocol change on channel | ||
|- | |||
| protocol.opc-ua.path | |||
| usrWorkingDirectory / "protocol/opc-ua | |||
| For persistent Client writes in OPC UA Server and Rules | |||
|- | |||
| protocol.opc-ua.https-client.path | |||
| /etc/protocol/opc-ua/https-client/ | |||
| For persistent Client writes in OPC UA Server and Rules | |||
|- | |||
| webserver.lcbc.cls.addr | |||
| 0 | |||
| Value of this ai is returned in measurement array at /cls.json | |||
|- | |- | ||
| filter.integral.recalc-period | | filter.integral.recalc-period | ||
| 10 | | 10 | ||
| How frequently should the interval(@ai, @di) recalculate itself in seconds | | How frequently should the interval(@ai, @di) recalculate itself in seconds | ||
|- | |- | ||
| filter.integral.recalc-start | | filter.integral.recalc-start | ||
Line 244: | Line 268: | ||
| false | | false | ||
| Use interval value for GI instead of offset | | Use interval value for GI instead of offset | ||
|- | |||
| sensors.light.multiplier | |||
| 2.59724 | |||
| Value from 1M/1024/Rsens*12.5, if Rsense is 4.7kOhm, then we get ~2.59724 | |||
|- | |||
| sensors.light.window-size | |||
| 19 | |||
| Rolling mean window size, or in other words, how many samples to average | |||
|- | |- | ||
| xml | | xml | ||
Line 286: | Line 318: | ||
'''NB! This feature is available in firmware starting from 2017.10.31''' | '''NB! This feature is available in firmware starting from 2017.10.31''' | ||
== Assign CLS AI Object == | |||
Add the follown lines to /etc/telem-gw.user.conf: | |||
<pre> | |||
webserver.lcbc.cls.addr=2001 | |||
</pre> | |||
'''NB! This feature is not available in any stable firmware (18.03.2020)''' | |||
= Resetting = | = Resetting = |
Revision as of 10:40, 18 March 2020
MarkTomm 31. oktoober 2017, kell 15:41 (EET)
This section applies to GW6e and GWM.
Feature
telem-app functionality can be tweaked via command line arguments and config files
All arguments
Argument | Default value | Description |
---|---|---|
help | N/A | Show help message |
conf-path | /etc/telem-gw.conf | Configuration file |
no-watchdog | N/A | Disable watchdog |
conf.xml.path | usrWorkingDirectory / "config.xml | Path to XML setup file |
hw-conf | path | Hardware configuration file |
conf.bin.path | usrWorkingDirectory / "gwSetup.bin | Binary setup file |
conf.log.path | usrWorkingDirectory / "log-conf.xml | Logging configuration file |
path.root | / | Path to virtual system / |
path.sys.bus.w1 | /sys/bus/w1/devices | Path to /sys/bus/w1/devices |
www.path | /var/www | Path to WWW dir |
svg.screens.path | /var/www/svg/screens | Path to SVG screens dir |
db.backup.path | varWorkingDirectory / "object_backup.xml | Path to object backup XML file |
db.sync.interval | 00:00:20 | Database sync interval |
conf.user.path | /etc/telem-gw.user.conf | Configuration file provided by user |
dsp.timesync.receiving | bool | Allow receiving of timesync from DSP |
ssl.server.keys.path | /etc/ssl/private | Path to SSL server key directory |
ssl.server.cert.path | /etc/ssl/certs | Path to SSL server directory |
ssl.bin | /usr/bin/openssl | Path to openssl binary |
log.var.path | /var/log | Path to var log |
log.telem.path | varWorkingDirectory / "log | Path to log telem |
sms.local.path | varWorkingDirectory / "sms | Path to local sms directory |
var.telem.path | varWorkingDirectory | Path to temporary /var/local/telem directory |
sms.temp.path | /tmp/sms | Path to temporary sms directory |
cmd.path | varWorkingDirectory | Path to cmd file directory |
log.root | Gateway | Root logger name |
conf.xml.custom.path | usrWorkingDirectory / "custom.xml | Path to custom XML setup file |
timezone.default | EET+2EEST+1,M3.5.0/03:00:00,M10.5.0/04:00:00 | Default timezone for application |
www.custom.path | path | Path to XML setup file |
www.port.debug.path | path | Path to file where webserver port number will be put |
thread.count | 2 | Thread count for io-service thread group |
feature.list.path | varWorkingDirectory / "enabled_features | GWS check for available features via this file |
channel.sleepms.default | 1 | Default channel sleep in milliseconds (1..20) |
portio.sleepms | 1 | Portio sleep in milliseconds (1..20) |
nice | 0 | Default nice value (0..19) |
latitude | 59.411780 | Device latitude |
longitude | 24.684477 | Device longitude |
start-count | varWorkingDirectory / "stats/app_start_count | App start count file |
total-start-count | varWorkingDirectory / "stats/app_start_count_total | App start count total file |
date-time-zone-spec.path | "Time zone info file") | Time zone info file |
watchdog | true | Is Watchdog enabled |
watchdog.util | true | (deprecated) Use external watchdog utility |
watchdog.interval | 00:00:45 | System watchdog kick interval |
watchdog.vpath | /tmp/.telem_watchdog | Virtual watchdog path |
watchdog.dev | /dev/watchdog | (deprecated) Watchdog device path |
protocol.icmp.config-path | /etc/pinger/ | Pinger configuration path |
protocol.icmp.procfs | /tmp/pingers | procfs directory for pingers |
ordercode.batterypowered.path | /var/local/telem/ordercode/battery_powered | If file exists, device will be in battery powered mode |
protocol.session.max-length | 00:30:00 | Maximum session length |
protocol.session.retry-period | 00:15:00 | Session retry period |
protocol.session.keep-alive | 00:00:30 | Session keep-alive |
protocol.session.connect-timeout | 00:05:00 | Connect timeout |
protocol.session.period | 24:00:00 | Next retry after successful session |
protocol.iec101b.tdc-workaround | true | IEC101-balanced TDC workaround |
protocol.iec101b.dfc-delay | 0 | IEC101-balanced DataFlowControl delay |
protocol.iec104.k | 12 | Write depth (1-32767sec) |
protocol.iec104.w | 8 | Unacked read depth (1-32767sec) |
protocol.modbus.sequential-poll-cnt | 15 | How many objects should be polled from modbus before issuing protocol change on channel |
protocol.opc-ua.path | usrWorkingDirectory / "protocol/opc-ua | For persistent Client writes in OPC UA Server and Rules |
protocol.opc-ua.https-client.path | /etc/protocol/opc-ua/https-client/ | For persistent Client writes in OPC UA Server and Rules |
webserver.lcbc.cls.addr | 0 | Value of this ai is returned in measurement array at /cls.json |
filter.integral.recalc-period | 10 | How frequently should the interval(@ai, @di) recalculate itself in seconds |
filter.integral.recalc-start | 120 | When should interval recalculations start after app init in seconds |
protocol.periodical-gi.offset | 00:05:00 | GI offset every hour or interval if protocol.periodical-gi.use-interval is true |
protocol.periodical-gi.use-interval | false | Use interval value for GI instead of offset |
sensors.light.multiplier | 2.59724 | Value from 1M/1024/Rsens*12.5, if Rsense is 4.7kOhm, then we get ~2.59724 |
sensors.light.window-size | 19 | Rolling mean window size, or in other words, how many samples to average |
xml | N/A | XML enabled |
new-setup | N/A | Use new setup |
Config file
The easiest way to add/override configuration options is to modify the /etc/telem-gw.user.conf file
This config file is checked by telem-app by default without any additional command line arguments
Enable Periodical GI with predefined time interval
Add the follown lines to /etc/telem-gw.user.conf:
protocol.periodical-gi.use-interval=1 protocol.periodical-gi.offset=00:02:00
This will indicate to telem-app that it should do a Periodical GI every 2 minutes instead of every hour at 00:05:00.
If protocol.periodical-gi.offset
is left out, then the default value of 00:05:00 is used.
If protocol.periodical-gi.use-interval
is not set, then Periodical GI is done every hour at value assigned to protocol.periodical-gi.offset
. E.g. in case of default 00:05:00 Periodical GI will be issued every hour at xx:05:00.
NB! This feature is available in firmware starting from 2017.09.05
Change Integral Filter recalculation interval
Add the follown lines to /etc/telem-gw.user.conf:
filter.integral.recalc-period=1
to change to 1 second (10 is default)
NB! This feature is available in firmware starting from 2017.10.31
Assign CLS AI Object
Add the follown lines to /etc/telem-gw.user.conf:
webserver.lcbc.cls.addr=2001
NB! This feature is not available in any stable firmware (18.03.2020)
Resetting
Use case: If for example by some invalid logic or fault in telem-app some AI values end up as NaN all the time. And restart or clear buffers does not help.
To fully remove all object info from telem-app in device SSH to the device, switch to root user and do the following steps:
$ /etc/init.d/S81telem stop $ rm -f /var/local/telem/object_backup* $ /etc/init.d/S81telem start
Note that rerunning telem app from command line like that renders upcoming console.log files unreadable for martem user. To alleviate the issue run the following as root:
$ chown martem:gws /var/log/telem/console*