Telem-app configuration

From Phobos Wiki
Jump to navigation Jump to search

MarkTomm 31. oktoober 2017, kell 15:41 (EET)

This section applies to GW6e and GWM.


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 / "setup.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.sqlite.runner.out Path to telem-gw-bd-runner output
db.backup.path varWorkingDirectory / "object_backup.xml Path to object backup XML file
db.sqlite.path varWorkingDirectory / ".telem-db Path to object sqlite db file
db.sqlite.delete.path varWorkingDirectory / "cleardb_1 Path to file that makes telem-app delete db
db.sqlite.synchronous 1 Sqlite PRAGMA synchronous
db.sqlite.journalmode WAL Sqlite PRAGMA journal_mode
db.sqlite.autovacuum 0 Sqlite PRAGMA auto_vacuum
db.sqlite.cachesize -8000 Sqlite PRAGMA cache_size
db.sqlite.pagesize 65536 Sqlite PRAGMA page_size
db.sqlite.walautocheckpoint 1000 Sqlite PRAGMA wal_autocheckpoint
db.sqlite.journalsizelimit 100000000 Sqlite PRAGMA journal_size_limit
db.sqlite.buffers.maxsize 300000 Sqlite max db buffer table entries limit
db.sqlite.opc-ua-history.maxsize 100000 Sqlite max db buffer table entries limit
db.sync.interval 00:00:01 Database sync interval
db.sync.interval 00:00:20 Database sync interval "Run db write thread once and exit") Run db write thread once and exit
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
log.counters false Option to log counters
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 EET+2EEST+1,M3.5.0/03:00:00,M10.5.0/04:00:00 Set by app furing runtime
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
core.dump.path coreDumpFile Memory dump location
evgen.event-per-minute 60 How many events each data point generates per minute
force-binary false Force telem-app to use binary conf
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 /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.path "For VHPReady schedules persistance") For VHPReady schedules persistance
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
protocol.opc-ua.https-peer-verif true Toggle peer verification
protocol.opc-ua.session.timeout 120000 Session timeout ms. 12000ms default
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
dali.i2c.bus /dev/i2c-main Path to i2c device
dali.i2c.addr 0x08 Dali i2c device address
dali.priority.all 0 Dali default priority (for testing, 0: by standard, 1-5: force priority, 6-7: invalid, but may work)
dali.bus0.i2c.bus /dev/i2c-main Same as dali.i2c.bus
dali.bus0.i2c.addr 0x08 Same as dali.i2c.addr
dali.bus0.priority.all 0 Same as dali.priority.all
dali.bus1.i2c.bus /dev/i2c-main Same as dali.i2c.bus
dali.bus1.i2c.addr 0x0b Same as dali.i2c.addr
dali.bus1.priority.all 0 Same as dali.priority.all
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:


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:


to change to 1 second (10 is default)

NB! This feature is available in firmware starting from 2017.10.31

Assign AI Object for UI CLS source

Add the follown lines to /etc/telem-gw.user.conf:


2001 is the IOA of the AI value that will be available via /cls.json endpoint

In the context of AGC, this IOA is considered as AI_LLS, local light source.

In the context of SL UI, this is Central light sensor value.


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*