Announcement

Collapse
No announcement yet.

monitor electricity consumption

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

    monitor electricity consumption

    Hello,

    I want to monitor my electricity consumtion.
    I have Homevision en Homeseer,
    Now we are able to count the pulses of the electricity meter in homevision.

    Is it possible to use MCS temp plugin to show (graphical interface ) the electricity consumtion?

    What is the best way to do it.

    Thanks,

    Renaatdb

    #2
    mcsTemperature can chart the energy usage over time. If you want charting resolution of under a few minutes per sample then xapmcsChart can provide that, but requires an xAP environment to be setup.

    Most who have done this use a pulse counter and a 1-wire interface. I do not know the specifics of what homevision provides with respect to the electricity meter interface. The DS2423-based counter from either hobby-boards.com in USA or AAG in Mexico are two sources for the counter. There will be European sources as well, but I do not know specific suppliers. To user 1-wire you also need some form of computer interface such as a DS9490D or Temp08.

    Comment


      #3
      Variables

      We are able to count the pulses of the electricity meter in homevision. But is it possible to use the Homevision variables in MCS temp for making trends?

      <TABLE cellSpacing=1 cellPadding=0 width="100%" border=0><TBODY><TR><FORM name=chkOPForm6016 method=post><TD class=tableroweven noWrap align=middle><INPUT class=formcheckbox onclick=buildList(this); type=checkbox value=6016 name=chkOP6016> </TD></FORM><TD class=tablecellon id=dv6016>6 </TD><TD class=tableroweven></TD><TD class=tableroweven>HomeVision Variables</TD><TD class=tableroweven>Elektriciteitsteller laatste 3 min huidig </TD><TD class=tableroweven>[4</TD><TD class=tableroweven noWrap>HomeVision Variable</TD><TD class=tableroweven noWrap>Today 14:25:56</TD></TR></TBODY></TABLE>

      Thanks,

      renaatdb

      Comment


        #4
        Yes. If I remember correctly it uses the contents of the DeviceString unless it is null, then uses the contents of the DeviceValue for the device.

        Comment


          #5
          Sorry don't understand.

          renaatdb

          Comment


            #6
            Each Homseer device has many properties with the three most often used at the user level are String, Value and Status. A numeric value can be stored in either the Value or String property. The value is integer only while a String can contain values that include a decimal point. The HS Homevision plugin will store the counter value in a device, but I do not know which property of the device it stores it in. It may put it in both or only one. It is likely there will be no issue, but I just do not know what the Homevision plugin is doing.

            When HS displays a device contents on the Device Status browser page it will display the DeviceString unless the DeviceString is blank and then it usually displays the DeviceStatus. If you are seeing the counter value on the Device Status browser page then it likely is being stored in the DeviceString and that is where mcsTemperature looks first.

            Comment


              #7
              Ok thanks but how can MCStemp collect the data for making a graph.
              We use MCStemp for 1-wire temp sensors and it works fine.

              <INPUT type=checkbox CHECKED value=1 name=UseDS9097> Use DS9490/DS9097U to collect data on comm port <INPUT size=8 value="<>,USB2" name=DSPort> at update interval <INPUT size=2 value=50 name=DSSampleInterval> seconds

              But the value we can see on the status page is a devicestring (devicestatus) send by homevision .
              <TABLE cellSpacing=1 cellPadding=0 width="100&#37;" border=0><TBODY><TR><FORM name=chkOPForm6016 method=post><TD class=tableroweven noWrap align=middle><INPUT class=formcheckbox onclick=buildList(this); type=checkbox value=6016 name=chkOP6016> </TD></FORM><TD class=tablecellon id=dv6016>4 </TD><TD class=tableroweven></TD><TD class=tableroweven>HomeVision Variables</TD><TD class=tableroweven>Elektriciteitsteller laatste 3 min huidig </TD><TD class=tableroweven>[4</TD><TD class=tableroweven noWrap>HomeVision Variable</TD><TD class=tableroweven noWrap>Today 9:12:07 </TD></TR></TBODY></TABLE>

              How I can put it in the MSC database? Sorry....
              Delimited Text File Format?
              Can I use Counter Calibrations Count Rate Watt Calibration ?
              csv file?


              Thanks,

              renaatdb
              Last edited by renaatdb; April 1, 2008, 02:43 AM.

              Comment


                #8
                Go to the Browser Sensor page on mcsTemperature. Add a sensor [4 and define its type to be wattage today. Give a database field name such as "Wattage". This will give you the running total of whatever Homevision provides.

                If Homevision provides a raw counter rather than the daily runnin count then you will need to use a virtual device to compute the daily totals. When you are doing this you may also want to consider computing the wattage rate and it can be charted as well.

                To compute the daily values you would run a periodic event such as every minute or a rate that is consistent with the update rate by Homevision of the [4 device. The example below is not tested, but is a start to take the [4 and convert it to V1 and V2 values for Wattage Today and Wattage Rate. In this case V1 and V2 would be setup on the mcsTemperature Sensor page as types Wattage Today and Wattage Rate.

                Code:
                Sub Main()
                    CountNow = hs.GetPlugins("mcsTemperature").GetDeviceNumber("[4")
                    LastCount = hs.GetIniSetting("Wattage","Count",CountNow,"Wattage.ini")
                    MidnightCount = hs.GetIniSetting("Wattage","MidnightCount",CountNow,"Wattage.ini")
                    LastRate = hs.GetIniSetting("Wattage","Rate",0,"Wattage.ini")
                    LastTime = hs.GetIniSetting("Wattage","Time",now,"Wattage.ini")
                
                    if day(LastDate) <> day(now) then
                        hs.SaveIniSetting "Wattage","MidnightCount",CountNow,"Wattage.ini"
                        MidNightCount = CountNow
                    end if
                
                    CountToday = CountNow - MidNightCount
                    if CountToday < 0 then
                        CountToday = 0
                    end if
                
                    CountRate =  LastRate * 0.5 + (CountToday - LastCount) / (Datediff("s",LastTime,now) * 60 * 60 * 0.5)
                
                    hs.SetDeviceString "V1",CountToday
                    hs.SetDeviceString "V2",CountRate
                
                    hs.SaveIniSetting "Wattage","Count",CountToday,"Wattage.ini"
                    hs.SaveIniSetting "Wattage","Time",now, "Wattage.ini"
                    hs.SaveIniSetting "Wattage","Rate",CountRate,"Wattage.ini"
                End Sub
                Last edited by Michael McSharry; April 6, 2008, 10:56 AM.

                Comment


                  #9
                  Hi,

                  I have a graph now but when I tried the script I have an error,


                  2/04/2008 18:54:01 Error Running script, script run or compile error in file: ev.txt1006:')' expected in line 3 More info: ')' expected

                  Thanks again,

                  Renaatdb
                  <!-- / message -->
                  <!-- controls -->

                  Comment


                    #10
                    Each of the 4 lines with hs.GetIniSetting need a closing ) as shown in the updated script.

                    Comment


                      #11
                      Michael,
                      You've got the closing parens inside the quote for the last argument of the GetINIsetting call. I.e., you need to reverse the order of the " and the ) in those four lines.
                      Steve

                      Comment


                        #12
                        Thank You. Fixed.

                        Comment

                        Working...
                        X