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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> 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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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
> 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