Announcement

Collapse
No announcement yet.

MCS Temp Not showing Watt/Hr

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

    MCS Temp Not showing Watt/Hr


    #2
    HS DeviceValue can only handle integers so maximum functionality is provided by using watts which has 3 more digits of resolution than kilowatts.

    I think you are illustrating that when you scale the reading to be kilowatts rather than watts your rate is always under 1 KW/Hr, hence showing as 0. Am I corrrect on this or is it something else you are tyring to indicate?

    Comment


      #3
      My rate is always over 1Kw/Hr, i.e we are consuming a constant 4.5A @ 230v, the graphing side of things plots this fine and any increases above or below this when other appliances are used or switched off but the home seer status rate W/hr only shows 0
      Last edited by stevepyle; May 14, 2008, 04:16 PM.

      Comment


        #4
        Enable the General Debug. There will be lines in the hs log that start with
        "ComputeWater Count="
        "Water Counter="
        Device Code

        Post the contents of an instance of these lines for the case of the Device Code being your wattage device.

        Comment


          #5
          Sorry for not getting back sooner but I've been away, please find attached the log, I also spent some time watching the HS status screen and got the following displayed results.

          Time Count W/Hr
          10:27 1590 0
          10:31 1601 1440.00
          10:36 1611 0
          10:38 1616 1313.87
          10:40 1622 0

          House codes are \34 & \35
          Attached Files

          Comment


            #6
            The DeviceStatus of the Wattage Rate device is turned ON when the rate is non-zero. This is followed by setting the DeviceValue and DeviceString. It appears that the execution sequence with HS actually occurs such that the DeviceStatus is set after and when this is done the DeviceValue is set to zero when using the ExecX10 method to set status. I changed the method to use SetDeviceStatus with V5.13.16. It also appears that the DeviceStatus is not remembered by HS since each time it is checked it reports back 17 (Unknown). This should also be better understood, but should not have a direct impact on the problem you are seeing. Let me know how it works for you and if the problem persists, then give me a little log segment again.

            Comment


              #7
              Hi Micheal

              Installed v5.13.16 at the weekend problem is still persisting, with the HS status screen showing the following results over 19 minutes

              Time Count W/Hr
              16:10 453 0
              16:15 465 1636.36
              16:18 475 0
              16:25 493 1603
              16:29 506 0

              Log also attached as requested

              Steve
              Attached Files

              Comment


                #8
                It appears that your setting for weights on Watage Rate is not in the range 0 to 1. You will want to change this. I also limited the inputs in V5.13.17. A rate outside this range will result in negative wattage rates which are limited to 0.

                Comment


                  #9
                  OK so I updated to 5.13.17 and W/Hr shows in the status screen constantly, albeit it seems to update at between 20 -30 min windows, but the graphing updates between 2-3 minutes, I can live with that, but now both no longer display meaningful readings, I'm now at least a factor of 10 X (or more) lower than what is actually being drawn i.e where 1603.X W/hrs would be the actual rate MCS Temp shows 106.3X W/hrs ??, any changes to the w/hour calibration count / rate / or Bias by any factor seems not to have any effect.

                  Comment


                    #10
                    The database values are taken from the DeviceString at the update interval that was setup. This means that the database contents should be changing no faster than the DeviceString values.

                    The extract from the source that computes the rate is below. The WattCal value is the user callibration constant for counter count to wattage conversion. Weight is the user input for smooting the rate calculation. Scaling is fixed value of 100 to improve resolution when going into the HS Integer format. The other symbols should be self evident based upon the counter or some prior counter reading.

                    If you wattage is computed at 10x what you expect then you count/watt calibration needs to be scaled by 10. The debug output will provide quite a bit of visibility into the intermediate values actualy being computed.

                    Code:
                    sIntervalCount = CStr(Round((nCurrentCount - nYesterdayCount), 2))
                    sIntervalCount = Round(sIntervalCount * WattCal, 2)
                    nCurrentRate = (nCurrentCount - CSng(sPriorCount)) / nSampleInterval * 60 * 60 'per hour
                    nCurrentRate = nAccum * (1 - Weight) + nCurrentRate * Weight 
                    fRate = nCurrentRate * WattCal
                    sRate = CStr(Round(fRate, 2))
                    sString = FormatHTML(sensorType + 1, sRate)
                    If hs.DeviceString(device2) <> sString Then
                      hs.SetDeviceValue device2, CLng(fRate * Scaling)
                      hs.SetDeviceString device2, sString
                      hs.SetDeviceLastChange device2, Now()
                    End If

                    Comment


                      #11
                      Micheal
                      Please find attached todays log file, I have confimed via the MCS webpages that Bias is at 1, Count is 10, and rate is 1.

                      Comment


                        #12
                        I think you missed the attachment of your log

                        Comment


                          #13
                          Yep it was to big, so here's a ziped version
                          Attached Files

                          Comment


                            #14
                            The data from your log shows the following values for a selected sample

                            Delta Seconds=262,
                            Prior Value=6719071,
                            Current Value=6719095,
                            Rate=329.771

                            This rate is consistent with the counter values and when converted to watts/hr it should be 3297. I did not see anything after this output would have prevented the 3297 from being sent to HS except if the Watt Cal was not 10. I did not have any debug later in the procedure so I put some additional in the latest build.

                            I did notice considerable variability on the sample interval for the DS2423 counter. The four samples I looked at were at intervals 9 minutes, 4 minutes, 7 minutes, and 24 minutes. This tells me that your system does not appear to keep up in real time, but I have no visibility as to what else is going on with the system. It does look like the Temp05 is dumping data every 60 seconds. mcsTemperature uses a timer that interrutps every 60 seconds to schedule the polling of the DS9097. Since I added debug above I also output to the log when the timer does interrupt to help gain visibility of the delays your are experiencing.

                            There were also cases where the same DS2423 appeared to be found twice on the same polling interval. I do not know if this is scheduling related as the prior paragraph or 1-wire related. Since the second discovery was at the same approximate time as the first it resulted in the wattage being computed for the 0 duration interval and generating a 0 rate output. I trapped it so this would not happen.

                            The changes were put in 5.13.18

                            Comment

                            Working...
                            X