Menu

EIS2 Dim up rule does not work

Help
toer
2008-03-08
2012-12-14
  • toer

    toer - 2008-03-08

    Hi
    I tried to get 4 functions out of one rocker today and noticed that i could not get dim up action to work.

    Here are the config:
    <rule id="test1">
      <condition type="object" id="office_rocker3_long" value="down" trigger="true" />
      <actionlist>
        <action type="set-value" id="office_rocker1" value="off" delay="0" />
        <action type="set-value" id="office_rocker1" value="on" delay="2" />
      </actionlist>
    </rule>
    <rule id="test2">
      <condition type="object" id="office_rocker3_long" value="up" trigger="true" />
      <actionlist>
        <action type="set-value" id="office_rocker1" value="off" delay="0" />
        <action type="set-value" id="office_rocker1" value="on" delay="10" />
      </actionlist>
    </rule>

    Here are the log:
    DimmingObject (id=office_rocker3_long): Compare object='down:1' to value='down:1'
    ObjectCondition (id='office_rocker3_long') evaluated as '1'

    DimmingObject (id=office_rocker3_long): Compare object='up:1' to value='up:1'
    ObjectCondition (id='office_rocker3_long') evaluated as '0'

    compare object is the same as the value but it gets evaluated as '0' is this a bug or is it my mistake?

    Kindly regards,
    Tore

     
    • jef2000

      jef2000 - 2008-03-09

      Hi,

      Yes, it's a bug. I just found it.
      The value of direction is normally 1=up or 0=down . In the logs you provided, both values say "up" but the variable behind it is 1 for the constant, and 8 for the object value received from bus (because I forgot to shift it 3bits right). Since the comparison uses integer values, the result is "different".
      I'll fix it in next release.

      Thanks for  finding the bug,

      Jean-François

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.