Announcement

Collapse
No announcement yet.

Using mcsTemperature to track energy usage

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

    Using mcsTemperature to track energy usage

    Quote:
    <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0><TBODY><TR><TD class=alt2 style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; BORDER-BOTTOM: 1px inset">Originally Posted by Michael McSharry


    Yes, The TEMP08 will report the counter as Lightning counts. The DS9097U knows a counter as Rainfall, Windspeed, or Waterflow. Rainfall is 0.01" per count, Waterflow is 1 gallon per count. Windspeed is a little more complex. I think you can also declare the device as a "User" type and then define the label you want to use for charting on the setup. Perhaps something like kwh. One way or another we will get it to work.


    </TD></TR></TBODY></TABLE>
    Hi Michael.

    It works, I'm measuring my home electricity usage!!!! Let's mcsTemperature show it properly!!

    I would like to read the counter and store it periodically in some fields in the database to make is easy to extract and draw: one field into the database each minute, another field each 5 minutes, another one each hour, and another one each day.

    Later I would like to be able to write some scripts to clean the database and mantain the 1 minute readings for 72 hours, the 5 minutes for 30 days, the 1 hour readings for 365 days, and daily data forever.

    Whats the best way to do it? Is there any way I can read the counter directly via script each minute?

    ---------------------------------------------------------------------------

    Message edit after some investigation with mcsTemperature:

    In the mcstemperature.ini there where the following devices:
    [Devices]
    A7000000318E2828="]1,COM9,,,0"
    8A000000052B521DG="]34,,,,0"
    8A000000052B521DW="]35,COM9,,,0"

    I changed it to:

    [Devices]
    A7000000318E2828="]1,COM9,,,0"
    8A000000052B521DN="]34,,,,0"
    8A000000052B521DC="]35,COM9,,,0"

    But still can't get the counter value.

    Attached is what I can see. Please note it's of type lighting but units are liter/hr (looks like the plugin isn't reseting and completly updating the device type after changing).
    Also... are normal so many errors?

    Mario.-

    <!-- / message --><!-- attachments -->
    Attached Files

    #2
    After many hours working with mcsTemperature I can't manage to make it work

    I readed all the old threads about he 1-wire counters and tried everything, messing with the device type (number) in the Database section of the ini file (I tried 0,1,10,29,30) and the device type (character) in the Devices section.

    All I can get are some strange numbers showing in the status fields.

    I can see in the log mcsTemperature reading right the counter:

    Code:
     
    25/03/2005 21:37:29~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
    25/03/2005 21:37:29~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=8A000000052B521D Family=DS2423 Counter=23496
    25/03/2005 21:37:39~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
    25/03/2005 21:37:40~!~mcsTemperature Debug~!~setIO ]1 from 0 to 19
    25/03/2005 21:37:40~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=A7000000318E2828 Family=DS18B20 Temperature=23
    25/03/2005 21:37:40~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
    25/03/2005 21:37:40~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=8A000000052B521D Family=DS2423 Counter=23498
    25/03/2005 21:37:51~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
    25/03/2005 21:37:51~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=A7000000318E2828 Family=DS18B20 Temperature=23
    25/03/2005 21:37:52~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
    25/03/2005 21:37:52~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=8A000000052B521D Family=DS2423 Counter=23501


    From time to time I get the counter devices without the Index number (I think after exiting setup):

    Code:
     
    25/03/2005 21:34:52~!~mcsTemperature Sensor Info~!~A7000000318E2828, HS:]1, Index:97, DB:tA7000000318E2828,0,1
    25/03/2005 21:34:52~!~mcsTemperature Sensor Info~!~8A000000052B521DL, HS:]34, Index:, DB:s8A000000052B521DW,29,1
    25/03/2005 21:34:52~!~mcsTemperature Sensor Info~!~8A000000052B521DC, HS:]35, Index:, DB:s8A000000052B521DG,30,1
    I attach the ini file.

    Please, tell me if you want me to send you a small database with some data (anyway the s8A000000052B521DW has only 0s and the s8A000000052B521DG just 2085700's)

    Many thanks, Michael.
    Attached Files

    Comment


      #3
      What I have done is added Wattage as a native type for a counter. You will see it as an analog option. You will also see a Cal value in the Devices/Files.

      The database will store utilization from midnight. This works fine for charting, but is somewhat awkward when trying to compute utilization over multiple days since you need to pick up the last reading of the day for each day in the period of interest. I had to deal with this for the sprinkler controller.

      The data will be written to the virtual devices for Today's wattage and current wattage use rate. If you want the data at 1 minute intervals then you will need to run all your sensors at this rate. The only multirate sample provisions provided are for discretes. I do not provide any mechanism for scripting direct access to the DS9097U. Asychronous access is messy to manage. The general solution would be to associate a sample rate with each sensor, but I do not want to get into that development cycle at this time.

      You can develop database queries to subsample the data for various periods or to append data into different tables at different rates, but these fields will not be visible to mcsTemperature for charting.

      I'm leaving the testing up to you on this one. I confirmed the setup recognizes then new analog types, but I did not try to simulate a wattage sensor.
      Last edited by Michael McSharry; March 29, 2005, 09:30 PM.

      Comment


        #4
        Thank you very much, Michael.

        I'll try it tomorrow and will let you know how it performs.

        Comment


          #5
          I recall now that I sample the wind speed at 15 second intervals to get a reasonable gust calculation. Once we get past the basic integration of the energy counter then I can add the a 1 minute sample rate for it to populate virtual device. The database recording rate will still be the same as the other sensors as specified in the setup page. You can let me know if this is of any value to you.

          Comment


            #6
            Originally posted by Michael McSharry
            What I have done is added Wattage as a native type for a counter. You will see it as an analog option. You will also see a Cal value in the Devices/Files.
            Great!

            I can see a Cal value in the Devices/Files and it has a value of "1" (I think it's right).


            The database will store utilization from midnight. This works fine for charting, but is somewhat awkward when trying to compute utilization over multiple days since you need to pick up the last reading of the day for each day in the period of interest. I had to deal with this for the sprinkler controller.
            Do you mind the "Wk Mins" showing a wrong number?

            The data will be written to the virtual devices for Today's wattage and current wattage use rate.
            I can see just 1 km/h for Today's wattage and current wattage use rate. There must be something wrong.
            I did many test, including erasing the devices and messing manually with the ini file but no matter what I do it always show the same value (1 km/h).


            If you want the data at 1 minute intervals then you will need to run all your sensors at this rate. The only multirate sample provisions provided are for discretes. I do not provide any mechanism for scripting direct access to the DS9097U. Asychronous access is messy to manage. The general solution would be to associate a sample rate with each sensor, but I do not want to get into that development cycle at this time.
            This is what I do now. Running all sensors at 1 minute rate.
            For the moment it should be ok.

            You can develop database queries to subsample the data for various periods or to append data into different tables at different rates, but these fields will not be visible to mcsTemperature for charting.
            I guess I can define a discrete field and then put the data directly into so I can let mcsTemperature draw the charting.

            I'm leaving the testing up to you on this one. I confirmed the setup recognizes then new analog types, but I did not try to simulate a wattage sensor.
            There is something wrong I can't find but I think is the same as before.

            The only values I see appened to the database are 100 for the s8A000000052B521DG field (defined in [database] as ]35="s8A000000052B521DG,32,1") and 0 or 100 in the s8A000000052B521DW field (defined in [database] as ]34="s8A000000052B521DW,31,1")

            I'm attaching my ini file and the statud I see.

            The log looks fine with the counter reading correct:

            PHP Code:
            27/03/2005 19:14:05~!~mcsTemperature Debug~!~Wind Speed Counter=30594Prior Counter=30592Interval=11 seconds
            27
            /03/2005 19:14:05~!~mcsTemperature Debug~!~setIO ]34 from 0 to 19
            27
            /03/2005 19:14:05~!~mcsTemperature Debug~!~setDevice ]34 from 3 to 3
            27
            /03/2005 19:14:05~!~mcsTemperature~!~DS9x9x Port PortAddress=8A000000052B521D Family=DS2423 Counter=30594
            27
            /03/2005 19:14:16~!~mcsTemperature Debug~!~DS9x9x Port Device DS18B20 A7000000318E2828
            27
            /03/2005 19:14:16~!~mcsTemperature~!~DS9x9x Port PortAddress=A7000000318E2828 Family=DS18B20 Temperature=20,3125
            27
            /03/2005 19:14:17~!~mcsTemperature Debug~!~DS9x9x Port Device DS2423 8A000000052B521D
            27
            /03/2005 19:14:17~!~mcsTemperature Debug~!~Wind Speed Counter=30597Prior Counter=30594Interval=12 seconds
            27
            /03/2005 19:14:17~!~mcsTemperature Debug~!~setIO ]34 from 0 to 19
            27
            /03/2005 19:14:17~!~mcsTemperature Debug~!~setDevice ]34 from 3 to 3
            27
            /03/2005 19:14:17~!~mcsTemperature~!~DS9x9x Port PortAddress=8A000000052B521D Family=DS2423 Counter=30597
            27
            /03/2005 19:14:17~!~mcsTemperature Debug~!~setIO ]60 from 0 to 19
            27
            /03/2005 19:14:17~!~mcsTemperature Debug~!~Log Temperature Sensor Count=41INSERT INTO TemperatureNew3(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,s8A000000052B521DGSELECT #2005-03-27 19:14:17# AS QT,200500 AS Q0,300 AS Q1,2700 AS Q2,1900 AS Q3,1300 AS Q4,3600 AS Q5,1300 AS Q6,2100 AS Q7,2100 AS Q8,4200 AS Q9,4000 AS Q10,2000 AS Q11,1380 AS Q12,101104 AS Q13,3800 AS Q14,100 AS Q15,0 AS Q16,0 AS Q17,0 AS Q18,0 AS Q19,1990 AS Q20,3500 AS Q21,0 AS Q22,0 AS Q23,0 AS Q24,0 AS Q25,0 AS Q26,1280 AS Q27,2010 AS Q28,1380 AS Q29,40 AS Q30,0 AS Q31,-40 AS Q32,130 AS Q33,0 AS Q34,0 AS Q35,0 AS Q36,0 AS Q37,2030 AS Q38,0 AS Q39,100 AS Q40
            27/03/2005 19:14:27~!~mcsTemperature Debug~!~DS9x9x Port Device DS18B20 A7000000318E2828
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~setIO ]1 from 0 to 19
            27
            /03/2005 19:14:28~!~mcsTemperature~!~DS9x9x Port PortAddress=A7000000318E2828 Family=DS18B20 Temperature=20,375
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~DS9x9x Port Device DS2423 8A000000052B521D
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~Wind Speed Counter=30600Prior Counter=30597Interval=11 seconds
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~setIO ]34 from 0 to 19
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~setDevice ]34 from 3 to 3
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~setIO ]35 from 0 to 19
            27
            /03/2005 19:14:28~!~mcsTemperature Debug~!~setDevice ]35 from 3 to 3
            27
            /03/2005 19:14:28~!~mcsTemperature~!~DS9x9x Port PortAddress=8A000000052B521D Family=DS2423 Counter=30600
            27
            /03/2005 19:14:38~!~mcsTemperature Debug~!~DS9x9x Port Device DS18B20 A7000000318E2828
            27
            /03/2005 19:14:39~!~mcsTemperature~!~DS9x9x Port PortAddress=A7000000318E2828 Family=DS18B20 Temperature=20,375
            27
            /03/2005 19:14:39~!~mcsTemperature Debug~!~DS9x9x Port Device DS2423 8A000000052B521D
            27
            /03/2005 19:14:39~!~mcsTemperature Debug~!~Wind Speed Counter=30602Prior Counter=30600Interval=11 seconds
            27
            /03/2005 19:14:39~!~mcsTemperature Debug~!~setIO ]34 from 0 to 19
            27
            /03/2005 19:14:39~!~mcsTemperature Debug~!~setDevice ]34 from 3 to 3
            27
            /03/2005 19:14:39~!~mcsTemperature~!~DS9x9x Port PortAddress=8A000000052B521D Family=DS2423 Counter=30602
            27
            /03/2005 19:14:50~!~mcsTemperature Debug~!~DS9x9x Port Device DS18B20 A7000000318E2828
            27
            /03/2005 19:14:51~!~mcsTemperature~!~DS9x9x Port PortAddress=A7000000318E2828 Family=DS18B20 Temperature=20,375
            27
            /03/2005 19:14:51~!~mcsTemperature Debug~!~DS9x9x Port Device DS2423 8A000000052B521D
            27
            /03/2005 19:14:51~!~mcsTemperature Debug~!~Wind Speed Counter=30605Prior Counter=30602Interval=12 seconds
            27
            /03/2005 19:14:51~!~mcsTemperature Debug~!~setIO ]34 from 0 to 19
            27
            /03/2005 19:14:51~!~mcsTemperature Debug~!~setDevice ]34 from 3 to 3
            27
            /03/2005 19:14:51~!~mcsTemperature~!~DS9x9x Port PortAddress=8A000000052B521D Family=DS2423 Counter=30605
            27
            /03/2005 19:15:00~!~Event Trigger~!~Time Trigger (Apagar Luz PasilloA8 Off (Pasillo Luz Pasillo)
            27/03/2005 19:15:01~!~mcsTemperature Debug~!~DS9x9x Port Device DS18B20 A7000000318E2828
            27
            /03/2005 19:15:02~!~mcsTemperature~!~DS9x9x Port PortAddress=A7000000318E2828 Family=DS18B20 Temperature=20,375
            27
            /03/2005 19:15:02~!~mcsTemperature Debug~!~DS9x9x Port Device DS2423 8A000000052B521D
            27
            /03/2005 19:15:02~!~mcsTemperature Debug~!~Wind Speed Counter=30607Prior Counter=30605Interval=11 seconds
            27
            /03/2005 19:15:02~!~mcsTemperature Debug~!~setIO ]34 from 0 to 19
            27
            /03/2005 19:15:02~!~mcsTemperature Debug~!~setDevice ]34 from 3 to 3
            27
            /03/2005 19:15:02~!~mcsTemperature~!~DS9x9x Port PortAddress=8A000000052B521D Family=DS2423 Counter=30607 
            Attached Files

            Comment


              #7
              The sensor ID sould be 17 characters and yours are 18 with the type position as "D" which is a wind direction. I need to look at why the wattage type selection is not updating the sensor type. If you want to play then change the ini file values for s8A000000052B521DG to s8A000000052B5217 and s8A000000052B521DW to s8A000000052B5218. This should allow it to process the sensor as wattage. The database filed name does not matter.

              Do you mind the "Wk Mins" showing a wrong number? ...

              where is wk mins displayed?

              Comment


                #8
                I changed s8A000000052B521DG to s8A000000052B5217 and s8A000000052B521DW to s8A000000052B5218 but then mcsTemperature do not show the sensor.

                I looked at the ID with OneWireViewer and it identifies the sensor as s8A000000052B521D. Also in the log I can see this:

                PHP Code:
                27/03/2005 21:50:26~!~mcsTemperature Debug~!~DS9x9x Port <COM9Device DS18B20 A7000000318E2828
                27
                /03/2005 21:50:26~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9Address=A7000000318E2828 Family=DS18B20 Temperature=21,875
                27
                /03/2005 21:50:26~!~mcsTemperature Debug~!~DS9x9x Port <COM9Device DS2423 8A000000052B521D
                27
                /03/2005 21:50:27~!~mcsTemperature Debug~!~ DS2423
                27
                /03/2005 21:50:27~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9Address=8A000000052B521D Family=DS2423
                27
                /03/2005 21:50:27~!~Info~!~ Web Server authorized local login successful from127.0.0.1 UserMario
                27
                /03/2005 21:50:37~!~mcsTemperature Debug~!~DS9x9x Port <COM9Device DS18B20 A7000000318E2828
                27
                /03/2005 21:50:38~!~mcsTemperature Debug~!~setIO ]1 from 0 to 19
                27
                /03/2005 21:50:38~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9Address=A7000000318E2828 Family=DS18B20 Temperature=21,8125
                27
                /03/2005 21:50:38~!~mcsTemperature Debug~!~DS9x9x Port <COM9Device DS2423 8A000000052B521D
                27
                /03/2005 21:50:38~!~mcsTemperature Debug~!~ DS2423
                27
                /03/2005 21:50:38~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9Address=8A000000052B521D Family=DS2423
                27
                /03/2005 21:50:48~!~mcsTemperature Debug~!~DS9x9x Port <COM9Device DS18B20 A7000000318E2828
                27
                /03/2005 21:50:49~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9Address=A7000000318E2828 Family=DS18B20 Temperature=21,8125
                27
                /03/2005 21:50:49~!~mcsTemperature Debug~!~DS9x9x Port <COM9Device DS2423 8A000000052B521D
                27
                /03/2005 21:50:49~!~mcsTemperature Debug~!~ DS2423
                27
                /03/2005 21:50:49~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9Address=8A000000052B521D Family=DS2423 
                There is one more thing I don't understand: The DS2423 has two counters. How do you know if you are reading one or the other? (And where you setup wich one to read?).

                where is wk mins displayed?
                I mind in the sprinkler controller web page. You can read about that in this thread http://forums.homeseer.com/showpost....04&postcount=1 but I think I was wrong and you had some other thing in mind.

                I recall now that I sample the wind speed at 15 second intervals to get a reasonable gust calculation. Once we get past the basic integration of the energy counter then I can add the a 1 minute sample rate for it to populate virtual device. The database recording rate will still be the same as the other sensors as specified in the setup page. You can let me know if this is of any value to you.
                I think with this will be very usefull as then we would make al the calculations and write the accumulated fields with a script.

                Comment


                  #9
                  My mistake on the sensor ID. The ends should be D7 and D8. I had miscounted the number of characters. The 7 and 8 are wattage and wattage rate. The prior W and G were wind speed and gust

                  Comment


                    #10
                    After changing devices to

                    [Devices]
                    A7000000318E2828="]1,COM9,,,0"
                    8A000000052B521D7="]34,,,,0"
                    8A000000052B521D8="]35,COM9,,,0"

                    the device ]35 shows Use at xx watt/hr but the values are still wrong.

                    The log is always like

                    Code:
                    28/03/2005 0:02:40~!~mcsTemperature Debug~!~Water Counter=36136, Prior Counter=36136, Interval=10800 seconds
                    With "Water Counter" (maybe just a cosmetic error?). Water Counter and Prior Counter shown always same value. Interval looks like a wrong value (the interval beetween counter reads is 62 seconds). The device status show things like Use at 25,2 watt/hr (right now it should be arround 600/800).

                    Comment


                      #11
                      You have given me so data to look into It's my turn now.

                      Comment


                        #12
                        I looked at your ini file and I did not see any keys to show history of the counters. For the wattage there should be a key "watt_history". Could it be that you posted it before a few cycles of collecting data with the suffix set to 7 and 8? If this is not the case then look in the log for any error message that may indicate that the ComputeWaterCount procedure has an error and did not complete to the end.

                        The interval you pointed out is based upon the "watt_history" line from the ini file. There are 7 entries on that line. The last is the sensor reading at midnight at the start of the day. The one before that is the time when the prior reading was processed. The large number you posted is equivalent to 3 hours.

                        The next step it to look in the ini file to see what is being recorded here for the "watt_history" key.

                        I'm reading counter 15. I believe AAG connects both counters in their wind instrument and in the counter module together. I could be wrong, but counter 15 is the one that works for both pieces of equipment.

                        Comment


                          #13
                          Yes, I posted the ini before changing it to type 7 and 8

                          Now there is the entry:

                          watt_history=,,12,6,,49738,29/03/2005 8:45:06,49738

                          The log at midnight show:

                          Code:
                          28/03/2005 23:59:58~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS18B20 A7000000318E2828
                          28/03/2005 23:59:59~!~mcsTemperature Debug~!~setIO ]1 from 0 to 19
                          28/03/2005 23:59:59~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=A7000000318E2828 Family=DS18B20 Temperature=16,75
                          28/03/2005 23:59:59~!~mcsTemperature Debug~!~DS9x9x Port <COM9>Device = DS2423 8A000000052B521D
                          28/03/2005 23:59:59~!~mcsTemperature Debug~!~Water Counter=47427, Prior Counter=47427, Interval=2700 seconds
                          28/03/2005 23:59:59~!~mcsTemperature Debug~!~]34 Water Delta Seconds=2700, Prior Value=47427, Current Value=47427, Rate=22,5
                          28/03/2005 23:59:59~!~mcsTemperature Debug~!~setIO ]35 from 0 to 19
                          29/03/2005 0:00:00~!~mcsTemperature Debug~!~setDevice ]35 from 2 to 2
                          29/03/2005 0:00:00~!~mcsTemperature~!~DS9x9x Port <COM9>: Port=<COM9> Address=8A000000052B521D Family=DS2423 Counter=47427
                          Right now the counter value as reported in the log is 49767. The house power comsumption tonight should go about 0.3 kWh as there is on just the fridge and the HomeSeer PC.

                          The interval in the log is always (for the last few hours) 2700

                          I'm attaching the actual ini file and a complete 5 minute log with HS start and shut down.

                          I'm reading counter 15. I believe AAG connects both counters in their wind instrument and in the counter module together. I could be wrong, but counter 15 is the one that works for both pieces of equipment.
                          I'm using counter 15 for this but both counters are independent and are not connected together. In the future I would like to use counter 14 for wather.
                          Attached Files
                          Last edited by Mario from Spain; March 29, 2005, 02:24 AM.

                          Comment


                            #14
                            After some more testing:

                            It looks to me as the regional settings has something to do with this issue.

                            I have changed the regional settings to "English US" and it looks like it's working (more or less).

                            Now "Wattage today" shows 54520 (the raw counter value) and right now "Wattage Rate" shows "Use at 654.42 watt/hr"

                            I think Wattage today should be substracting the counter value at midnight.

                            Edit: Now, after midnight, it's showing just the today value
                            watt_history=,,510.9208,,56543,3/30/2005 12:44:23 AM,56159

                            "Wattage Rate" appears to be some kind of average (hourly?) and not the actual rate. If I turn on a heat pump, I can see the rate value increasing very slowly.

                            While you have some time to fix this, I'm triying to write an script to work out the values but, how should I extract the values from the devices?

                            If I use:
                            hs.DeviceString("]34") I get the value but with a lot of html code
                            hs.DeviceValue("]34") I get 0
                            hs.DeviceStatus("]34") I get 17

                            Now the entry in the ini file is: watt_history=,,1881.712,,54805,3/29/2005 9:48:40 PM,0

                            REM: Maybe the strange readings I was getting with mcsControlsystems is also because of the regional settings?

                            We are close to have this working!!!
                            Last edited by Mario from Spain; March 29, 2005, 05:39 PM.

                            Comment


                              #15
                              Yes, I picked up on the use of comma rather than period for the decimal was causing a problem. I changed the ini key to use semicolon as a delimiter. I also added access to the second counter which invloved quite a number of changes. If you have a way to stimulate counter 14 then give it a try. If you have a problem at first, then edit your ini file to remove the existing definition of this counter in both the [devices] and [database] section. This may be necessary for it to see the second counter, but I think it will find it anyway.

                              The rate is computed as the moving average of the last three samples.

                              The devicevalue will contain the desired value scaled by 100. You should not usually be getting 0.

                              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.
                              Last edited by Michael McSharry; March 29, 2005, 09:30 PM.

                              Comment

                              Working...
                              X