jdiazbb / rfxcmd

Automatically exported from code.google.com/p/rfxcmd
1 stars 0 forks source link

Error when testing daemon #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
./rfxcmd.py -d /dev/ttyUSB2 -m -z -p /tmp/rfxcmd.pid

After a while i get this error

Traceback (most recent call last):
  File "./rfxcmd.py", line 2830, in <module>
    rawcmd = read_rfx()
  File "./rfxcmd.py", line 1936, in read_rfx
    decodePacket( message )
  File "./rfxcmd.py", line 1730, in decodePacket
    windchill, gust, battery, signal))
UnboundLocalError: local variable 'windchill' referenced before assignment

 ./rfxcmd.py -d /dev/ttyUSB2 -a status 
FXCMD version 0.3 Alpha
------------------------------------------------
Send                    = 0D 00 00 00 02 00 00 00 00 00 00 00 00 00
Date/Time               = 2012-12-19 22:09:18
Packet Length           = 0D
Packettype              = Interface Control
------------------------------------------------
Received                = 0D 01 00 00 02 53 31 00 0E 6F 01 00 00 00
Date/Time               = 2012-12-19 22:09:20
Packet Length           = 0D
Packettype              = Interface Message
Subtype                 = Interface response
Sequence nbr            = 00
Response on cmnd        = Get Status, return firmware versions and 
configuration of the interface.
Transceiver type        = 433.92MHz (Transceiver)
Firmware version        = 49
Display undecoded       = Off
Protocols:
Disabled                AE (433.92)
Disabled                Rubicson (433.92)
Disabled                FineOffset / Viking (433.92)
Disabled                RFU3
Disabled                RFU4
Disabled                RFU5
Disabled                RFU6
Disabled                Mertik (433.92)
Enabled                 AD (433.92)
Enabled                 Hideki/UPM (433.92)
Enabled                 La Crosse (433.92/868.30)
Disabled                FS20 (868.35)
Disabled                ProGuard (868.35 FSK)
Disabled                BlindsT0 (433.92)
Disabled                BlindsT1/T2/T3 (433.92)
Enabled                 X10 (310/433.92)
Enabled                 ARC (433.92)
Enabled                 AC (433.92)
Enabled                 HomeEasy EU (433.92)
Disabled                Meiantech (433.92)
Enabled                 Oregon Scientific (433.92)
Enabled                 ATI (433.92)
Disabled                Visonic (315/868.95)

Original issue reported on code.google.com by cirr...@gmail.com on 19 Dec 2012 at 9:14

GoogleCodeExporter commented 8 years ago
I see that you use the latest version from SVN, this has not the wind sensor 
yet modified for the new database setup. I will start fixing that asap.

Original comment by sebastia...@gmail.com on 24 Dec 2012 at 10:06

GoogleCodeExporter commented 8 years ago
I got the same error when using version 0.21 with MySQL. Fixed by:

--- rfxcmd.py.bak   2012-12-29 18:56:01.000000000 +0100
+++ rfxcmd.py   2012-12-29 18:21:22.000000000 +0100
@@ -1440,7 +1440,7 @@
                windchill, gust, battery, signal_level) VALUES \
                ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s');" % \
                (timestamp, packettype, subtype, seqnbr, id1, id2, temperature_str, direction, av, \
-               windchill, gust, battery, signal))
+               windchill_str, gust, battery, signal))

                db.commit()

Original comment by fredrik....@gmail.com on 29 Dec 2012 at 5:59

GoogleCodeExporter commented 8 years ago
Fixed for 0.2x branch, will be released in 0.22

Original comment by sebastia...@gmail.com on 2 Jan 2013 at 11:32