Announcement

Collapse
No announcement yet.

differential rain counter with xapmcsonewire/xapmcsdatabase

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

    differential rain counter with xapmcsonewire/xapmcsdatabase

    Hello

    Is there an option somewhere in these xap plugin to indicate to the database with differential rain counter value ?

    -onewire plugin read the counter absolute value each 5min

    I want to write in the DB the number of count only during these last 5 min.

    Is that possible in the plugin config or should I do some computation when performing data reporting after ?

    Thomas

    #2
    The rate values for wattage or water use are effectively the differential in terms of watts/hour or gallons/hour. There value would be scaled by 12 since you are sampling at 12 times per hour.

    Comment


      #3
      Originally posted by Michael McSharry View Post
      The rate values for wattage or water use are effectively the differential in terms of watts/hour or gallons/hour. There value would be scaled by 12 since you are sampling at 12 times per hour.
      I asked the question because in my DB, at each new record (every 5min) and honestly, I don't manage correctly the values I think.

      -I'm using Rain sensor (1 count tick per 1/100 inch) + hobby-boards counter.
      -i configure xapmcsonewire to read the value each 5min and to write to mysqldb.
      -I configure 1wire as such: Rainfalls in mm,

      -in mcsxapdatabase, I get values such as 1753 that means if I'm correct 17.53mm of water received but by which period of time ?

      which is strange for me is that the values are repeated each time. That's why I ask if I have in my sql select perform a differential value ?

      Code:
      "2011-12-16 11:52:13";"1753"
      "2011-12-16 11:47:13";"1702"
      "2011-12-16 11:42:13";"1702"
      "2011-12-16 11:37:13";"1702"
      "2011-12-16 11:32:13";"1702"
      "2011-12-16 11:27:13";"1702"
      "2011-12-16 11:22:13";"1702"
      "2011-12-16 11:17:13";"1702"
      "2011-12-16 11:12:13";"1676"
      "2011-12-16 11:07:13";"1676"
      "2011-12-16 11:02:13";"1676"
      "2011-12-16 10:57:13";"1676"
      "2011-12-16 10:52:12";"1676"
      "2011-12-16 10:47:12";"1676"
      "2011-12-16 10:42:12";"1676"
      "2011-12-16 10:37:12";"1676"
      "2011-12-16 10:32:12";"1676"
      "2011-12-16 10:27:12";"1676"
      "2011-12-16 10:22:12";"1676"
      "2011-12-16 10:17:12";"1676"
      "2011-12-16 10:12:12";"1676"
      "2011-12-16 10:07:12";"1676"
      "2011-12-16 10:02:12";"1676"
      "2011-12-16 09:57:12";"1676"
      my objective is know how I should interpret the data in my db to get the number of mm of rain fallen each day (from 00:00 to 23:59)

      Thank you

      Thomas

      Comment


        #4
        There are two outputs from xapmcs1Wire. One is daily rainfall accumulation. The other is the rainfall rate in terms of inch/hour. It appears you are looking at only the daily accumulation.

        If you are only looking for the differential then you can scale the input by a factor of 12 so you will get the difference per 5 minute sample rather than the per hour rate.

        Comment


          #5
          Originally posted by Michael McSharry View Post
          There are two outputs from xapmcs1Wire. One is daily rainfall accumulation. The other is the rainfall rate in terms of inch/hour. It appears you are looking at only the daily accumulation.

          If you are only looking for the differential then you can scale the input by a factor of 12 so you will get the difference per 5 minute sample rather than the per hour rate.
          Hello
          Thanks.

          How can I distinguish the two different counters A&B in xapmcsonewire ?

          I see many different values here:



          -How can I know if this A or B ?
          -I don't understand why I've so much value
          -How is "rain rate" computed ?
          -What is "*** rain" ?

          Thank you

          Comment


            #6
            A will have the lower ID. The Daily accum with be in ID xx and the associated rate with be in ID xx+1. B accum will be in xx+2 and its rate in xx+3.

            Comment


              #7
              Originally posted by Michael McSharry View Post
              A will have the lower ID. The Daily accum with be in ID xx and the associated rate with be in ID xx+1. B accum will be in xx+2 and its rate in xx+3.
              ok thank you.

              I even discover 3 extra lines for the rain counter, please check the 3 last lines in the following picture:



              I have to select the lower ID's (counter A) ?

              If I understand well:

              -Rain Today: is the total mm of rain from 00:00 AM. Reset every night at 00:00AM
              -Rainrate: average of mm of rain per day since the start of mcsxap1wire ?
              -SUM: sum of raintoday_A+raintodayB ?
              -cumrain : cumulated number of mm of rain based on the absolute value inside counter ROM ?

              I still not manage the correct value, because they seems completely incredible...

              Thomas

              Comment


                #8
                The rain is the difference between the DS2423 reading at midnight and the most current reading. Look at the history key described below and you will see the midnight count (7) and last sample (5).

                The rain rate is the difference between the prior DS2423 reading and the current one divided by the number of seconds between the two readings and then scaled up from per second to per day. This is then smoothed using the weighting algorithm where the user enters a factor between 0 and 1 where 0 means no smoothing and 1 means infinite smooting.

                The *** and sum values you have correctly characterized my intent, but is it not something that I have any use and do not believe anybody else has used.

                There is a set of _history keys in xapmcs1Wire.ini that contain related information about each of the DS2423 counters. They are decoded as below. You can use this to investigate if you desire.
                '(1)
                '(2) Counter wrap count
                '(3) Accum for Weighted Average
                '(4) Day of Month last reading
                '(5) Prior Sample
                '(6) Date of Prior Sample
                '(7) Yesterday's Count
                '(8) Offset

                Comment

                Working...
                X