Announcement

Collapse
No announcement yet.

Trigger HS event from web button click

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

  • Trigger HS event from web button click

    Hi,

    The point of the attached code is to trigger 1 of any 4 hs events via a button press on a web page and set the zwave thermostat to off, heat, cool or auto modes.

    If I click the button Off the thermostat is turned off but why it seems to work is confusing. When I examine the value of sVal1 (I am writing them (it) to the hs log) it would seem to be blank. The buttons for Heat or Cool have no apparent action (aside from a page reload) and the button for Auto does set the thermostat back into Auto mode. Again though the value of sVal4 seems to be null (or zero length string or blank) and this leaves me confused -much more so than my normal state of confusion. Anyway, does anyone see what stupid mistakes I am making?

    -rick
    Attached Files
    -Rick

  • #2
    It's because your sval1, sval2, etc are form element names. Ie name="sVal1"
    "sVal1" and sVal1 are not the same. One is a string and one is undefined.
    -Rupp
    sigpic

    Comment


    • #3
      Rupp,

      It took me a moment (ok more than a moment) to understand your response. Eventully it dawned on me you were addressing my error when I was trying to use the form element names in the hs.writelog lines. Once I corrected that error it allowed me to see the fundmental loigic error as I was testing for the wrong values in two of the buttons - with the eroor I had the test could never be true. Anyway thanks for taking the time as your help pointed me in the right direction.

      -rick
      -Rick

      Comment

      Working...
      X