Announcement

Collapse
No announcement yet.

speak temperature

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

    speak temperature

    There is a post in the how to section on how to speak when temp changes i can not get it to work in HS3 anyone can help would be greatly appreciated here is what i have entered:

    &hs.speak "the temp is & hs.DeviceValue("Q43")/10

    and this is what the log entry is:

    Running script(2) &hs.speak "the temp is & hs.DeviceValue("Q43")/10, init error: Syntax error

    #2
    HS3 uses device reference integers... where DevRef is the Reference Number of the Device you are trying to use.

    hs.DeviceValue(DevRef)/10

    or

    hs.DeviceValueByName(DevName)/10

    Hope this is helpful.


    Originally posted by tymco View Post
    There is a post in the how to section on how to speak when temp changes i can not get it to work in HS3 anyone can help would be greatly appreciated here is what i have entered:

    &hs.speak "the temp is & hs.DeviceValue("Q43")/10

    and this is what the log entry is:

    Running script(2) &hs.speak "the temp is & hs.DeviceValue("Q43")/10, init error: Syntax error
    Don

    Comment


      #3
      I tried this:

      &hs.speak "the temp is & hs.DeviceValue(E1AC33E9-025-Q43)/10

      and got this:

      Error Running script(2) &hs.speak "the temp is & hs.DeviceValue(E1AC33E9-025-Q43)/10, init error: Unterminated string constant


      also tried:

      Error Running script(2) &hs.speak "the temp is & hs.DeviceValueByName(Temperature)/10, init error: Unterminated string constant
      Dec-02 4:29:23 AM Event Running script statement immediately: &hs.speak "the temp is & hs.DeviceValueByName(Temperature)/10
      Dec-02 4:29:23 AM Event Event Trigger "Speak Temperature Speak Temperature"
      Dec-02 4:29:23 AM Z-Wave Device: Node 25 Z-Wave Temperature Set to 61.1 (F)

      Comment


        #4
        Originally posted by tymco View Post
        I tried this:

        &hs.speak "the temp is & hs.DeviceValue(E1AC33E9-025-Q43)/10

        and got this:

        Error Running script(2) &hs.speak "the temp is & hs.DeviceValue(E1AC33E9-025-Q43)/10, init error: Unterminated string constant


        also tried:

        Error Running script(2) &hs.speak "the temp is & hs.DeviceValueByName(Temperature)/10, init error: Unterminated string constant
        Dec-02 4:29:23 AM Event Running script statement immediately: &hs.speak "the temp is & hs.DeviceValueByName(Temperature)/10
        Dec-02 4:29:23 AM Event Event Trigger "Speak Temperature Speak Temperature"
        Dec-02 4:29:23 AM Z-Wave Device: Node 25 Z-Wave Temperature Set to 61.1 (F)

        Not sure if that value is a name or not, but if it's the name you need to do it like

        &hs.speak("the temp is " & hs.DeviceValueByName("E1AC33E9-025-Q43")/10)
        Last edited by sirmeili; December 2, 2016, 09:30 AM. Reason: Changed DeviceValue to DeviceValueByName

        Comment


          #5
          You can also use Replacement variables. Look here for more info on them:

          http://homeseer.com/support/homeseer..._variables.htm


          Z

          Comment


            #6
            You need to use the Device Reference ID as shown here. You were using the Technology address, I think. Or you can use the replacement variable as suggested.



            Originally posted by tymco View Post
            I tried this:

            &hs.speak "the temp is & hs.DeviceValue(E1AC33E9-025-Q43)/10

            and got this:

            Error Running script(2) &hs.speak "the temp is & hs.DeviceValue(E1AC33E9-025-Q43)/10, init error: Unterminated string constant


            also tried:

            Error Running script(2) &hs.speak "the temp is & hs.DeviceValueByName(Temperature)/10, init error: Unterminated string constant
            Dec-02 4:29:23 AM Event Running script statement immediately: &hs.speak "the temp is & hs.DeviceValueByName(Temperature)/10
            Dec-02 4:29:23 AM Event Event Trigger "Speak Temperature Speak Temperature"
            Dec-02 4:29:23 AM Z-Wave Device: Node 25 Z-Wave Temperature Set to 61.1 (F)
            Attached Files
            Don

            Comment


              #7
              Here is a one liner event that speaks time and temperature based on the reference numbers that Don mentioned above. It's not a script rather it is just text with references.
              You tell Homeseer to speak the text; easy peasy.


              Today is $date. The time is $time. The outside temperature is $$DVR:129: degrees. The inside temperature is $$DVR:1087: degrees. The relative humidity is $$DVR:1086: percent.

              Where as DVR is device reference number and you need two dollar signs in front of DVR. In the beginning of HS3 I had issues as always thought about way things were done in Homeseer 2.

              Too you can create a temperature variable and it automatically creates a reference ID for it. I do that reading 1-wire temps from the RPi2 in the attic. It is just a text file read using python, perl or just bash and HS scripting for the variables.
              Last edited by Pete; December 2, 2016, 10:25 AM.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #8
                I want to thank everyone for there help i used both script first then i tried the variable i liked the secound. which leaves me to ask another it speaks every slight change like from 76.1 to 76.2 would like it to just do hole numbers,,

                Comment


                  #9
                  Just guessing here...


                  Convert.ToInteger(hs.DeviceValue(DevRef)/10)


                  Originally posted by tymco View Post
                  I want to thank everyone for there help i used both script first then i tried the variable i liked the secound. which leaves me to ask another it speaks every slight change like from 76.1 to 76.2 would like it to just do hole numbers,,
                  Don

                  Comment


                    #10
                    Originally posted by tymco View Post
                    I want to thank everyone for there help i used both script first then i tried the variable i liked the secound. which leaves me to ask another it speaks every slight change like from 76.1 to 76.2 would like it to just do hole numbers,,
                    We speak the time and temperature on the hour. That satisfies my needs and is what makes my wife happy. She doesn't like a lot of chatter.

                    It is silent after 10:00PM and before 7:00AM on work days or before 9:00AM on weekends, holidays or days off.
                    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #11
                      For my temperature sensors I like whole numbers so I use this in the beginning of the script.

                      dim FTemp,CTemp,Humid as Short

                      Use the Short data type to contain integer values that do not require the full data width of Integer. In some cases, the common language runtime can pack your Short variables closely together and save memory consumption.

                      The default value of Short is 0


                      I am currently using a 1-wire network which writes to a text file every minute or so. The text file is read by script and converted to HS variables.

                      Here is one line / one 1-wire combo temperature and humidity sensor where the text file shows the temperature in Centigrade and Fahrenheit.

                      Aug 27 22:20:04 Sensor 1 C: 28.28 F: 82.91 H: 50%
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment

                      Working...
                      X