Announcement

Collapse
No announcement yet.

DS2406 Script

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

    DS2406 Script

    Hi,


    </PRE>




    </PRE>

    Thanks, Evan


    </PRE>

    #2
    I would suggest a slightly different approach to your interface where you control you timing in hardware and let the computer provide the time-of-day to enable this hardware timer. A general purpose computer cannot be depended upon for real short timing intervals. One-wire technology timing is dependent upon the number of devices and number of retries.

    You can use the DS2406 and 1-wire to initiate the feeder, but I would use something like a 555 timer with a variable resistor in the circuit to control the timing of the feed duration.

    Comment


      #3
      Thank you for the 555 timer suggestion, it was a marvelous idea. The 555 can trigger from a DS2406 sinking a high to low; or by adding a transistorto the input, it can trigger from an X10 “ON”, and then produce a one second high out.

      If possible, I would still like to know how to trigger the DS2406 with a script command, rather than a timed event. My objective is to monitor and control things from web pages.

      As an example, I’m reading the DS2406 low water level sensor like this:
      Code:
      dim waterlevel
      dim waterstatus
      response.write "The water level is: "
      waterlevel = hs.DeviceValue("r6")
      Select Case waterlevel 
      case 0
       waterStatus = "full"
      case 100
       waterStatus = "low"
      end select
      response.write waterstatus
      See myfishtank:

      http://home.mchsi.com/~theinventorspot/myfishtank.htm

      (I have a lot of fun with this stuff). The fish feeder, controllable on said page is an earlier X10 version that will only allow activation about every two hours, but it has worked for years.

      The input buttons on the webpage are actually drawn from an asp on my Homeseer/html directory, and typically execute an event.

      Is there a scriptable command to toggle a DS2406 switch that I can attach to a button, or an event?

      Comment


        #4
        If your DS2406 is defined as a relay then hs.Exec10 "[5","ON" will turn it on if the relay's device code is [5. Similiar for off. I think it will work with hs.SetDeviceStatus "[5","ON", but I think the behavior is different between HS1 and HS2 for this approach.

        Comment


          #5
          Very nice fish tank! Very clever idea - feed the fish via the internet. I did not press the "feed" button; does the camera show the the fish eating the food?

          I am interested in your DS2406 circuitry. I have been using the DS2405 (which is being discontinued) and I have tried the DS2406, but I was not able to get it working to monitor a switch position. Anything you would care to share about your circuit design would be greatly appreciated.

          Steve Q
          HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
          2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

          Comment


            #6
            Thanks Micheal, I will try it ASAP (Have to go to my real job at the momment).

            Thanks for the compliment Steve,

            Re:
            http://home.mchsi.com/~theinventorspot/myfishtank.htm
            <O</Ohttp://www.maxim-ic.com/quick_view2.cfm/qv_pk/4588/t/al

            Comment

            Working...
            X