Announcement

Collapse
No announcement yet.

Using mcsTemperature to track energy usage

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

    #16
    We are really close now!!! Almost everything is working!

    The change to the semicolon delimiter solved all the issues with the regional settings and the counters looks ok and are saving coherent data to the database.
    The second counter wasn't visible at first, more on this at the end...

    The rate is computed as the moving average of the last three samples.
    I think it's not desirable as the minimum period beetween samples is already one minute and in one minute we have a lot of pulses to smoth the measure.
    With a moving average of three munutes it looks very slow.

    The devicevalue will contain the desired value scaled by 100. You should not usually be getting 0.
    I still can't get any value other than 0. I'm using MsgBox hs.DeviceValue("]34") to look at the DeviceValue.

    If you delete your watt history key, then it should recreate it without the large starting bias. Previously it assumed the counter starts at 0 so it installed one that was not there then the first day's readings will be very high. You can also just edit the last value in the watt history key to align with your current reading. The last entry is the midnight reading
    This is working right... but only with one counter...


    Two counters:

    At first I just deleted the watt_history key, saved the new exe and tried. Everything was working fine without any sign of the counter 14.

    Then I deleted watt_history, [devices] and [database] section the plugin recreated the devices but I think it mixed the data beetween the two counters (counter 14 has a value of 2 I manualy set):

    Code:
       
    30/03/2005 2:55:41~!~mcsTemperature Debug~!~DS9x9x Port <COM9> Device = DS18B20 A7000000318E2828
    30/03/2005 2:55:43~!~mcsTemperature Debug~!~ DS18B20(1):
    30/03/2005 2:55:44~!~mcsTemperature Debug~!~DS9x9x Port <COM9> Device = DS2423 8A000000052B521D
    30/03/2005 2:55:44~!~mcsTemperature~!~Creating database fields s8A000000052B521DW in C:\Archivos de programa\HomeSeer\mcsTemperature.mdb\TemperatureNew7
    30/03/2005 2:55:44~!~mcsTemperature~!~Creating database fields s8A000000052B521DG in C:\Archivos de programa\HomeSeer\mcsTemperature.mdb\TemperatureNew7
    30/03/2005 2:55:44~!~mcsTemperature~!~Creating database fields s8A000000052B521DN1 in C:\Archivos de programa\HomeSeer\mcsTemperature.mdb\TemperatureNew7
    30/03/2005 2:55:44~!~mcsTemperature~!~Creating database fields s8A000000052B521DC1 in C:\Archivos de programa\HomeSeer\mcsTemperature.mdb\TemperatureNew7
    30/03/2005 2:55:44~!~mcsTemperature Debug~!~Wind Speed Counter=57932, Prior Counter=, Interval=0 seconds
    30/03/2005 2:55:44~!~mcsTemperature Debug~!~Water Counter=2, Prior Counter=0, Interval=1,654665E+08 seconds
    30/03/2005 2:55:44~!~mcsTemperature Debug~!~^44 Water Delta Seconds=1,654665E+08, Prior Value=0, Current Value=2, Rate=4,351333E-06
    Later a error

    Code:
     
    30/03/2005 2:55:58~!~mcsTemperature~!~CreateTemperatureTable: Error #-2147217856 on line 400 Ha intentado bloquear la tabla '' al abrirla, pero no se puede bloquear porque actualmente está en uso. Espere un momento y vuelva a intentar la operación.
    Minds: Tried to lock the table " at opening, but is not possible to lock as it's now in use. Wait a moment and retry.

    Later the two counter values are mixed:

    Code:
     
    30/03/2005 2:56:09~!~mcsTemperature Debug~!~Water Counter=57934, Prior Counter=2, Interval=25 seconds
    30/03/2005 2:56:09~!~mcsTemperature Debug~!~^65 Water Delta Seconds=25, Prior Value=2, Current Value=57934, Rate=834220,8
    And now I see a new device (8A000000052B521DN without the "1" at the end)!

    Code:
     
    30/03/2005 2:57:29~!~mcsTemperature Sensor Info~!~A7000000318E2828, HS:]2, Index:97, DB:tA7000000318E2828,0,1
    30/03/2005 2:57:29~!~mcsTemperature Sensor Info~!~8A000000052B521DW, HS:]65, Index:97, DB:s8A000000052B521DW,2,1
    30/03/2005 2:57:29~!~mcsTemperature Sensor Info~!~8A000000052B521DG, HS:]66, Index:97, DB:s8A000000052B521DG,3,1
    30/03/2005 2:57:29~!~mcsTemperature Sensor Info~!~8A000000052B521DN1, HS:^44, Index:97, DB:s8A000000052B521DN1,29,1
    30/03/2005 2:57:29~!~mcsTemperature Sensor Info~!~8A000000052B521DC1, HS:^45, Index:97, DB:s8A000000052B521DC1,30,1
    30/03/2005 2:57:29~!~mcsTemperature Sensor Info~!~8A000000052B521DN, HS:^65, Index:97, DB:s8A000000052B521DN,29,1
    And after this all was messed with each minute (each write to the db):

    Code:
     
    30/03/2005 3:03:57~!~mcsTemperature Debug~!~Log Temperature Sensor Count=44, INSERT INTO TemperatureNew7(SampleDate,CSVYear,CSVMonth,CSVDay,CSVHour,CSVMinute,CSVSecond,CSVWindSpeed,CSVWindGust,CSVWindDirection,CSVInsideHumidity,CSVOutsideHumidity,CSVInsideTemperature,CSVOutsideTemperature,CSVBarometer,CSVTotalRain,CSVDailyRain,CSVHourlyRain,CSVWeatherCondition,CSVChannel1Temperature,CSVChannel1Humidity,CSVChannel2Temperature,CSVChannel2Humidity,CSVChannel3Temperature,CSVChannel3Humidity,CSVEvapotranspiration,CSVUVIndex,CSVSolarRadiation,CSVWindChild,CSVIndorHeatIndex,CSVOutdoorHeatIndex,CSVDewPoint,CSVRainRate,CSVOutdoorTempRate,CSVIndoorTempRate,CSVBarometerRate,CSVChannel1TempRate,CSVChannel2TempRate,CSVChannel3TempRate,tA7000000318E2828,s8A000000052B521DW,s8A000000052B521DG,s8A000000052B521DN1,s8A000000052B521DC1,s8A000000052B521DN) SELECT #2005-03-30 3:03:57# AS QT,200500 AS Q0,300 AS Q1,3000 AS Q2,300 AS Q3,300 AS Q4,0 AS Q5,700 AS Q6,1000 AS Q7,1000 AS Q8,4500 AS Q9,7000 AS Q10,2180 AS Q11,700 AS Q12,101804 AS Q13,4000 AS Q14,0 AS Q15,0 AS Q16,0 AS Q17,0 AS Q18,0 AS Q19,2210 AS Q20,3800 AS Q21,0 AS Q22,0 AS Q23,0 AS Q24,0 AS Q25,0 AS Q26,570 AS Q27,2200 AS Q28,860 AS Q29,190 AS Q30,0 AS Q31,-30 AS Q32,-20 AS Q33,34 AS Q34,0 AS Q35,0 AS Q36,0 AS Q37,2240 AS Q38,0 AS Q39,0 AS Q40,0 AS Q41,0 AS Q42,24848 AS Q43
    30/03/2005 3:03:57~!~mcsTemperature Debug~!~Change Field because La instrucción INSERT INTO contiene el siguiente nombre de campo desconocido: 's8A000000052B521DN'. Asegúrese de que ha escrito correctamente el nombre y vuelva a intentar la operación., error number=-2147217900, Fields=CSVYear,6,CSVMonth,3,CSVDay,4,CSVHour,3,CSVMinute,3,CSVSecond,1,CSVWindSpeed,3,CSVWindGust,4,CSVWindDirection,4,CSVInsideHumidity,4,CSVOutsideHumidity,4,CSVInsideTemperature,4,CSVOutsideTemperature,3,CSVBarometer,6,CSVTotalRain,4,CSVDailyRain,1,CSVHourlyRain,1,CSVWeatherCondition,1,CSVChannel1Temperature,1,CSVChannel1Humidity,1,CSVChannel2Temperature,4,CSVChannel2Humidity,4,CSVChannel3Temperature,1,CSVChannel3Humidity,1,CSVEvapotranspiration,1,CSVUVIndex,1,CSVSolarRadiation,1,CSVWindChild,3,CSVIndorHeatIndex,4,CSVOutdoorHeatIndex,3,CSVDewPoint,3,CSVRainRate,1,CSVOutdoorTempRate,3,CSVIndoorTempRate,3,CSVBarometerRate,2,CSVChannel1TempRate,1,CSVChannel2TempRate,1,CSVChannel3TempRate,1,tA7000000318E2828,4,s8A000000052B521DW,1,s8A000000052B521DG,1,s8A000000052B521DN1,1,s8A000000052B521DC1,1,s8A000000052B521DN,5
    30/03/2005 3:03:57~!~mcsTemperature~!~Database field s8A000000052B521DN is being created
    30/03/2005 3:03:59~!~mcsTemperature~!~ Resize Fields: on line 820 Ha intentado bloquear la tabla '' al abrirla, pero no se puede bloquear porque actualmente está en uso. Espere un momento y vuelva a intentar la operación.
    I think we can concentrate first on the moving average and the DeviceValue and then we can move to make the two counters work.

    Attached is the ini after the mess just in case it has any important information.

    I reverted to the ini file before this and everything is working fine again with just one counter.
    Attached Files

    Comment


      #17
      You are correct. The devicevalue was not correct.
      I added a weight parameter to the Devices/Files tab where the cal factors were defined. A weight of 1 gives the fastest rate response. A value near 0 gives a very slow one.

      Please confirm that an existing user that has a wind speed (or any counter) setup will have no problems with the current 2nd counter logic. The problem only occurs when the DS2423 is new to the plugin.

      The setup management is complex, but once setup it should work correctly. You can edit the ini file that was attached in your last message so that your counter has D7 and D8 for the counter 15 and DN1 and DC1 for counter 14 setup as a water flow sensor. There should be exactly 4 DS2423 sensor entries in devices group.
      Last edited by Michael McSharry; March 30, 2005, 03:27 PM.

      Comment


        #18
        You are correct. The devicevalue was not correct.
        Working!

        I added a weight parameter to the Devices/Files tab where the cal factors were defined. A weight of 1 gives the fastest rate response. A value near 0 gives a very slow one.
        A will make some analysis on this. As the time calculations are based in whole seconds, with a fast pool rate (10 seconds) the display value varies a lot as it can see some times two pulses and some times four. I changed the pull rate to 60 seconds and now it's working better.
        Does the weight of 1 any average with the previous number? I'm asking because at first look it seems to be slow to stabilyze.

        Please confirm that an existing user that has a wind speed (or any counter) setup will have no problems with the current 2nd counter logic. The problem only occurs when the DS2423 is new to the plugin.
        I had no problems until I deleted the DS2423 from the [devices] and [database] sections. Is there any more test I can do before giving it to others to try?

        The setup management is complex, but once setup it should work correctly. You can edit the ini file that was attached in your last message so that your counter has D7 and D8 for the counter 15 and DN1 and DC1 for counter 14 setup as a water flow sensor. There should be exactly 4 DS2423 sensor entries in devices group.
        I added this to the [database] section:
        ]65="s8A000000052B521DN1,2,1"
        ]66="s8A000000052B521DC1,3,1"

        and this to the [devices] section:
        8A000000052B521DN1="]65,COM9,,0,0"
        8A000000052B521DC1="]66,COM9,,0,0"

        And again it's creating a 5th device and doind something wrong with the values:

        Code:
         
        30/03/2005 12:20:55~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
        30/03/2005 12:20:55~!~mcsTemperature~!~Creating database fields s8A000000052B521DN1,s8A000000052B521DC1,s8A000000052B521DN in C:\Archivos de programa\HomeSeer\mcsTemperature.mdb\TemperatureNew7
        30/03/2005 12:20:55~!~mcsTemperature Debug~!~Water Counter=62221, Prior Counter=62183, Interval=434 seconds
        30/03/2005 12:20:55~!~mcsTemperature Debug~!~]34 Water Delta Seconds=434, Prior Value=62183, Current Value=62221, Rate=315,2074
        30/03/2005 12:21:55~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
        30/03/2005 12:21:56~!~mcsTemperature Debug~!~setIO ]1 from 0 to 19
        30/03/2005 12:21:57~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
        30/03/2005 12:21:57~!~mcsTemperature Debug~!~Water Counter=62229, Prior Counter=0, Interval=1,655005E+08 seconds
        30/03/2005 12:21:57~!~mcsTemperature Debug~!~^44 Water Delta Seconds=1,655005E+08, Prior Value=0, Current Value=62229, Rate=0,541447
        30/03/2005 12:21:57~!~mcsTemperature Debug~!~setIO ^44 from 0 to 19
        30/03/2005 12:21:57~!~mcsTemperature Debug~!~setIO ^44 from 0 to 19
        30/03/2005 12:21:57~!~mcsTemperature Debug~!~setIO ]60 from 0 to 19
        30/03/2005 12:22:58~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
        30/03/2005 12:22:59~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
        30/03/2005 12:22:59~!~mcsTemperature Debug~!~Water Counter=62237, Prior Counter=62229, Interval=62 seconds
        30/03/2005 12:22:59~!~mcsTemperature Debug~!~^44 Water Delta Seconds=62, Prior Value=62229, Current Value=62237, Rate=186,1313
        30/03/2005 12:22:59~!~mcsTemperature Debug~!~setIO ^44 from 0 to 19
        30/03/2005 12:22:59~!~mcsTemperature Debug~!~setIO ]60 from 0 to 19
        30/03/2005 12:22:59~!~mcsTemperature Debug~!~Log Temperature Sensor Count=44, INSERT INTO TemperatureNew7(SampleDate,CSVYear,CSVMonth,CSVDay,CSVHour,CSVMinute,CSVSecond,CSVWindSpeed,CSVWindGust,CSVWindDirection,CSVInsideHumidity,CSVOutsideHumidity,CSVInsideTemperature,CSVOutsideTemperature,CSVBarometer,CSVTotalRain,CSVDailyRain,CSVHourlyRain,CSVWeatherCondition,CSVChannel1Temperature,CSVChannel1Humidity,CSVChannel2Temperature,CSVChannel2Humidity,CSVChannel3Temperature,CSVChannel3Humidity,CSVEvapotranspiration,CSVUVIndex,CSVSolarRadiation,CSVWindChild,CSVIndorHeatIndex,CSVOutdoorHeatIndex,CSVDewPoint,CSVRainRate,CSVOutdoorTempRate,CSVIndoorTempRate,CSVBarometerRate,CSVChannel1TempRate,CSVChannel2TempRate,CSVChannel3TempRate,tA7000000318E2828,8A000000052B521D8,8A000000052B521D7,s8A000000052B521DN1,s8A000000052B521DC1,s8A000000052B521DN) SELECT #2005-03-30 12:22:59# AS QT,200500 AS Q0,300 AS Q1,3000 AS Q2,1200 AS Q3,2200 AS Q4,0 AS Q5,900 AS Q6,1400 AS Q7,1400 AS Q8,4000 AS Q9,3600 AS Q10,2260 AS Q11,1830 AS Q12,101904 AS Q13,4000 AS Q14,0 AS Q15,0 AS Q16,0 AS Q17,0 AS Q18,0 AS Q19,2100 AS Q20,3700 AS Q21,0 AS Q22,0 AS Q23,0 AS Q24,0 AS Q25,0 AS Q26,1830 AS Q27,2260 AS Q28,1810 AS Q29,300 AS Q30,0 AS Q31,170 AS Q32,70 AS Q33,29 AS Q34,0 AS Q35,0 AS Q36,0 AS Q37,2080 AS Q38,606400 AS Q39,28571 AS Q40,0 AS Q41,0 AS Q42,84578 AS Q43
        After go in and out of the setup to create the devices:

        Code:
        30/03/2005 12:27:04~!~mcsTemperature Sensor Info~!~A7000000318E2828, HS:]1, Index:97, DB:tA7000000318E2828,0,1
        30/03/2005 12:27:04~!~mcsTemperature Sensor Info~!~8A000000052B521D7, HS:]34, Index:COM9, DB:8A000000052B521D8,31,1
        30/03/2005 12:27:04~!~mcsTemperature Sensor Info~!~8A000000052B521D8, HS:]35, Index:, DB:8A000000052B521D7,32,1
        30/03/2005 12:27:04~!~mcsTemperature Sensor Info~!~8A000000052B521DN, HS:^44, Index:97, DB:s8A000000052B521DN,29,1
        30/03/2005 12:27:04~!~mcsTemperature Sensor Info~!~8A000000052B521DW1, HS:]65, Index:, DB:s8A000000052B521DN1,2,1
        30/03/2005 12:27:04~!~mcsTemperature Sensor Info~!~8A000000052B521DG1, HS:]66, Index:97, DB:s8A000000052B521DC1,3,1
        30/03/2005 12:27:04~!~mcsTemperature Debug~!~setIO ]61 from 0 to 19
        30/03/2005 12:27:04~!~mcsTemperature Debug~!~PollDS9097Switches:
        30/03/2005 12:27:05~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
        30/03/2005 12:27:06~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
        30/03/2005 12:27:07~!~mcsTemperature Debug~!~Water Counter=62270, Prior Counter=62262, Interval=64 seconds
        30/03/2005 12:27:07~!~mcsTemperature Debug~!~^44 Water Delta Seconds=64, Prior Value=62262, Current Value=62270, Rate=758,2706
        30/03/2005 12:27:07~!~mcsTemperature Debug~!~setIO ^44 from 0 to 19
        30/03/2005 12:27:09~!~mcsTemperature Debug~!~setIO ]61 from 0 to 19
        30/03/2005 12:27:09~!~mcsTemperature Debug~!~PollDS9097Switches:
        30/03/2005 12:27:14~!~mcsTemperature Debug~!~setIO ]60 from 0 to 19
        30/03/2005 12:27:14~!~mcsTemperature Debug~!~Log Temperature Sensor Count=44, INSERT INTO TemperatureNew7(SampleDate,CSVYear,CSVMonth,CSVDay,CSVHour,CSVMinute,CSVSecond,CSVWindSpeed,CSVWindGust,CSVWindDirection,CSVInsideHumidity,CSVOutsideHumidity,CSVInsideTemperature,CSVOutsideTemperature,CSVBarometer,CSVTotalRain,CSVDailyRain,CSVHourlyRain,CSVWeatherCondition,CSVChannel1Temperature,CSVChannel1Humidity,CSVChannel2Temperature,CSVChannel2Humidity,CSVChannel3Temperature,CSVChannel3Humidity,CSVEvapotranspiration,CSVUVIndex,CSVSolarRadiation,CSVWindChild,CSVIndorHeatIndex,CSVOutdoorHeatIndex,CSVDewPoint,CSVRainRate,CSVOutdoorTempRate,CSVIndoorTempRate,CSVBarometerRate,CSVChannel1TempRate,CSVChannel2TempRate,CSVChannel3TempRate,tA7000000318E2828,8A000000052B521D8,8A000000052B521D7,s8A000000052B521DN1,s8A000000052B521DC1,s8A000000052B521DN) SELECT #2005-03-30 12:27:14# AS QT,200500 AS Q0,300 AS Q1,3000 AS Q2,1200 AS Q3,2600 AS Q4,1500 AS Q5,900 AS Q6,1400 AS Q7,1400 AS Q8,4100 AS Q9,3600 AS Q10,2220 AS Q11,1860 AS Q12,101904 AS Q13,4000 AS Q14,0 AS Q15,0 AS Q16,0 AS Q17,0 AS Q18,0 AS Q19,2100 AS Q20,3700 AS Q21,0 AS Q22,0 AS Q23,0 AS Q24,0 AS Q25,0 AS Q26,1860 AS Q27,2220 AS Q28,1840 AS Q29,320 AS Q30,0 AS Q31,190 AS Q32,30 AS Q33,27 AS Q34,0 AS Q35,0 AS Q36,0 AS Q37,2060 AS Q38,606400 AS Q39,28571 AS Q40,0 AS Q41,0 AS Q42,18630 AS Q43
        30/03/2005 12:27:14~!~mcsTemperature Debug~!~setIO ]61 from 0 to 19
        30/03/2005 12:27:14~!~mcsTemperature Debug~!~PollDS9097Switches:
        30/03/2005 12:27:16~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
        30/03/2005 12:27:17~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
        30/03/2005 12:27:18~!~mcsTemperature Debug~!~Water Counter=62272, Prior Counter=62270, Interval=11 seconds
        30/03/2005 12:27:18~!~mcsTemperature Debug~!~^44 Water Delta Seconds=11, Prior Value=62270, Current Value=62272, Rate=716,7806
        30/03/2005 12:27:18~!~mcsTemperature Debug~!~setIO ^44 from 0 to 19
        30/03/2005 12:27:18~!~mcsTemperature Debug~!~Setup Page Unload
        Attached is how it looks. The imaged was grabed after the logs. You can see, the "good" devices (]34 and ]35) and not updating anymore and the ini contains:

        Code:
         
        [Temperature]
        watt_history=;;315,2074;;62221;30/03/2005 12:20:55;56157
        RainCalibrationRate="0.2"
        WaterFlowCalibrationRate="0.4"
        WattCalibrationRate="1"
        gallon_history=;;612,9255;;62280;30/03/2005 12:28:21;62229
          
        [Database]
        ]1="tA7000000318E2828,0,1"
        ]34="8A000000052B521D8,31,1"
        ]35="8A000000052B521D7,32,1"
        ]65="s8A000000052B521DN1,2,1"
        ]66="s8A000000052B521DC1,3,1"
        ^44="s8A000000052B521DN,29,1"
        ]67="s8A000000052B521DW,2,1"
         
        [Devices]
        A7000000318E2828="]1,COM9,,1,0"
        8A000000052B521D7="]34,COM9,,,0"
        8A000000052B521D8="]35,,,,0"
        8A000000052B521DN1="deleted"
        8A000000052B521DC1="deleted"
        8A000000052B521DN="^44,COM9,,,0"
        8A000000052B521DW1="]65,,,,0"
        8A000000052B521DG1="]66,COM9,,,0"
        8A000000052B521DW="]67,97,0,0,0"
        Also, in Temperature.asp there is no way to plot any kind of graph or table for ]34 and ]34.

        I deleted the new entries in the ini and the devices and now everything is working again.
        Attached Files
        Last edited by Mario from Spain; March 30, 2005, 05:34 AM.

        Comment


          #19
          I'll look into the 2nd counter some more. The difficult part it making it work as expected for existing users and provide the new counter going forward.

          If you use a weight of 1.0 then only the last and current sample values are used to compute the rate. If you use 0.5 then the delta between the current sample and prior sample is averaged with the rate computed last iteration. If you use 0.1 then 90% of the rate is determined by the prior rate and 10% by the delta between the last two samples.

          Comment


            #20
            Do you have idea why I can't any kind of graph or table for the wattage devices?

            Comment


              #21
              I just tried to chart the wattage and the rate for my test device and all was well with it. I define a group to put them and drew a 6 hr chart with both displayed.

              The attached should have the 2nd counter problems resolved. If you delete the current DS2423 definitions then it will refind them as wind and water sensors. Change the sensor type from the Analog tab.

              The ini's History keys have been changed to use the device code for which the history is being tracked. This will allow multiple sensors of each type with each able to track history.
              Attached Files

              Comment


                #22
                This is what I get in the log when try a LineSel graph:

                Code:
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~Chart SQL=SELECT SampleDate AS StartDate, (8A000000052B521D8) AS Q1, (8A000000052B521D7) AS Q2 FROM TemperatureNew7 WHERE SampleDate >= #2005-03-30 20:00# AND SampleDate < #2005-03-31 2:00#
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~Chart SQL2=
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~Chart SQL3=
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~FixTable field [TemperatureNew7].[8A000000052B521D8]
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~FixTable SQL UPDATE TemperatureNew7 SET [TemperatureNew7].[8A000000052B521D8] = 0 WHERE ((([TemperatureNew7].[8A000000052B521D8]) Is Null))
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~FixTable field [TemperatureNew7].[8A000000052B521D7]
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~FixTable SQL UPDATE TemperatureNew7 SET [TemperatureNew7].[8A000000052B521D7] = 0 WHERE ((([TemperatureNew7].[8A000000052B521D7]) Is Null))
                31/03/2005 1:11:33~!~mcsTemperature Debug~!~X Axis Data Completed
                31/03/2005 1:11:33~!~mcsTemperature~!~ Draw CD Chart with on line 5410 Object variable or With block variable not set

                Comment


                  #23
                  You have database names that start with a number. Change the field to start with an alpha. In mcsEnvironment (not yet available) I do not let the users edit the database field names so these type of problems will not occur. I could also check for valid field names.

                  Comment


                    #24
                    It's working!!!

                    Tomorrow I'll try the new version.
                    Attached Files

                    Comment


                      #25
                      Hi Michael.

                      Now it's working pretty well.

                      I want to add to the equation a current transformer connected to my ocelot to show the inmediate consumption as the counter bassed way isn't very good for this king of measurament.

                      I think the way for any measurament of this kind to be acurate is to use both, a counter meter and a current transformer.

                      Do you want me to do any test about the modifications to the two counters before you make this version public?
                      Attached Files

                      Comment


                        #26
                        If the counters are working as you expect then I do not thing there is anything else you need to test.

                        Comment


                          #27
                          Hi Michael.

                          I'm triying to setup the wather flow meter but I'm having some issues.

                          As the 1-wire counter 14 wasn't showing, I added to the [Devices] Section:

                          8A000000052B521DN1="]36,,,1,0"
                          8A000000052B521DC1="]37,97,,1,0"

                          And to the [Database] section:

                          ]36="WaterToday,29,1"
                          ]37="WaterRate,30,1"

                          But after entering the mcsTemperature and existing for it to learn the new configuration and create the new virtual devices, I can find now a new device:

                          8A000000052B521DN="^44,97,,0,0" with the DB entry ^44="s8A000000052B521DN,29,1"

                          What it corresponds to? I have just one DS2423 in the 1-wire network right now (I pan to add another as a lighting counter).
                          8A000000052B521DN="^44,97,,0,0"

                          The old wattage stoped working also.

                          The [Database] section looks like:

                          ]1="tA7000000318E2828,0,1"
                          ]34="WattageToday,31,1"
                          ]35="WattageRate,32,1"
                          ]36="WaterToday,29,1"
                          ]37="WaterRate,30,1"
                          ^65="s8A000000052B521DN,29,1"

                          And the [Devices] section:

                          [Devices]
                          A7000000318E2828="]1,97,,5,0"
                          8A000000052B521D7="]34,97,,1,0"
                          8A000000052B521D8="]35,,,0,0"
                          8A000000052B521DN1="]36,,,1,0"
                          8A000000052B521DC1="]37,97,,1,0"
                          8A000000052B521DN="^65,97,,0,0"

                          Comment


                            #28
                            What I think you will need to do is remove the counter from the ini file and let it rediscover it normally. The logic was not setup to find a second counter if the first was already recorded. All you database information can be left intact and you can reassign the virtual device codes after then new discovery. If that does not do it for you then let me know and I can look into it when I return this weekend.

                            Comment


                              #29
                              I did it but something is still wrong...

                              This is what the rediscovering discovered:

                              [Devices]
                              A7000000318E2828="]2,COM9,,,0"
                              8A000000052B521DW="]65,COM9,,,0"
                              8A000000052B521DG="]66,COM9,,,0"
                              8A000000052B521DN1="^44,COM9,,,0"
                              8A000000052B521DC1="^45,COM9,,,0"
                              8A000000052B521DN="^66,COM9,,,0"

                              And the [Database]

                              ]2="tA7000000318E2828,0,1"
                              ]65="s8A000000052B521DW,2,1"
                              ]66="s8A000000052B521DG,3,1"
                              ^44="s8A000000052B521DN1,29,1"
                              ^45="s8A000000052B521DC1,30,1"
                              ^66="s8A000000052B521DN,29,1"

                              No clue of the old:

                              [Devices]
                              A7000000318E2828="]1,97,,5,0"
                              8A000000052B521D7="]34,97,,2,0"
                              8A000000052B521D8="]35,97,,0,0"

                              Also... please, can you explain me the values after the address in the [Devices] like "35,97,,0,0" or "^66,COM9,,,0"?

                              I reverted to the old mcsTemperature.ini and everything is working right again with just one counter.

                              Many thanks.

                              Comment


                                #30
                                The explaination of the ini

                                Device Code user entry
                                Sensor Index for Temp05 or Com Port for DS9097
                                Calibration/Bias user entry
                                Error Count
                                Resolution user edit

                                In earlier versions of the plugin a value of 97 for the index was used to identify it as a DS9097U rather than a Temp08 sensor. I think I changed it when I went to multiple adapter support or it may of been as part of my migration to xAP in mcsEnvironment where the port becomes part of the xAP address

                                When I access your site I see mcsTempeatue 4.36.0 is running. 4.36.1 is the one where the counter setup was corrected. I also connected a counter with a clean ini file with 4.36.2 and it correctly discovered wind/gust/flow/flow rate and no extra device as you were showing with 4.36.0.

                                Comment

                                Working...
                                X