View Single Post
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#958
Originally Posted by slarti View Post
Ok, this is driving me nuts. I finally understood how to write a simple script (never done one before) to check a value in a text file and wget my server rewriting that file. This works in terminal, but for some reason, not in QBW. The wget is never sent.

PHP Code:
#!/bin/sh

state=$(awk '{ FS = "~" } ; /Ruokapöytä/{print $4}' zwave.txt)
if [ 
"$state== "0" ]; then 
wget 
-Ozwave.txt 'http://ipaddress:port/ZwaveCommand?command=device&id=22&level=99'
exit 0
else
wget -Ozwave.txt 'http://ipaddress:port/ZwaveCommand?command=device&id=22&level=0'
exit 1
fi

What am I doing wrong?

Any help would be appreciated.

P.S. Is there some way to enable/disable a set alarm in a script?
Hi, have you tried it in the Advanced Dialog Box Test Drive?
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras