|
2010-11-24
, 18:46
|
Posts: 59 |
Thanked: 16 times |
Joined on May 2010
|
#952
|
|
2010-11-24
, 20:18
|
|
Posts: 40 |
Thanked: 14 times |
Joined on Sep 2009
@ Monterrey Mexico
|
#953
|
i=10;
j=9;
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:$j string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$i string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.reset_rearm_timer;
i=0;
j=0;
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:$j string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$i string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.reset_rearm_timer;
|
2010-11-24
, 20:49
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#954
|
OK almost done, :P
I Just have one problem.
I can activate the "delayIndex" and set "customIntervalSecs" to start updating.
What I Can't do is make it stop.PHP Code:
i=10;
j=9;
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:$j string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$i string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.reset_rearm_timer;
This doesn't stop running avery 10 sec.
When i get into the setting @Interval is disable, but script still running until I save settings eaven without making any changes.PHP Code:
i=0;
j=0;
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:$j string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$i string:'' | 'update_content' | 'update_layout';
dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.reset_rearm_timer;
i=10;
j=9;
dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:$j string:'';
dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$i string:'';
dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.reset_rearm_timer;
i=0;
j=0;
dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:$j string:'';
dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$i string:'';
dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid0 oh.no.more.qbw.reset_rearm_timer;
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-11-25
, 07:33
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#955
|
PLEASE HELP NEEDED>>>
i want to make a QBW for rebooting device please help me to execute command in QBW. i will be really thankful to u
|
2010-11-25
, 09:30
|
Posts: 309 |
Thanked: 115 times |
Joined on May 2010
@ Malaysia
|
#956
|
|
2010-11-25
, 09:58
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#957
|
hi, may i know how do i delete the QBW saved widget?
where is the path for saved widget?
if i remove the widgets (say id0,id1,id2) from the desktop, and then i want to add a new qbw widget, the existing previous widget (id0, id1 which i previously removed) was added back..
is there any way i can remove those widget from the phone?
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-11-25
, 12:37
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#958
|
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.
What am I doing wrong?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;
Any help would be appreciated.
P.S. Is there some way to enable/disable a set alarm in a script?
|
2010-11-25
, 21:09
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#959
|
node=$(awk -F"~" "/$name/ "'{print $3}' /home/user/zwave/zwave.txt)
state=$(awk -F"~" "/$name/ "'{print $4}' /home/user/zwave/zwave.txt)
if [ "$state" == "0" ]
then wget -O/home/user/zwave/zwave.txt "http://ipaddress:port/ZwaveCommand?command=device&id=${node}&level=99"
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"$name ON"
exit 0
else wget -O/home/user/zwave/zwave.txt "http://ipaddress:port/ZwaveCommand?command=device&id=${node}&level=0"
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"$name OFF"
exit 1
fi;
name="Node name"; export name; sh /home/user/zwave/script
name="Node name";
node=$(awk -F"~" "/$name/ "'{print $3}' /home/user/zwave/zwave.txt);
state=$(awk -F"~" "/$name/ "'{print $4}' /home/user/zwave/zwave.txt);
if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
if [ "$state" == "0" ]; then
exit 0;
if [ "$state" != "0" ]; then
exit 1;
fi;
fi;
if [ "$QBW_EXEC_REASON" == "QBW_DBUS_UPDATE_CONTENT" ]; then
if [ "$state" == "0" ]; then
exit 0;
if [ "$state" != "0" ]; then
exit 1;
fi;
fi;
if [ "$QBW_EXEC_REASON" == "QBW_CLICK" ]; then
export name;
sh /home/user/zwave/state;
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid3 oh.no.more.qbw.update_content;
fi
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw<idX> oh.no.more.qbw.<method> <type1>:"<param1>" <type2>:"<param2>" ... <typeN>:"<paramN>"
|
2010-11-25
, 22:21
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#960
|
Yes, I tried it. The problem was the missing path.
I now have a working script that does what I want for a single node (you have to excuse my code, I really have never done this before):
I call it in QBW with:PHP Code:
node=$(awk -F"~" "/$name/ "'{print $3}' /home/user/zwave/zwave.txt)
state=$(awk -F"~" "/$name/ "'{print $4}' /home/user/zwave/zwave.txt)
if [ "$state" == "0" ]
then wget -O/home/user/zwave/zwave.txt "http://ipaddress:port/ZwaveCommand?command=device&id=${node}&level=99"
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"$name ON"
exit 0
else wget -O/home/user/zwave/zwave.txt "http://ipaddress:port/ZwaveCommand?command=device&id=${node}&level=0"
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"$name OFF"
exit 1
fi;
Now I'm trying to make them update on startup, update whenever zwave.txt gets rewritten and work as they do now.PHP Code:
name="Node name"; export name; sh /home/user/zwave/script
I just tried this in QBW:
For some reason that didn't work, it just exits with code 2. I'll keep trying...PHP Code:
name="Node name";
node=$(awk -F"~" "/$name/ "'{print $3}' /home/user/zwave/zwave.txt);
state=$(awk -F"~" "/$name/ "'{print $4}' /home/user/zwave/zwave.txt);
if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
if [ "$state" == "0" ]; then
exit 0;
if [ "$state" != "0" ]; then
exit 1;
fi;
fi;
if [ "$QBW_EXEC_REASON" == "QBW_DBUS_UPDATE_CONTENT" ]; then
if [ "$state" == "0" ]; then
exit 0;
if [ "$state" != "0" ]; then
exit 1;
fi;
fi;
if [ "$QBW_EXEC_REASON" == "QBW_CLICK" ]; then
export name;
sh /home/user/zwave/state;
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid3 oh.no.more.qbw.update_content;
fi
In the wiki there is:
Can I use multiple QBW ids in one command somehow? I'm trying to get a QBW to tell the others to update content when it is clicked.Code:run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw<idX> oh.no.more.qbw.<method> <type1>:"<param1>" <type2>:"<param2>" ... <typeN>:"<paramN>"
for i in id2 id3 id4 id5
do
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$i oh.no.more.qbw.update_content;
done
/home/user/myscripts/execme.sh $QBW_ID $QBW_EXEC_REASON
QBW_ID=$1
QBW_EXEC_REASON=$2
...
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
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