Hi Sandeen.
I'm trying to implement your setup and I'm getting stuck on the 2nd host part. For first implementation I'm using just one rPi running 2 instances of btmon. 1st script is logging to localhost mysql without errors. Second instance connecting to database (even if the database doesn't exist) gives me this:
./btmon.py --config-file=btmon-upload.cfg -p
2014/12/02 22:32:53 device type: ecm1240
2014/12/02 22:32:53 device list: ['fc']
2014/12/02 22:32:53 packet format: ecm1240bin
2014/12/02 22:32:53 schema: counters
Traceback (most recent call last):
File "./btmon.py", line 3880, in <module>
options.mysql_poll_interval or DB_POLL_INTERVAL)
File "./btmon.py", line 2273, in __init__
super(MySQLCollector, self).__init__(database+'.'+table, poll_interval)
File "./btmon.py", line 2228, in __init__
infmsg('DB: polling interval: %d seconds' % self._poll_interval)
TypeError: %d format: a number is required, not str
If I comment out the POLL line:
mysql_read = true
#mysql_poll_interval = 60
mysql_src_host = localhost
mysql_src_user = ecmuser
mysql_src_passwd = ecmpass
mysql_src_database = ecm
mysql_src_table = ecmdata
I get this:
pi@rpi1 ~/btmon $ ./btmon.py --config-file=btmon-upload.cfg -p
2014/12/02 22:59:31 device type: ecm1240
2014/12/02 22:59:31 device list: ['fc']
2014/12/02 22:59:31 packet format: ecm1240bin
2014/12/02 22:59:31 schema: counters
2014/12/02 22:59:31 DB: polling interval: 60 seconds
2014/12/02 22:59:31 DB: table: ecm.ecmdata
2014/12/02 22:59:31 MYSQL: host: localhost
2014/12/02 22:59:31 MYSQL: username: ecmuser
2014/12/02 22:59:31 MYSQL: database: ecm
2014/12/02 22:59:31 SEG: upload period: 60
2014/12/02 22:59:31 SEG: url:
http://api.smartenergygroups.com/sites/hidden.xml
2014/12/02 22:59:31 SEG: token: hidden
2014/12/02 22:59:31 SEG: map:
No Data is making it to SEG (api trace) and it appears the script is just hanging. Verified SEG does work if I send straight from serial to SEG using btmon (avoiding MYSQL)
I've also verified that changing the sql password on btmon-upload.cfg and collect1.cfg both cause access failures.
Testing using btmon 301 and 303.
Any ideas on what I may be doing wrong?
Thanks,
Dax