Issues setting up KlimaLogg Pro with Weewx 3.4.0 on Ubuntu

230 views
Skip to first unread message

Stephan Hochhaus

unread,
Feb 18, 2016, 1:50:33 PM2/18/16
to weewx-user
Hello y'all,

I just got a TFA KlimaLogg Pro and decided to pair it with Weewx on a Ubuntu 15.10 Zotac Zbox server. So far so good, I followed the instructions to get the driver into weewx, made the configuration changes, but when I attempt to perform the USB sync I run into error messages related to historical data:

Extract from the syslog:

Feb 18 19:40:10 zbox weewx[20361]: KlimaLogg: RFComm: To pair (synchronize) and preset a logger channel, press USB button until the unit beeps; then (re)start weewx immediately
Feb 18 19:40:10 zbox weewx[20361]: KlimaLogg: RFComm: generateResponse: console not paired (synchronized), attempting to pair to 0x011c
Feb 18 19:40:10 zbox weewx[20361]: KlimaLogg: RFComm: console is paired (synchronized) to device with ID 011c and logger channel 1
Feb 18 19:40:13 zbox weewx[20361]: KlimaLogg: RFComm: ToDateTime: bogus date for HistoryData1: error status in buffer
Feb 18 19:40:13 zbox weewx[20361]: KlimaLogg: RFComm: handleHistoryData: no start date known (empty database), use number stored (0)
Feb 18 19:40:13 zbox weewx[20361]: KlimaLogg: RFComm: handleHistoryData: records cached=0, records skipped=0, next=2
Feb 18 19:40:23 zbox weewx[20361]: KlimaLogg: MainThread: Scanned 0 record sets: current=2 latest=2 remaining=0
Feb 18 19:40:23 zbox weewx[20361]: KlimaLogg: MainThread: Found -1 historical records
Feb 18 19:40:23 zbox weewx[20361]: engine: Caught unrecoverable exception in engine:
Feb 18 19:40:23 zbox weewx[20361]:     ****  local variable 'this_ts' referenced before assignment
Feb 18 19:40:23 zbox weewx[20361]:     ****  Traceback (most recent call last):
Feb 18 19:40:23 zbox weewx[20361]:     ****    File "/usr/share/weewx/weewx/engine.py", line 861, in main
Feb 18 19:40:23 zbox weewx[20361]:     ****      engine.run()
Feb 18 19:40:23 zbox weewx[20361]:     ****    File "/usr/share/weewx/weewx/engine.py", line 154, in run
Feb 18 19:40:23 zbox weewx[20361]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Feb 18 19:40:23 zbox weewx[20361]:     ****    File "/usr/share/weewx/weewx/engine.py", line 218, in dispatchEvent
Feb 18 19:40:23 zbox weewx[20361]:     ****      callback(event)
Feb 18 19:40:23 zbox weewx[20361]:     ****    File "/usr/share/weewx/weewx/engine.py", line 519, in startup
Feb 18 19:40:23 zbox weewx[20361]:     ****      self._catchup(self.engine.console.genStartupRecords)
Feb 18 19:40:23 zbox weewx[20361]:     ****    File "/usr/share/weewx/weewx/engine.py", line 631, in _catchup
Feb 18 19:40:23 zbox weewx[20361]:     ****      for record in generator(lastgood_ts):
Feb 18 19:40:23 zbox weewx[20361]:     ****    File "/usr/share/weewx/user/kl.py", line 1896, in genStartupRecords
Feb 18 19:40:23 zbox weewx[20361]:     ****      store_period = int(time.time()) - this_ts
Feb 18 19:40:23 zbox weewx[20361]:     ****  UnboundLocalError: local variable 'this_ts' referenced before assignment
Feb 18 19:40:23 zbox weewx[20361]:     ****  Exiting.

Before connecting the logger I made a factory reset to ensure there are no historical data points that could mess things up. However, there still appears to be some bogus data.

Has anyone ever seen a similar behavior? Is it me being too stupid to get the sync up or am I simply missing a specific python package perhaps?

Any help is greatly appreciated. Thanks!

Stephan

Luc Heijst

unread,
Feb 18, 2016, 2:16:17 PM2/18/16
to weewx-user
Hi Stephan,

The driver should find at least one good historical record, but found none.
Please check the date and time settings on your KlimaLogg Pro and when correct, let the KlimaLogg run for at least half an hour. You should then have at least two historical records.
Then start weewx again and see how it goes.

Luc

Stephan Hochhaus

unread,
Feb 20, 2016, 8:18:52 AM2/20/16
to weewx...@googlegroups.com
Thank you, Luc,

thank you very much, this helped! It appears I am taking baby steps to settings things up properly ;)
Now the sync worked very well, but with my more or less out-of-the-box config I run into the following issue:

Feb 20 12:50:22 zbox weewx[28102]: cheetahgenerator: Generated 1 files for report kl in 0.02 seconds
Feb 20 12:50:22 zbox weewx[28102]: reportengine: Caught unrecoverable exception in generator weewx.imagegenerator.ImageGenerator
Feb 20 12:50:22 zbox weewx[28102]:         ****  no such column: temp0
Feb 20 12:50:22 zbox weewx[28102]:         ****  Traceback (most recent call last):
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 140, in run
Feb 20 12:50:22 zbox weewx[28102]:         ****      obj.start()
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 170, in start
Feb 20 12:50:22 zbox weewx[28102]:         ****      self.run()
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 31, in run
Feb 20 12:50:22 zbox weewx[28102]:         ****      self.genImages(self.gen_ts)
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 138, in genImages
Feb 20 12:50:22 zbox weewx[28102]:         ****      aggregate_interval=aggregate_interval)
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weewx/manager.py", line 496, in getSqlVectors
Feb 20 12:50:22 zbox weewx[28102]:         ****      aggregate_type, aggregate_interval)
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weewx/manager.py", line 742, in _getSqlVectors
Feb 20 12:50:22 zbox weewx[28102]:         ****      for _rec in _cursor.execute(sql_str, (startstamp, stopstamp)):
Feb 20 12:50:22 zbox weewx[28102]:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 37, in guarded_fn
Feb 20 12:50:22 zbox weewx[28102]:         ****      raise weedb.OperationalError(e)
Feb 20 12:50:22 zbox weewx[28102]:         ****  OperationalError: no such column: temp0
Feb 20 12:50:22 zbox weewx[28102]:         ****  Generator terminated...
Feb 20 12:55:22 zbox weewx[28102]: manager: added record 2016-02-20 12:55:00 CET (1455969300) to database 'weewx.sdb'
Feb 20 12:55:22 zbox weewx[28102]: manager: added record 2016-02-20 12:55:00 CET (1455969300) to daily summary in 'weewx.sdb'
Feb 20 12:55:22 zbox weewx[28102]: cheetahgenerator: Generated 1 files for report kl in 0.02 seconds

Not sure where to look, the /etc/weewx/weewx.conf does not mention this temp0 so I'm happy for pointers in the right direction :)

Cheers!
Stephan

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/kCsd72EQtL8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

L.J.M. Heijst

unread,
Feb 20, 2016, 8:26:55 AM2/20/16
to Stephan Hochhaus
Stephan,

  • Stop weewx
  • Rename or delete file weewx.sdb (the weewx sqlite database)
  • Start weewx


Luc

PS. Probably you have started Simulator which created a databse type KlimaLogg can't understand.
>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/kCsd72EQtL8/unsubscribe <https://groups.google.com/d/topic/weewx-user/kCsd72EQtL8/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to 
weewx-user+...@googlegroups.com <mailto:weewx-user+...@googlegroups.com>.
>> For more options, visit 
https://groups.google.com/d/optout <https://groups.google.com/d/optout>.


 
Dit e-mailbericht is verzonden vanaf een virusvrije computer die wordt beschermd door Avast.
www.avast.com

Stephan Hochhaus

unread,
Feb 20, 2016, 8:41:26 AM2/20/16
to weewx...@googlegroups.com
Hello Luc,

again, thanks so much - now everything is working as expected!
I hope this may help others who are in a similar situation :)

Cheers!
Stephan
>.


To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/kCsd72EQtL8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luc Heijst

unread,
Feb 20, 2016, 3:26:50 PM2/20/16
to weewx-user
Hi Stephan,

You included a smime.p7s file with your last mail. Googlin p7s told me it's a Digitally Signed Email Message.

What can/should I do with it?

Cheers,
Luc

Stephan Hochhaus

unread,
Feb 21, 2016, 11:33:29 AM2/21/16
to weewx...@googlegroups.com
Hello Luc,

tl;dr - there is no need to do anything with the p7s file, simply ignore it, sorry to have caused confusion.

the p7s file gets attached automatically to all my mails. It is a signature so you can verify that the mail was actually sent by me. It could also be used to send encrypted emails so not everyone can easily peek at what I'm writing. Actually my mail client takes care of all that for me, so I wasn't fully aware that some people see a file attached.

Basically S/MIME mail encryption feels a bit simpler to me than GnuPG or GPG mail signing, which you may already know from the code signing aspects.
If you're curious to know a little more you can check out

Cheers!
Stephan

Reply all
Reply to author
Forward
0 new messages