Menu

Set value from value of a GAD?

Help
2008-03-06
2012-12-14
  • Frank Eisold

    Frank Eisold - 2008-03-06

    Hello,

    it is possible to set a value of an object from another object with gad?

    I would like to do following:
    If the door to my garden will be opened the status of the blind should stored in an object so that if the door is closed the blind drive to the position that was stored before.

    THX
    Frank
    Berlin/Germany

     
    • jef2000

      jef2000 - 2008-03-06

      So, if I summarize it well, you would like something like:

      <rule id="door_blinds">
        <condition type="object" id="door_opened" value="on" trigger="true"/>
        <actionslist>
          <action type="copy-value" from="blind_position" to="saved_blind_position"/>
          <action type="set-value" id="blind_position" value="0" delay="1" />
        </actionslist>
        <actionslist type="on-false">
          <action type="copy-value" from="saved_blind_position" to="blind_position"/>
        </actionslist>
      </rule>

      It's not yet possible, but could be implemented quite fast if it fits your needs.

      Regards,

      Jean-François

       
      • Frank Eisold

        Frank Eisold - 2008-03-07

        That sounds good!

        Is it right, that "copy from .. to" an object that is assigned to a gad send these gad to the eibd?

        Another solution could be: the "set-value"-action set the value from an object and not only the standard EIS-types like
        first
        <action type="set-value" id="saved_blind_position" valueid="blind_position"/>
        later
        <action type="set-value" id="blind_position" valueid="saved_blind_position"/>

        Next possible usage would be to store and display values if a rule triggers a condition with comparison operator, for instance to display max/min temperature incl. time, time of last action (door was opened, last rain..).

        Frank

         
    • jef2000

      jef2000 - 2008-03-07

      > Is it right, that "copy from .. to" an object that is assigned to a gad send these gad to the eibd?
      Yes, if the value is different from the  previous one and "t" flag (transmit) of the object is set, but that's the default.
      You can also force sending when the value didn't change using the "f" flag (force-write).

      > Another solution could be: the "set-value"-action set the value from an object
      I'll look at the code and see which alterantive is the easiest to do.

      > Next possible usage would be to store and display values if a rule triggers a condition with comparison operator,
      > for instance to display max/min temperature incl. time, time of last action (door was opened, last rain..).
      Min and Max will be part of the arithmetic operations dicussed on another forum thread.
      You can already store the time when a rule was last triggered with an action like:
          <objects>
              <object id="last_time_door_opened" type="EIS3">Last time the door was opened</object>
          </objects>
          <rules>
              <rule id="last_time_door_opened">
                  <condition type="object" id="door_opened" value="on" trigger="true"/>
                  <actionlist>
                      <action type="set-value" id="last_time_door_opened" value="now" />
                  </actionlist>
              </rule>
          </rules>

      Regards,

      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.