Announcement

Collapse
No announcement yet.

What's wrong with this in 2.0?

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

    What's wrong with this in 2.0?

    I have a script I was using in conjunction with Stargate (HVAC Tempmode is a Stargate imported device) that worked fine with 1.7, but now won't fire. I'm guessing that there's something about "hs.devicevaluebyname" that 2.0 doesn't like, but nothing shows in the log at all except that the script did in fact run. Would appreciate any info to correct this:

    function readMode()
    if hs.devicevaluebyname ("HVAC Tempmode")=1 then
    hs.setdeviceString "[8","OFF"
    end if
    if hs.devicevaluebyname ("HVAC Tempmode")=2 then
    hs.setdeviceString "[8","Heat"
    end if
    if hs.devicevaluebyname ("HVAC Tempmode")=3 then
    hs.setdeviceString "[8","Cool"
    end if
    if hs.devicevaluebyname ("HVAC Tempmode")=4 then
    hs.setdeviceString "[8","Auto"
    end if
    if hs.devicevaluebyname ("HVAC FanMode")=5 then
    hs.setdeviceString "[13","Auto"
    end if
    if hs.devicevaluebyname ("HVAC FanMode")<>5 then
    hs.setdeviceString "[13","On"
    end if
    end function


    Thanks!

    #2
    What is calling the function? The code is fine.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      It's a Mainlobby scene startup command (script name="HVAC.txt"). It's not just that it's not being passed to Mainlobby. The variable's value remains at 3 in Homeseer:

      MLServeCmd.MLHSPlugin|HS_RunEX:HVAC.txt~readMode~{{[8}}

      Comment


        #4
        Actually, never mind. Just figured it out. When importing the Stargate devices it changed the device location. I corrected it, and now it works fine. Sorry to bother!

        Comment

        Working...
        X