Using btmon.py to collect readings by polling errors out

Post any 3rd party software here.
Post Reply
nbegin
Posts: 31
Joined: Sun Dec 19, 2010 12:07 am

Using btmon.py to collect readings by polling errors out

Post by nbegin » Wed Feb 12, 2014 2:32 pm

Hi Matthew, just a quick question on a problem I am seeing.

I have one instance of btmon.py (v3.0.7) that polls the GEM every 30s for readings. After a short while, maybe 3-5 mins. I start getting "ord() expected a character, but string of length 0 found" showing in the log and btmon is no longer getting data.

Have you seen this before? :?:

My next step is to run another instance of btmon that reads the database and sends to SEG.

I used to run btmon in blocking mode and had the GEM send the data, but wanted to 1) increase the frequency of the collection and 2) allow another program to access the GEM and 3) decouple the collection of the data from the sending to SEG.
nbegin
Posts: 31
Joined: Sun Dec 19, 2010 12:07 am

Re: Using btmon.py to collect readings by polling errors out

Post by nbegin » Thu Feb 13, 2014 1:01 am

I was finally able to get the polling working - I think I still had real time packets still turn on.

But I can't seem to read from the SQLITE database. It keeps looking for the wrong file and the wrong table. I've tried the defaults and get the output below. I've tried the specifying the file and table name in the config file and still get the output below.

2014/02/13 00:03:53 btmon: 3.0.7
2014/02/13 00:03:53 python: 2.7.6 (default, Nov 11 2013, 14:38:20)
[GCC 4.2.0]
2014/02/13 00:03:53 platform: linux2
2014/02/13 00:03:53 device type: gem
2014/02/13 00:03:53 device list: ['']
2014/02/13 00:03:53 packet format: gem48ptbin
2014/02/13 00:03:53 schema: counters
2014/02/13 00:03:53 buffer size: 120
2014/02/13 00:03:53 DB: polling interval: 60 seconds
2014/02/13 00:03:53 DB: table: ecm.db
2014/02/13 00:03:53 SQLITE: file: gem48ptbin_counters
2014/02/13 00:03:53 SEG: upload period: 90
2014/02/13 00:03:53 SEG: url: http://api.smartenergygroups.com/api_sites/stream
2014/02/13 00:03:53 SEG: token: --------------
2014/02/13 00:03:53 SEG: map:
2014/02/13 00:03:53 packet format is GEM48PTBinaryPacket
2014/02/13 00:03:53 using collector SqliteCollector
2014/02/13 00:03:53 using 1 processors:
2014/02/13 00:03:53 SmartEnergyGroupsProcessor
2014/02/13 00:03:53 setup SqliteCollector
2014/02/13 00:03:53 no such table: ecm.db

Config file with and without sqlite params:

[source]
device_type = gem
#sqlite_src_file = ecm.db
#sqlite_src_table = gem48ptbin_counters
sqlite_read = true
Post Reply