Announcement

Collapse
No announcement yet.

Davis Weather Station & HomerSeer Discussion

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

    #16
    Bob,

    I don't think so. The weather tags are in the weatherlink help file.

    Probably best to make a new virtual device like you said.

    I would like to start using a charting package. I wish charting was a standard feature in HS and not an add-on.

    Comment


      #17
      The virtual device option to capture today's temp for use as tomorrow's yesterday has proven to be much more difficult than I thought it would be.

      Today's temp is a string and I have tried capturing just the hightemp before it becomes a string and saving it to a virtual device, but I can't get that to work. No clue what I am doing wrong. I'm not getting any errors in the HS log, but I'm not getting a value in the virtual device either.

      In summary, my "simple" approach is kicking my keester.

      Any ideas?

      Comment


        #18
        is there no device value associated with the device that holds your todays temp?
        Marty
        ------
        XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
        Playing with HS3 a bit but it's just play at this point.

        Comment


          #19
          Hi Marty...

          Yep, but its value is a string. (Example: 77.3 at 1:37p).

          I think I want just the 77.3 so I can use it as a condition tomorrow. Would you agree?

          Comment


            #20
            Originally posted by cjrs27 View Post
            Hi Marty...

            Yep, but its value is a string. (Example: 77.3 at 1:37p).

            I think I want just the 77.3 so I can use it as a condition tomorrow. Would you agree?
            cjrs,
            There's devicestring which is what is shown on the device screen and then there is a deviceValue that is a hidden value that is "normally" used to store the dim level but can store any number for a virtual device. Bring up the HomeSeer Control panel and key in - in the Immediate Script Command field
            &msgbox(hs.deviceValue("A1")) changing the A1 to your virtual device code
            and see what is returned. This will only work when ran on the HS server.
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #21
              Unless I'm way off a value can only be a number. Here is a little one line script I run when I'm trying to get info from a device. This will write to the log the string and value so you can see what they really are. Make sure you change the v99 to whatever device you're interested in.

              PHP Code:
              &hs.Writelog "INFO""DeviceString = " hs.DeviceString("v99") & " - DeviceValue = " hs.DeviceValue("v99"
              Marty
              ------
              XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
              Playing with HS3 a bit but it's just play at this point.

              Comment


                #22
                It comes back with just a plain "73", no string.

                OK, so that tells me I have been chasing my own tail a bit. Because I couldn't get my D93 value set to equal my D63 value I had assumed, erroneously, that it was because it was a string.

                So, back to the drawing board on the script you gave me on the scripting thread at http://board.homeseer.com/showthread.php?t=141972

                Comment


                  #23
                  Originally posted by cjrs27 View Post
                  It comes back with just a plain "73", no string.

                  OK, so that tells me I have been chasing my own tail a bit. Because I couldn't get my D93 value set to equal my D63 value I had assumed, erroneously, that it was because it was a string.

                  So, back to the drawing board on the script you gave me on the scripting thread at http://board.homeseer.com/showthread.php?t=141972
                  That script sets one deviceValue to the value of another. Are you wanting to set a devicestring to another devices value? If so try
                  sub main()
                  hs.setDeviceString "A2",hs.deviceValue("A1")
                  end sub
                  💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                  Comment


                    #24
                    Nope, I want to set the value of D93 equal to the value of D63...just the value.

                    Not sure why I can't get that to work, I'll capture some more info and post it back over in the scripting thread.

                    Comment


                      #25
                      So this didn't work?
                      sub main()
                      hs.setDeviceValue "D93",hs.deviceValue("D63")
                      end sub
                      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                      Comment


                        #26
                        Hi Rupp...

                        That's what I am figuring out with your help.

                        It looks like the device value was probably being set correctly with your script...but because I wasn't seeing that value on the HS Status page I assumed it wasn't working. But, using your &msgbox(hs.deviceValue("D93")) trick I can indeed see that the value of D93 is being set to the value of D63...I just wasn't checking for it in a valid way.

                        So, if I want to display the new device value for d93 on the virtual device on the HS Status page, would that be a device string I need to set?

                        Comment


                          #27
                          Originally posted by cjrs27 View Post
                          Hi Rupp...

                          That's what I am figuring out with your help.

                          It looks like the device value was probably being set correctly with your script...but because I wasn't seeing that value on the HS Status page I assumed it wasn't working. But, using your &msgbox(hs.deviceValue("D93")) trick I can indeed see that the value of D93 is being set to the value of D63...I just wasn't checking for it in a valid way.

                          So, if I want to display the new device value for d93 on the virtual device on the HS Status page, would that be a device string I need to set?
                          Yes, see post #23
                          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                          Comment


                            #28
                            Cool! That works great.

                            Thank you.

                            Comment


                              #29

                              Comment


                                #30
                                Code:
                                &hs.setDeviceValue "W65",hs.deviceValue("W63"): 
                                hs.setDeviceString "W65",hs.deviceString("W63"): 
                                hs.setDeviceValue "W66",hs.deviceValue("W64"): 
                                hs.setDeviceString "W66",hs.deviceString("W64")

                                Comment

                                Working...
                                X