Announcement

Collapse
No announcement yet.

EtherRain Zone and Controller Status for HS3

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

  • #16
    Ed,
    Thanks a bunch for the info. I'm just now getting a chance to look at this and try and get my system setup for the status and have a couple questions. I'm not too familiar with scripting, so these may seem as very basic questions...

    I assume I take the modifications you listed and place them int he EtherRain.vb file, correct? I did this, and created a device with address 133 and the status numbers you listed, however that device never changes status. I tried creating a manual event to run the vb file and still had no luck. Also, in the edits you provided you mostly referenced device 133, however in one place you listed 135. Should I have another device 135 that references something? And last question is where does the test you listed in your 2nd post get inserted in the vb file?

    Or am I way off in my understanding of all of this? I appreciate your help!

    Comment


    • #17
      Sorry I don't check this post very oftern. I will try to check it more often.
      This might be easier to take offline as I can send screenshot via email. I am not that good with post (this is the only site I have ever posted to). Ed_Stasney_Jr@yahoo.com (minus the underscores). I check that email address every couple of days so be patient if I don't answer right away.

      Now to answer your questions. I take the orginal script and just rename it and then make the adjustments. For example I have Jim's orginal script and rename it etherrain-status.vb. Once I have renamed it I make the modifications and then run the script. At my house I have a value that I can turn off the water to the irrigation system yet still have the water working in the house (just a idea - allows for good testing). FYI, I also have a script that is called EtherRain-stations (and a couple of others).

      My ID reference 133 is my status (see below)
      1 running
      2 waiting
      3 short
      4 unknown
      5 ready
      6 suspended
      7 disabled by user



      these are the snippits that make it work
      hs.SetDeviceValueByRef (133, 4, True) (this one means unknown)
      hs.SetDeviceValueByRef (133, 5, True) (this one means ready)


      If you want in homeseer control panel you can hand run these to see if the values change. I am at work so I am doing this from memory. The script above should work or you may have to add "&" infront of hs.set...

      In my scripts I have device id 135 and that represents what station my system is. When the device goes to a running state I poll my EtherRain device about once a minute to find out what station it is on. You don't have to have device id 135 to make the status (device 133) work. If you don't have it it will error and ignore the 135 device.

      Not sure what you are talking about in your last question about the testing. I will continue to help as so many others have helped me. I think EtherRain works pretty well and I am willing to promote it so hang with it as it does everything that is needed.

      Comment


      • #18
        I wanted to update this post with some results for anyone that has been following this or is interested. I owe a ton of thanks to edstasneyjr for his help with working out the code on this, as well as Jim at QuickSmart for helping with a side issue.

        The confusion I was having with Ed's script was getting all of the timing down. The solution was to add an action to the events that turned on my sprinklers that would use the getStatus call against the script. Another event (call it Event 1) is configured to monitor the value of the system status device as Ed described above. Once it saw a change to 'running' it would execute and rerun the getStatus and trigger another event that circles back and runs Event 1 again with some delay times built in. The end result is that the getStatus is run periodically in order to return the results of the system (running, ready, etc) as well as what zone was active. Ed has his setup to run every minute; I chose to run mine every 30 seconds, but I don't have a very busy system otherwise.

        My ultimate goal was to have buttons in HSTouch that would dynamically reflect the state of the zone. To accomplish this, I added the following code to the script Ed posted. Obviously, the reference ID's are specific to my system, and you would need to change them accordingly to match your devices. The top 8 lines are from Ed's post to give you reference.

        k = InStr(webstr, "ri:")
        wstr = "?"
        If k > 0 Then
        wstr = Mid(webstr, k + 4, 1)
        End If
        wstr = str(val(wstr) + 1)
        hs.writelog ("EtherRain-ES", wstr )
        hs.setdeviceValueByRef (33, wstr, True)


        Dim P as Integer
        P = hs.DeviceValue (33)
        If P = 1 Then
        hs.SetDeviceValueByRef (27, 1, True)
        hs.SetDeviceValueByRef (28, 0, True)
        hs.SetDeviceValueByRef (29, 0, True)
        hs.SetDeviceValueByRef (30, 0, True)
        hs.SetDeviceValueByRef (31, 0, True)
        hs.SetDeviceValueByRef (32, 0, True)
        End If
        If P = 2 Then
        hs.SetDeviceValueByRef (28, 1, True)
        hs.SetDeviceValueByRef (27, 0, True)
        hs.SetDeviceValueByRef (29, 0, True)
        hs.SetDeviceValueByRef (30, 0, True)
        hs.SetDeviceValueByRef (31, 0, True)
        hs.SetDeviceValueByRef (32, 0, True)
        End If
        If P = 3 Then
        hs.SetDeviceValueByRef (29, 1, True)
        hs.SetDeviceValueByRef (27, 0, True)
        hs.SetDeviceValueByRef (28, 0, True)
        hs.SetDeviceValueByRef (30, 0, True)
        hs.SetDeviceValueByRef (31, 0, True)
        hs.SetDeviceValueByRef (32, 0, True)
        End If
        If P = 4 Then
        hs.SetDeviceValueByRef (30, 1, True)
        hs.SetDeviceValueByRef (27, 0, True)
        hs.SetDeviceValueByRef (28, 0, True)
        hs.SetDeviceValueByRef (29, 0, True)
        hs.SetDeviceValueByRef (31, 0, True)
        hs.SetDeviceValueByRef (32, 0, True)
        End If
        If P = 5 Then
        hs.SetDeviceValueByRef (31, 1, True)
        hs.SetDeviceValueByRef (27, 0, True)
        hs.SetDeviceValueByRef (28, 0, True)
        hs.SetDeviceValueByRef (29, 0, True)
        hs.SetDeviceValueByRef (30, 0, True)
        hs.SetDeviceValueByRef (32, 0, True)
        End If
        If P = 6 Then
        hs.SetDeviceValueByRef (32, 1, True)
        hs.SetDeviceValueByRef (27, 0, True)
        hs.SetDeviceValueByRef (28, 0, True)
        hs.SetDeviceValueByRef (29, 0, True)
        hs.SetDeviceValueByRef (30, 0, True)
        hs.SetDeviceValueByRef (31, 0, True)
        End If



        The end result for me is the following screen in HSTouch
        Attached Files

        Comment


        • #19
          I like it! I have a lot of questions, but I will start with a few.

          I am guessing device numbers 27-32 are for your 6 zones. Is that correct and are they status only devices?

          Are the bottom 4 buttons just using the existing function calls within Jim's current script?

          Would you mind attaching your modified script - or are you just using the above as a separate script to get the status? I am not well-versed at scripting and that would help me to understand a little better.
          Randy Prade
          Aurora, CO
          Prades.net

          PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

          Comment


          • #20
            Yes. Devices 27-32 are my zones; 33 is a device that reflects the station status (displays what zone is running). the getStatus will control the device value of 33, and I then use that value to set the values (on or off) of 27-32 for the graphics. The bottom 4 are just as you assumed; they simply activate events that run the default calls in Jim's script.

            Below is the portion of the script that provides the status. Again, thanks to Ed for pretty much all of this. Save a copy of your original Etherrain.vb file as something else (i.e. Etherrain-Status.vb), that way you don't screw up what already works (learned that one the hard way...). Then make the modifications as explained above.

            Comment

            Working...
            X