Announcement

Collapse
No announcement yet.

Feature request - Projected Date/Time

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

    Feature request - Projected Date/Time

    Hi Michael,
    Would it be possible to add this feature request to your application? I would like to have a way, like a status code that would tell a projected watering for each zone. This feature would help with my HSTouch project. I would like to see on the screen that I'm designing, the projected time for each of the zones.

    Thanks,
    Aldo

    #2
    The projected time for the next zone is provided by the scripting function

    Public Function OverallStatus(ByVal bStripHTML As Boolean) As String

    Its use should be something like

    Status = hs.Plugin("mcsSprinklersP").OverallStatus(false)

    It will give the zone and time when it will run

    Adding a new house codes for predicted time is a step I do not want to do right now.

    Comment


      #3
      I try to create a vb file but is giving me an error.
      When I have it working, how many minute interval should I run it to get the same values as yours?

      I have four zones, looks like that I can create a device and pass the status in it, how do I get the status of each zone? Not so good on scripts.
      Thanks,
      Aldo

      Created a file called Sprinkler.vb

      Public Function OverallStatus(ByVal bStripHTML As Boolean) As String

      Status = hs.Plugin("mcsSprinklersP").OverallStatus(false)
      hs.writelog("Sprinkler",Status)
      end Function

      Comment


        #4
        I have never written .NET scripts so you need to ask elsewhere. My guess is

        sub MAIN()
        Status = hs.Plugin("mcsSprinklersP").OverallStatus(false)
        hs.writelog("Sprinkler",Status)
        end sub

        I am familiar with the older .txt format for scripts.

        The basic update interval for mcsSprinklers is 60 seconds.

        The only exposed method for obtaining predicted irrigation time is the one for the next zone that is scheduled. If a zone is running then other information is presented for OverallStatus such as time remaining. The other zones predicted time is not made visible via script or devices. The only method available today to get it would be to do something like getURL for the runlog page and look for the data of interest from the returned result. If you do this then no need for the OverallStatus since the run list page has all zones listed.

        Comment


          #5
          Aldo, give this a shot. I just tested it on mine.
          Code:
          Sub Main(parm as object)
            Dim Status as String
            Status = hs.Plugin("mcsSprinklersP").OverallStatus(true)
            hs.writelog("Sprinkler",Status)
          End Sub
          It wrote "^24 (Harness1 Wire 8) with 72 Minutes Left" to my event log. (My sprinklers are running at the moment).

          If you change ...OverallStatus(true) to ...OverallStatus(false) it will return an HTML formatted string instead.
          HS Pro 3.0 | Linux Ubuntu 16.04 x64 virtualized under Proxmox (KVM)
          Hardware: Z-NET - W800 Serial - Digi PortServer TS/8 and TS/16 serial to Ethernet - Insteon PLM - RFXCOM - X10 Wireless
          Plugins: HSTouch iOS and Android, RFXCOM, BlueIris, BLLock, BLDSC, BLRF, Insteon PLM (MNSandler), Device History, Ecobee, BLRing, Kodi, UltraWeatherWU3
          Second home: Zee S2 with Z-Wave, CT101 Z-Wave Thermostat, Aeotec Z-Wave microswitches, HSM200 occupancy sensor, Ecolink Z-Wave door sensors, STI Driveway Monitor interfaced to Zee S2 GPIO pins.

          Comment


            #6
            Hi reidfo,
            I appreciated your help, expecially when I do not know how to write scripts, this is a big help.
            I was actually looking for the Projected time (see picture attached). What I'm interested in is the projected date and time the zone will go off. It will help me to determine if I should postpone the sprinker irrigation or not. The script that you built works without issues but gives me the following results (1 (Zone1) at Today 4:30:00 AM not what I was looking for, beside not sure where the routine is getting these values; from the graph attached I do not have any status as of today at 4:30 AM.

            I hope Michael can put us to the right direction with another routine that does what I mentioned above, I'm sure other people would like to use it in their projects as well.
            Attached Files

            Comment


              #7
              Unfortunately I wasn't able to find any method in the help file to do what you're looking for. Hoping Michael can respond also because that seems like a very useful function to have.
              HS Pro 3.0 | Linux Ubuntu 16.04 x64 virtualized under Proxmox (KVM)
              Hardware: Z-NET - W800 Serial - Digi PortServer TS/8 and TS/16 serial to Ethernet - Insteon PLM - RFXCOM - X10 Wireless
              Plugins: HSTouch iOS and Android, RFXCOM, BlueIris, BLLock, BLDSC, BLRF, Insteon PLM (MNSandler), Device History, Ecobee, BLRing, Kodi, UltraWeatherWU3
              Second home: Zee S2 with Z-Wave, CT101 Z-Wave Thermostat, Aeotec Z-Wave microswitches, HSM200 occupancy sensor, Ecolink Z-Wave door sensors, STI Driveway Monitor interfaced to Zee S2 GPIO pins.

              Comment


                #8
                As I have stated previously in this thread I am not going to add another house code to record projected irrigation times for each zone. The best organization for this to have this information as a property of a device, but HS does not make this convenient. I also do not want to change the public interface in the middle of a version release cycle. This will cause update issues for users.

                Today the only mechanism of getting internal information about irrigation schedule is via the provided HTTP interface. A HS device or script interface does not provide it today. I could add an xAP interface as it does not have the downside of the HS API changes, but generally most HS users do not use the xAP interface.

                My recommendation is that your touch screen design be made to be compatible with the capabilties you are able to use. Zones are run in sequence so if you know the time the first zone will start then you will have a very good idea when the others will run. You will likely find that a UI that reflects the next scheduled irrigation cycle will be less cluttered than one that itemizes each zone's start time. This was the philosophy used for the mcsSprinkers Touch layout and that is why this one OverallStatus method was provided.

                For a zone that is currently running mcsSprinklers provides no prediction of the next irrigation cycle. It is currently active. If you do not want the information about the amout of time remaining in the current active cycle then check to see if the zone is active before calling OverallStatus and display text that reflect it is active.

                Comment


                  #9
                  Thanks both for your help.

                  Comment

                  Working...
                  X