Announcement

Collapse
No announcement yet.

Log to database just stops?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Log to database just stops?

    Yesterday afternoon mcsTemp just quit logging to the database. 1-wire Sensor values are still being updated and posted into HS and no errors are registered in the HS log. A restart of HS has not resolved the issue. A complete reboot of the system has not resolved it.

    The database file is 2.6MB and opens without errors in Access. I do not see anything in the file that looks suspicious.

    Performed a 'Compact and Repair' using mcsTemp and file size went from 2.6MB to 4.1MB - odd, I would have thought it would make the filesize smaller. This did not change anything.

    --Update--
    After the latest reboot and re-enabling of 'general debug' I discovered an error in my HS log:
    12/9/2007 6:53:17 PM mcsTemperature Debug Setup Page Unload
    12/9/2007 6:53:17 PM mcsTemperature Debug setIO _33 from 17 to 19, brightness=130
    12/9/2007 6:53:17 PM mcsTemperature Debug setDevice _33 from 17 to 2
    12/9/2007 6:53:17 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2423 7700000009F30A1D
    12/9/2007 6:53:17 PM mcsTemperature Debug Wind Speed Counter=500, Prior Counter=443, Interval=74 seconds
    12/9/2007 6:53:17 PM mcsTemperature Debug setIO _34 from 17 to 19, brightness=1
    12/9/2007 6:53:17 PM mcsTemperature Debug setDevice _34 from 3 to 2
    12/9/2007 6:53:17 PM mcsTemperature Debug setIO _35 from 17 to 19, brightness=1
    12/9/2007 6:53:17 PM mcsTemperature Debug setDevice _35 from 3 to 2
    12/9/2007 6:53:57 PM mcsTemperature Debug setIO _60 from 0 to 19, brightness=0
    12/9/2007 6:53:57 PM mcsTemperature Debug setDevice _60 from 3 to 3
    12/9/2007 6:53:57 PM mcsTemperature Debug Log Temperature Sensor Count=22, INSERT INTO Temperature(SampleDate,OutdoorTemp18B20,Humidity,OutdoorTemp 2438,126V-Vcc,126V1-Humidity,126V2-Solar,WindDir,WindSpeed,WindGust,Temp2d20,Humid2,Temp2d38,Te mp2Vcc,Temp2Hum,Temp2Fan,AtticTemp,Baro,DsStat,RainRate,Rain Today,DewPoint) SELECT #2007-12-09 6:53:57 PM# AS QT,5400 AS Q1,3800 AS Q2,5290 AS Q3,501 AS Q4,203 AS Q5,0 AS Q6,13000 AS Q7,100 AS Q8,100 AS Q9,7660 AS Q10,2900 AS Q11,7670 AS Q12,501 AS Q13,169 AS Q14,0 AS Q15,6620 AS Q16,3005 AS Q17,7300 AS Q18,0 AS Q19,0 AS Q20,2900 AS Q21
    12/9/2007 6:53:57 PM mcsTemperature Debug Log Temperature SQL Error Syntax error in INSERT INTO statement. on line 870 Syntax error in INSERT INTO statement.
    12/9/2007 6:53:57 PM mcsTemperature Debug Change Field because , error number=0, Fields=OutdoorTemp18B20,4,Humidity,4,OutdoorTemp2438,4,126V-Vcc,3,126V1-Humidity,3,126V2-Solar,1,WindDir,5,WindSpeed,3,WindGust,3,Temp2d20,4,Humid2,4 ,Temp2d38,4,Temp2Vcc,3,Temp2Hum,3,Temp2Fan,1,AtticTemp,4,Bar o,4,DsStat,4,RainRate,1,RainToday,1,DewPoint,4
    12/9/2007 6:53:57 PM mcsTemperature Debug Log Temperature Retry SQL Error Syntax error in INSERT INTO statement. on line 930 Syntax error in INSERT INTO statement.
    12/9/2007 6:53:57 PM mcsTemperature Debug EvaluateDeviceAction DeviceActionCollection.Count=0, MonitoredEventCount=0
    12/9/2007 6:54:17 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS1920 A50008015508F910
    12/9/2007 6:54:18 PM mcsTemperature Debug Calibrate 54.1625 with bias 0
    12/9/2007 6:54:18 PM mcsTemperature Debug setIO _1 from 0 to 19, brightness=54
    12/9/2007 6:54:18 PM mcsTemperature Debug setDevice _1 from 17 to 2
    12/9/2007 6:54:18 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS1920 480008015517C710
    12/9/2007 6:54:19 PM mcsTemperature Debug Calibrate 76.4375 with bias 0
    12/9/2007 6:54:19 PM mcsTemperature Debug setIO _4 from 0 to 19, brightness=76
    12/9/2007 6:54:19 PM mcsTemperature Debug setDevice _4 from 17 to 2
    12/9/2007 6:54:19 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2438 1E000000A9324126
    12/9/2007 6:54:21 PM mcsTemperature Debug Calibrate 37 with bias 0
    12/9/2007 6:54:21 PM mcsTemperature Debug setIO _3 from 0 to 19, brightness=37
    12/9/2007 6:54:21 PM mcsTemperature Debug setDevice _3 from 17 to 2
    12/9/2007 6:54:21 PM mcsTemperature Debug Calibrate 53.20625 with bias 0
    12/9/2007 6:54:21 PM mcsTemperature Debug setIO _2 from 0 to 19, brightness=53
    12/9/2007 6:54:21 PM mcsTemperature Debug setDevice _2 from 17 to 2
    12/9/2007 6:54:22 PM mcsTemperature Debug setIO _75 from 17 to 19, brightness=197
    12/9/2007 6:54:22 PM mcsTemperature Debug setDevice _75 from 17 to 2
    12/9/2007 6:54:22 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2438 39000000B16DCF26
    12/9/2007 6:54:23 PM mcsTemperature Debug Calibrate 29 with bias 0
    12/9/2007 6:54:23 PM mcsTemperature Debug Calibrate 76.38125 with bias 0
    12/9/2007 6:54:23 PM mcsTemperature Debug setIO _5 from 0 to 19, brightness=76
    12/9/2007 6:54:23 PM mcsTemperature Debug setDevice _5 from 17 to 2
    12/9/2007 6:54:24 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS1990A 4A0000002784E581
    12/9/2007 6:54:24 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2408 C9000000037B1F29
    12/9/2007 6:54:24 PM mcsTemperature Debug DS2408 Wind Direction Count=42,nWindAngle=59.0625,sWindAngle=60
    12/9/2007 6:54:24 PM mcsTemperature Debug Calibrate 60 with bias 0
    12/9/2007 6:54:24 PM mcsTemperature Debug setIO _33 from 17 to 19, brightness=60
    12/9/2007 6:54:24 PM mcsTemperature Debug setDevice _33 from 17 to 2
    12/9/2007 6:54:24 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2423 7700000009F30A1D
    12/9/2007 6:54:24 PM mcsTemperature Debug Wind Speed Counter=574, Prior Counter=500, Interval=67 seconds
    12/9/2007 6:54:24 PM mcsTemperature Debug setIO _34 from 17 to 19, brightness=2
    12/9/2007 6:54:24 PM mcsTemperature Debug setDevice _34 from 3 to 2
    12/9/2007 6:54:24 PM mcsTemperature Debug setIO _35 from 17 to 19, brightness=2
    12/9/2007 6:54:24 PM mcsTemperature Debug setDevice _35 from 3 to 2
    12/9/2007 6:55:04 PM mcsTemperature Debug setIO _60 from 0 to 19, brightness=0
    12/9/2007 6:55:04 PM mcsTemperature Debug setDevice _60 from 3 to 3
    12/9/2007 6:55:04 PM mcsTemperature Debug Log Temperature Sensor Count=22, INSERT INTO Temperature(SampleDate,OutdoorTemp18B20,Humidity,OutdoorTemp 2438,126V-Vcc,126V1-Humidity,126V2-Solar,WindDir,WindSpeed,WindGust,Temp2d20,Humid2,Temp2d38,Te mp2Vcc,Temp2Hum,Temp2Fan,AtticTemp,Baro,DsStat,RainRate,Rain Today,DewPoint) SELECT #2007-12-09 6:55:04 PM# AS QT,5416 AS Q1,3700 AS Q2,5321 AS Q3,501 AS Q4,197 AS Q5,0 AS Q6,6000 AS Q7,200 AS Q8,200 AS Q9,7644 AS Q10,2900 AS Q11,7638 AS Q12,501 AS Q13,169 AS Q14,0 AS Q15,6530 AS Q16,3005 AS Q17,7300 AS Q18,0 AS Q19,0 AS Q20,2800 AS Q21
    12/9/2007 6:55:04 PM mcsTemperature Debug Log Temperature SQL Error Syntax error in INSERT INTO statement. on line 870 Syntax error in INSERT INTO statement.
    12/9/2007 6:55:04 PM mcsTemperature Debug Change Field because , error number=0, Fields=OutdoorTemp18B20,4,Humidity,4,OutdoorTemp2438,4,126V-Vcc,3,126V1-Humidity,3,126V2-Solar,1,WindDir,4,WindSpeed,3,WindGust,3,Temp2d20,4,Humid2,4 ,Temp2d38,4,Temp2Vcc,3,Temp2Hum,3,Temp2Fan,1,AtticTemp,4,Bar o,4,DsStat,4,RainRate,1,RainToday,1,DewPoint,4
    12/9/2007 6:55:04 PM mcsTemperature Debug Log Temperature Retry SQL Error Syntax error in INSERT INTO statement. on line 930 Syntax error in INSERT INTO statement.
    12/9/2007 6:55:05 PM mcsTemperature Debug EvaluateDeviceAction DeviceActionCollection.Count=0, MonitoredEventCount=0
    12/9/2007 6:55:25 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS1920 A50008015508F910
    12/9/2007 6:55:26 PM mcsTemperature Debug Calibrate 54.275 with bias 0
    12/9/2007 6:55:26 PM mcsTemperature Debug setIO _1 from 0 to 19, brightness=54
    12/9/2007 6:55:26 PM mcsTemperature Debug setDevice _1 from 17 to 2
    12/9/2007 6:55:26 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS1920 480008015517C710
    12/9/2007 6:55:27 PM mcsTemperature Debug Calibrate 76.325 with bias 0
    12/9/2007 6:55:27 PM mcsTemperature Debug setIO _4 from 0 to 19, brightness=76
    12/9/2007 6:55:27 PM mcsTemperature Debug setDevice _4 from 17 to 2
    12/9/2007 6:55:27 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2438 1E000000A9324126
    12/9/2007 6:55:28 PM mcsTemperature Debug Calibrate 37 with bias 0
    12/9/2007 6:55:28 PM mcsTemperature Debug Calibrate 53.0375 with bias 0
    12/9/2007 6:55:28 PM mcsTemperature Debug setIO _2 from 0 to 19, brightness=53
    12/9/2007 6:55:28 PM mcsTemperature Debug setDevice _2 from 17 to 2
    12/9/2007 6:55:29 PM mcsTemperature Debug setIO _75 from 17 to 19, brightness=199
    12/9/2007 6:55:29 PM mcsTemperature Debug setDevice _75 from 17 to 2
    12/9/2007 6:55:29 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2438 39000000B16DCF26
    12/9/2007 6:55:30 PM mcsTemperature Debug Calibrate 29 with bias 0
    12/9/2007 6:55:30 PM mcsTemperature Debug Calibrate 76.38125 with bias 0
    12/9/2007 6:55:31 PM mcsTemperature Debug setIO _68 from 17 to 19, brightness=171
    12/9/2007 6:55:31 PM mcsTemperature Debug setDevice _68 from 3 to 2
    12/9/2007 6:55:31 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS1990A 4A0000002784E581
    12/9/2007 6:55:31 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2408 C9000000037B1F29
    12/9/2007 6:55:31 PM mcsTemperature Debug DS2408 Wind Direction Count=26,nWindAngle=36.5625,sWindAngle=40
    12/9/2007 6:55:31 PM mcsTemperature Debug Calibrate 40 with bias 0
    12/9/2007 6:55:31 PM mcsTemperature Debug setIO _33 from 17 to 19, brightness=40
    12/9/2007 6:55:31 PM mcsTemperature Debug setDevice _33 from 17 to 2
    12/9/2007 6:55:31 PM mcsTemperature Debug DS9x9x Port USB2 Device = DS2423 7700000009F30A1D
    12/9/2007 6:55:31 PM mcsTemperature Debug Wind Speed Counter=661, Prior Counter=574, Interval=67 seconds
    12/9/2007 6:55:31 PM mcsTemperature Debug setIO _34 from 17 to 19, brightness=2
    12/9/2007 6:55:31 PM mcsTemperature Debug setDevice _34 from 3 to 2
    12/9/2007 6:55:31 PM mcsTemperature Debug setIO _35 from 17 to 19, brightness=2
    12/9/2007 6:55:31 PM mcsTemperature Debug setDevice _35 from 3 to 2
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 4A0000002784E581S, HS:`1, Index:97, DB:tbl4A0000002784E581S,11,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info A50008015508F910, HS:_1, Index:97, DB:OutdoorTemp18B20,0,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 1E000000A9324126H, HS:_3, Index:97, DB:Humidity,6,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 1E000000A9324126, HS:_2, Index:97, DB:OutdoorTemp2438,0,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 1E000000A9324126V, HS:_74, Index:97, DB:126V-Vcc,20,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 1E000000A9324126V1, HS:_75, Index:97, DB:126V1-Humidity,20,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 1E000000A9324126V2, HS:_79, Index:97, DB:126V2-Solar,20,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info C9000000037B1F29D, HS:_33, Index:97, DB:WindDir,1,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 7700000009F30A1DW, HS:_34, Index:97, DB:WindSpeed,2,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 7700000009F30A1DG, HS:_35, Index:97, DB:WindGust,3,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 480008015517C710, HS:_4, Index:97, DB:Temp2d20,0,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 39000000B16DCF26H, HS:_6, Index:97, DB:Humid2,6,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 39000000B16DCF26, HS:_5, Index:97, DB:Temp2d38,0,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 39000000B16DCF26V, HS:_67, Index:97, DB:Temp2Vcc,20,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 39000000B16DCF26V1, HS:_68, Index:97, DB:Temp2Hum,20,1
    12/9/2007 6:55:39 PM mcsTemperature Sensor Info 39000000B16DCF26V2, HS:_69, Index:97, DB:Temp2Fan,20,1
    Any ideas?
    Last edited by mfisher; December 9, 2007, 10:04 PM.
    Best regards,
    -Mark-

    If you're not out on the edge, you're taking up too much room!
    Interested in 3D maps? Check out my company site: Solid Terrain Modeling

    #2
    The SQL statement uses the following fields that are expected to be in the database

    SampleDate,OutdoorTemp18B20,Humidity,OutdoorTemp 2438,126V-Vcc,126V1-Humidity,126V2-Solar,WindDir,WindSpeed,WindGust,Temp2d20,Humid2,Temp2d38,Te mp2Vcc,Temp2Hum,Temp2Fan,AtticTemp,Baro,DsStat,RainRate,Rain Today,DewPoint

    I did not make any provisions for names that contain spaces such as the OutdoorTemp 2438. I also belive the names need to start with an alpha so the 126V-Vcc etc. may not be valid names. These should be changed in the setup.

    Comment


      #3
      Thanks Michael, I forgot about using non-alphanumeric characters in DB filed names.

      I changed those field names but am still getting the error:
      12/9/2007 10:47:57 PM mcsTemperature Debug Log Temperature Sensor Count=22, INSERT INTO Temperature(SampleDate,OutdoorTemp1820,Humidity,OutdoorTemp2 438,Vcc126V,Humidity126V1,Solar126V2,WindDir,WindSpeed,WindG ust,Temp2d20,Humid2,Temp2d38,Temp2Vcc,Temp2Hum,Temp2Fan,Atti cTemp,Baro,DsStat,RainRate,RainToday,DewPoint) SELECT #2007-12-09 10:47:57 PM# AS QT,5045 AS Q0,4200 AS Q1,4916 AS Q2,501 AS Q3,215 AS Q4,0 AS Q5,12000 AS Q6,100 AS Q7,100 AS Q8,6789 AS Q9,2300 AS Q10,6772 AS Q11,501 AS Q12,152 AS Q13,0 AS Q14,5900 AS Q16,3004 AS Q17,7100 AS Q18,0 AS Q19,0 AS Q20,2800 AS Q21
      12/9/2007 10:47:57 PM mcsTemperature Debug Log Temperature SQL Error Index or primary key cannot contain a Null value. on line 870 Index or primary key cannot contain a Null value.
      12/9/2007 10:47:57 PM mcsTemperature Debug Change Field because , error number=0, Fields=OutdoorTemp1820,4, Humidity,4, OutdoorTemp2438,4, Vcc126V,3, Humidity126V1,3, Solar126V2,1, WindDir,5, WindSpeed,3, WindGust,3, Temp2d20,4, Humid2,4, Temp2d38,4, Temp2Vcc,3, Temp2Hum,3, Temp2Fan,1, AtticTemp,4, Baro,4, DsStat,4, RainRate,1, RainToday,1, DewPoint,4
      12/9/2007 10:47:57 PM mcsTemperature Debug Log Temperature Retry SQL Error Index or primary key cannot contain a Null value. on line 930 Index or primary key cannot contain a Null value.

      (I manually added spaces to the 2nd error line above so that the values would show correctly here)

      What else could cause this?
      Last edited by mfisher; December 10, 2007, 02:08 AM.
      Best regards,
      -Mark-

      If you're not out on the edge, you're taking up too much room!
      Interested in 3D maps? Check out my company site: Solid Terrain Modeling

      Comment


        #4
        It is not obvious to me what the error may be. The reference to null fields may be that a field was defined in a manner that requires data, but this should not be the case. I'm on the road so I cannot provide any more insight. What I would suggest as a test is to rename the database when HS is not running and let it be recreated upon HS startup.

        Comment


          #5
          Issue resolved, cause still unknown

          Michael,

          During troubleshooting, I backed up the DB and performed a 'Delete and Recreate Sensor Table' and this is when I began to receive the error messages in the HS log. I spent a lot of time yesterday reviewing the DB in Access and reviewing the ini file for any clues without any success. I also verified that all of the DB filed names followed the rules (alpha-numeric only, must begin with a letter, no spaces.)

          This morning I looked at the table again (in Access) in design view and compared it to a copy of the DB from before the 'crash' and discovered that the primary key field was not set to 'auto number'. I created a new 'ID' field, set it to auto number and presto - logging resumed without error.

          So, while it appears to be fixed, I am still clueless as to why it occurred in the first place.
          Best regards,
          -Mark-

          If you're not out on the edge, you're taking up too much room!
          Interested in 3D maps? Check out my company site: Solid Terrain Modeling

          Comment


            #6
            I also am clueless, but at least you are going again.

            Comment

            Working...
            X