I try to send every minute the last outdoor temperature to the rrdtool command. In the documents i see that exists a "shell-cmd". How can i submit one or more values to the action command? My rule shows like that:
It's not possible to include the value of an object in shell commands.
Something you can do is configure persistency:
<persistence type="file" path="/var/lib/linknx/persist"/>
and the object you want to monitor:
<object type="9.xxx" id="outdoor_temp" init="persist">Outdoor temp</object>
With this configuration, the value of object "outdoor_temp" will be written to file /var/lib/linknx/persist/outdoor_temp every time the value changes
(it's a good idea to choose a persistency path located on a ramdisk to avoid unnecessary write to disk or flash)
Then, your shell script called command.sh can execute every minute and access that file to know the actual object value.
Regards,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
my actually config does it. I hope for a better solution. But ok, i can do it with persist value, thats not a problem. Your suggestion for the ramdisk is good thing for small clients! I am use my server at home, that's why i have not problems with a lot of disk write. But i test this too!
Thanks Ronny.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I try to send every minute the last outdoor temperature to the rrdtool command. In the documents i see that exists a "shell-cmd". How can i submit one or more values to the action command? My rule shows like that:
<rule id="time_date">
<condition type="timer" trigger="true">
<every>60</every>
</condition>
<actionlist>
<action type="shell-cmd" cmd="command.sh" />
</actionlist>
</rule>
Hi,
It's not possible to include the value of an object in shell commands.
Something you can do is configure persistency:
<persistence type="file" path="/var/lib/linknx/persist"/>
and the object you want to monitor:
<object type="9.xxx" id="outdoor_temp" init="persist">Outdoor temp</object>
With this configuration, the value of object "outdoor_temp" will be written to file /var/lib/linknx/persist/outdoor_temp every time the value changes
(it's a good idea to choose a persistency path located on a ramdisk to avoid unnecessary write to disk or flash)
Then, your shell script called command.sh can execute every minute and access that file to know the actual object value.
Regards,
Jean-François
Hi,
my actually config does it. I hope for a better solution. But ok, i can do it with persist value, thats not a problem. Your suggestion for the ramdisk is good thing for small clients! I am use my server at home, that's why i have not problems with a lot of disk write. But i test this too!
Thanks Ronny.