Announcement

Collapse
No announcement yet.

Can mcsTemperatures do a calculation?

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

  • Can mcsTemperatures do a calculation?

    Hi Michael,

    I have two HS virtual devices I'm charting with mcsTemperature: battery current and voltage.

    Is it possible for mcsTemperature to calculate and store/chart the wattage (current * voltage) in it's db?

    I know I can do this within HS, however my voltage flucuates so frequently that I don't necessarily want to add the overhead of calculating and storing a device update this each time the voltage changes. I thought the 5 minute interval I have configured within mcsTemperature would be a good idea.

    Just throwin it out there .
    Mike

  • #2
    I'm thinking that I could generalize the calibration entry to be like the temperature events entries to allow expressions. This would provide a generalized solution. I need to see how/if calibrations are handled for the HS device inputs.

    Comment


    • #3
      Hi Michael,

      I appreciate your consideration and would love to hear if this might work out. Thanks!
      Mike

      Comment


      • #4
        I implemented the concept I proposed earlier. What I'm not quite certain is how this affects the calibration that is done with csv inputs. The same expressions that are allowed for mcsTemperature event triggers and actions can be used in this situation. To use the new feature following the following example

        Assume you have two existing virtual devices V1 and V2 where the device string contains some values. A new virtual device V3 is to be created by mcsTemperature with the value being the product of the string contents of V1 and V2.

        On the sensor page add a line with DC=V3, Bias= +V1*V2, Database=sV3, Type=something, Name=somelocation somename

        When mcsTemperature stores the product of V1 and V2 in the database it will also populate the formatted DeviceSting and the DeviceValue scaled by 100.

        This new version 6.1.0 is attached for evaluation
        Last edited by Michael McSharry; November 8th, 2009, 12:28 AM.

        Comment


        • #5
          Wow you're fast! Thanks Michael! I will test it out this weekend and provide feedback.

          Thanks again!
          Mike

          Comment


          • #6
            Hi Michael,

            The virtual device calculation works great! I'm now storing battery wattage along with the current and voltage.

            Thank you very much for this, I think it's a powerful feature!

            Best regards,
            Mike
            Mike

            Comment


            • #7
              Hi Michael,

              The virtual device calculation feature is working great, getting some interesting graphs!

              It appears there is a small configuration issue. When the bias formula is entered and saved, the sensor BIAS and AVG both have pluses (+) in them. At first I thought this was just a display issue as everything was working fine. However last night I came back to the sensor page to add a new device. I found out in this morning's logs that I needed to go back in and retype the BIAS formula if I wanted to update the page, because I had a ton of these in the log this morning:

              11/6/2009 7:53:03 AM - mcsTemperature - Expression +/+ on line 320 Syntax error

              Not a huge deal as the workaround is to re-enter the formula, but later down the road I'll have to go look it up (I'm getting old and forgetful ).
              Attached Files
              Mike

              Comment


              • #8
                The problem you are having is with the single quote for the house code as this is also used for the HTML delimiters. I added a check for this special case. It is posted at 6.1.1

                Comment


                • #9
                  Thank you Michael! I'll go update.
                  Mike

                  Comment


                  • #10
                    Hi,

                    I've figured out how to also do a calculation - thanks!

                    Now, I need to figure out how to change the device type, if possible.

                    I need a device type of 'kWh'.

                    I assume there is an easy way, but I'm missing it.

                    Thanks,
                    W

                    Comment


                    • #11
                      Do you want a Homeseer Device Type or do you want a mcsTemperature Device Label that is used on charts? The first is done with small Homeseer script. The second is done by using one of the four user-defined labels.

                      Comment


                      • #12
                        Originally posted by Michael McSharry View Post
                        Do you want a Homeseer Device Type or do you want a mcsTemperature Device Label that is used on charts? The first is done with small Homeseer script. The second is done by using one of the four user-defined labels.

                        Well, I think the user-defined labels would suffice for this.

                        W

                        Comment

                        Working...
                        X