Mercurial > ~darius > hgwebdir.cgi > epro
diff eprodbus.py @ 16:3338e666256b
Move DB path to top of the file with the other knobs.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 06 Dec 2021 11:27:23 +1030 |
parents | 08b61687b75f |
children | 3067bb98b482 |
line wrap: on
line diff
--- a/eprodbus.py Mon Dec 06 11:27:11 2021 +1030 +++ b/eprodbus.py Mon Dec 06 11:27:23 2021 +1030 @@ -35,6 +35,7 @@ logger.info(__file__ + " is starting up") +dbpath = '/home/root/vanlogger/log.db' port = 'ttyepro' servicename = 'com.victronenergy.battery.' + port instance = 0 @@ -168,7 +169,7 @@ s = serial.Serial('/dev/' + port, 2400, parity = 'E') s.timeout = 0.1 - dbh = sqlite3.connect('/home/root/vanlogger/log.db') + dbh = sqlite3.connect(dbpath) updater = eProUpdater(dbusservice, s, dbh)