Announcement

Collapse
No announcement yet.

Problem with Ultra1Wire and DS2406

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

    Problem with Ultra1Wire and DS2406

    I am using Ultra1Wire with an HA7Net with two DS18B20 temperature sensors connected, they work perfectly (as does your application). I have recently added a GP1 "pulse counter" from Embedded Data Systems to the HA7Net which contains a DS2406 and a DS2423. Since Ultra1Wire does not recognize or poll the GP1 I have a custom script to poll the DS2423 pulse counter every minute using the HA7Net web interface. That part is working perfectly.

    On the status page of Ultra1Wire it now shows 143 DS2406s detected. The number seems to keep increasing although I don't see any particular pattern. It doesn't appear to be causing a problem but I don't know what, if any, impact it has on the program's long-term stability (will it eventually cause an issue?).

    In case you're interested in adding the DS2423 Pulse Counter to Ultra1Wire (I would really love that!), here's the code I'm using to read it directly:

    ---
    Sub Main

    url = "http://10.1.1.222/1Wire/WriteBlock.html?Address=B600000004538D1D&Data=A5DF01FFFFFFFF FFFFFFFFFFFFFF"
    myStr = hs.GetURL(url,PathLoc,False,80)

    p0 = Instr(1,myStr,"ResultData_0")
    myStr = Mid(myStr,p0)
    p0 = Instr(1,myStr,"VALUE=")
    myStr=Mid(myStr,p0+7,28)

    ' DB CODE DELETED FROM HERE

    DBRecTemp.Open "SELECT * FROM PowerRawData", objrsDB, 2, 2
    DBRecTemp.AddNew

    DBRecTemp("ReadDate") = Now()
    DBRecTemp("RawData") = myStr
    DBRecTemp("Counter") = CCur("&H" & Mid(myStr,15,2) & Mid(myStr,13,2) & Mid(myStr,11,2) & Mid(myStr,9,2))

    DBRecTemp.Update
    DBRecTemp.Close

    Set strDB = Nothing
    set objRSDB = Nothing
    Set DBRecTemp = NOthing
    Set TextStream = Nothing
    Set Folder = Nothing

    End Sub

    #2
    I see why it's increasing. I need to add a fix for that. What exactly is a DS2423 Pulse Counter? How are you using it?
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    Comment


      #3
      I have a CCS Pulse Output WattNode installed on the main 400 amp panel of my home, it connects to two of their 150 amp split-core current transformers. The WattNode outputs a "contact closure" pulse based on power consumption, with the transforms I'm using I get 266 pulses per kWh consumed. It's very accurate. The WattNode is connected to the GP1 from Embedded Data Systems which contains a DS2423 1-wire counter. I then use a custom VB script running within HomeSeer which polls it exactly once per minute and updates the counter to a SQL database. From that I can determine energy consumption for the house, peak loads, etc. Using ChartDirector and custom ASP pages I format this information for output.

      Comment


        #4
        Here's a partial screenshot of how it all looks on the screen, I only have a few days of history as I just completed the process but it's interesting to see exactly how much power we consume (it's a lot!).

        Click image for larger version

Name:	ScreenShot.jpg
Views:	2
Size:	91.0 KB
ID:	1150541

        Comment


          #5
          Power monitoring application

          lvrouter,

          I am new to using homeseer but I really liked your implementation for power monitoring. I looked up the Wattnode unit that you indicated and was wondering how you arrived at a voltage on your display, is that just a fixed value? or do you have another sensor that makes that dynamic? I was also interested in how you overlayed your VB script with the ultra 1wire code.

          Are you going to publish any of this as a homeseer plugin?

          Tom

          Comment


            #6
            I use the 1-Wire plugin for my temperature sensors but it doesn't currently support the counters. So, the VB script that polls the sensor is completely independent of the 1-wire plugin.

            The voltage comes from one of my UPSs. I am not planning to write any HomeSeer plugins, wouldn't even know where to begin. This is all just standard ASP code writen in VBscript. I only use HomeSeer to "trigger" the scripts and poll the various devices.

            If there's any specific code you need, I'd be glad to post it.

            Comment


              #7
              lvrouter

              Well if I may be so bold ... can you post the VB script and ASP code?

              Thanks

              Tom

              Comment


                #8
                The VB Script is posted above, everything but the DB connect stuff (for security). The ASP is custom and VERY specific to my application, if anyone needs any specific thing (SQL DB Definitions, ChartDirector, whatever) I'd be glad to post those specific things. I"m using ChartDirector for a LOT of stuff and am VERY pleased with the performance it provides (seems instantaneous to me), slowest thing in the whole system is my interface to the HAI Alarm Panel, need to work on that.

                Comment


                  #9
                  Ivrouter: Very good looking screen shot just what the doctor ordered, here in Ontario we pay for electricity on 2 different rates that change depending on our consumption, I also like the idea that you can find out what times you are using more energy.

                  Can you give a some more information on how you are connected to the Wattnode? And your UPS for the voltage reading?

                  I am very interested.

                  ALfer

                  Comment


                    #10
                    SQL DB definitions and Chart Director

                    lvrouter,

                    For the SQL DB definitions do you manually define the tables or are they dynamically defined. Which version of chartdirector are you using? I like your screen layout for the charts, are any of them set up as real time or are they snapshots from the DB.

                    Thanks again for your help.

                    Tom

                    Comment


                      #11
                      Can you guys start a new thread for this? This discussion is not related to this plug-in. Thanks
                      Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                      Comment

                      Working...
                      X