maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

No!No!No!Yes! 2010-11-15 07:15

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Vintrc (Post 873697)
Hi,
anyone knows about some command for hide and show all desktop?
I mean one button will be everytime on desktop and when i press it, each icons, widget etc. hide and next show back.. because if i have some nice wallpaper, it would be fine :D

For showing/hiding beecons you can just play with http://wiki.maemo.org/Queen_BeeCon_W...from_the_Shell hide/show DBUS methods towards specific beecon instances IDs example change the id1,id2,id3... ids with beecons you want to hide/show:

You can create a 2states button beecon with this script
PHP Code:

if [ "$QBW_EXEC_REASON== "QBW_STARTUP_UPDATE" ]; then
#    add here switch on instructions
    
for id in id1 id2 id3 ;do
        
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw${IDoh.no.more.show
    done
    
echo "ON";
    exit 
1;
fi;

if [ 
"$QBW_CURRENT_RESULTS_TEXT== "ON" ]; then
#    add here switch off instructions
    
for id in id1 id2 id3 ;do
        
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw${IDoh.no.more.hide
    done
    
echo "OFF";
    exit 
0;
else
#    add here switch on instructions
    
for id in id1 id2 id3 ;do
        
run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw${IDoh.no.more.show
    done
    
echo "ON";
    exit 
1;
fi

With some more effort and using the timer function the beecons could be automatically hidden after some time you have shown them ... but I'll leave that as and exercise!!!! :D:p

Vintrc 2010-11-15 08:46

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
looks nice...and what about classic icons of nokia apps and widget? i mean complet clean desktop (some what was on nokia N97).. :)

JonWW 2010-11-15 08:50

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Vintrc (Post 873697)
Hi,
anyone knows about some command for hide and show all desktop?
I mean one button will be everytime on desktop and when i press it, each icons, widget etc. hide and next show back.. because if i have some nice wallpaper, it would be fine :D

I think you want Desktop Activity Manager

Vintrc 2010-11-15 08:59

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
mmm..something like that..
thanks :)

batman 2010-11-15 11:42

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by hihi427 (Post 873289)
the one u want should be some scprits like this

Code:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
#    add here switch on instructions
    rootsh /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt
    echo "ON";
    exit 1;
fi;

if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
#    add here switch off instructions
    rootsh /usr/sbin/kernel-load /etc/default/kernel-power
    echo "OFF";
    exit 0;
else
#    add here switch on instructions
    rootsh /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt
    echo "ON";
    exit 1;

bcz kernel-config dont have a command "kernel-unload'
if u wanna retore ur setting after the button turned off just copy the default setting to the file /etc/default/kernel-power


p.s: the script doesnt work under the rootsh 1.8 if u wanna work just deinstalled the current version and download the old one 1.5 from extra but not extra-devel


No thats not working either.. I actualy created a new file called 'originalkernel.txt' and wrote the commands as NoNoYes suggested:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot
echo "ON";
exit 1;
fi;
if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
# add here switch off instructions
/usr/sbin/kernel-unload /home/user/MyDocs/originalkernel.txt | sudo gainroot
echo "OFF";
exit 0;
else
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot
echo "ON";
exit 1;
fi;

unfortunately it only loads on Start up (if start up is enabled on the widget) it doesn't want to toggle between on and off states though once activated. I haven't figured out how to create an 'off' state yet

any suggestions or pointers as to what I am doing wrong will be greatly appreciated

No!No!No!Yes! 2010-11-15 12:13

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by batman (Post 873907)
No thats not working either.. I actualy created a new file called 'originalkernel.txt' and wrote the commands as NoNoYes suggested:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot
echo "ON";
exit 1;
fi;
if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
# add here switch off instructions
/usr/sbin/kernel-unload /home/user/MyDocs/originalkernel.txt | sudo gainroot
echo "OFF";
exit 0;
else
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot
echo "ON";
exit 1;
fi;

unfortunately it only loads on Start up (if start up is enabled on the widget) it doesn't want to toggle between on and off states though once activated. I haven't figured out how to create an 'off' state yet

any suggestions or pointers as to what I am doing wrong will be greatly appreciated

try and make sure the kernel-load and unload command do not echo anything. maybe you'd like to stick some
Code:

>/dev/null
to the sudo gainroot part

batman 2010-11-15 12:18

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
again excuse the ignorance and I appreciate your patience :)

where exactly am I adding that code to the existing commands?

do you mean something like this:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot>/dev/null
echo "OFF";
exit 1;
fi;
if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
# add here switch off instructions
/usr/sbin/kernel-unload /home/user/MyDocs/originalkernel.txt | sudo gainroot>/dev/null
echo "OFF";
exit 0;
else
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot>/dev/null
echo "OFF";
exit 1;
fi;

No!No!No!Yes! 2010-11-15 12:44

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by batman (Post 873953)
again excuse the ignorance and I appreciate your patience :)

where exactly am I adding that code to the existing commands?

do you mean something like this:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot>/dev/null
echo "OFF";
exit 1;
fi;
if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
# add here switch off instructions
/usr/sbin/kernel-unload /home/user/MyDocs/originalkernel.txt | sudo gainroot>/dev/null
echo "OFF";
exit 0;
else
# add here switch on instructions
/usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot>/dev/null
echo "OFF";
exit 1;
fi;

yes exactly like that

batman 2010-11-15 12:55

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
On a slightly different note.. Does any one have any idea why I can only update my football (English Premiership) widget using Wifi and not 3G (o2 contract with unlimited data)?

batman 2010-11-15 13:09

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by batman (Post 873953)
if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot>/dev/null
echo "OFF";exit 1;fi;if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then /usr/sbin/kernel-load /home/user/MyDocs/originalkernel.txt | sudo gainroot>/dev/null
echo "OFF";exit 0; else /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot>/dev/null echo "OFF";exit 1;fi;

Still not working. I tired to paste exactly what is writen in the command. It still loads up either at start up or pressing it after initial boot. but it isn't loading the 'off' state. For all I know its not toggling between states at all.

Sash 2010-11-15 17:20

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by batman (Post 874000)
On a slightly different note.. Does any one have any idea why I can only update my football (English Premiership) widget using Wifi and not 3G (o2 contract with unlimited data)?

Try changing the timeout in the code to 10 seconds (-T value). It could be that the 3G connection isn't fast enough to collect the data if it's set to 5 seconds

Code:

wget -U "" -t 1 -T 10 -q -O - 'http://m.espn.go.com/soccer .....

ndi 2010-11-16 13:52

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Hi.

Didn't read the whole thread, was this already requested before:

I'd like to have the option to pop an option menu on a widget instance. For example, an OC widget, when clicked, would pop up a menu that shows 600, 900 and 1000.

I realize it's not very easy, but if each option has its own command it shouldn't be impossible, methinks. For example, commands could be separated by a reserved sequence. An OC widget could have its command property set to OC600&OC900, and disallow ampersand in command title. Will need to allow command to be custom istead of a list.

batman 2010-11-16 14:03

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
updating what I said, by adding the gainroot>/dev/null that I added to the end of the 3 states commands created system instability and it didn't create an off state (or toggling between states or both) either.

Surely it must be possible using 2 kernel files? 1 which has been customised (an 'on' state) and one which is stock (an 'off' state)

the command:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot

deffinately works at start up (if enabled) or when clicked after start up.

so maybe its not toggling between states because of the sudo gainroot command?

I tried replacing the on/off states commands with:

if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
rootsh /usr/sbin/kernel-load /home/user/MyDocs/originalkernel.txt
echo "OFF";
exit 0;
else
rootsh /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt
echo "ON";
exit 1;


:confused: helppp :)

No!No!No!Yes! 2010-11-16 15:17

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by ndi (Post 875032)
Hi.

Didn't read the whole thread, was this already requested before:

I'd like to have the option to pop an option menu on a widget instance. For example, an OC widget, when clicked, would pop up a menu that shows 600, 900 and 1000.

I realize it's not very easy, but if each option has its own command it shouldn't be impossible, methinks. For example, commands could be separated by a reserved sequence. An OC widget could have its command property set to OC600&OC900, and disallow ampersand in command title. Will need to allow command to be custom istead of a list.

technically speaking it can be done by using dbus methods for hiding/showing/resizing widget instances and craft them as menu-shaped widgets. each instance is just a piece of the whole oc widget with main widget driving menu item instances

No!No!No!Yes! 2010-11-17 00:28

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by batman (Post 875044)
updating what I said, by adding the gainroot>/dev/null that I added to the end of the 3 states commands created system instability and it didn't create an off state (or toggling between states or both) either.

Surely it must be possible using 2 kernel files? 1 which has been customised (an 'on' state) and one which is stock (an 'off' state)

the command:

if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | sudo gainroot

deffinately works at start up (if enabled) or when clicked after start up.

so maybe its not toggling between states because of the sudo gainroot command?

I tried replacing the on/off states commands with:

if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
rootsh /usr/sbin/kernel-load /home/user/MyDocs/originalkernel.txt
echo "OFF";
exit 0;
else
rootsh /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt
echo "ON";
exit 1;


:confused: helppp :)

Please enable V4 logging as per WIKI and post here Beecon Instance Export and V4 log with startup and some states toggle

Ciao.

No!No!No!Yes! 2010-11-17 00:38

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
http://i.imgur.com/sZcWs.jpg

Naughty Meego!!!!

No!No!No!Yes! 2010-11-17 01:02

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Meego is naked!!!
No Widgets ... No Desktops ... No Queen Beecon!!!

http://i.imgur.com/uDv2m.png

The Emperor's New Clothes
http://literaryfalcon.files.wordpres...-clothes-1.jpg

batman 2010-11-17 12:28

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Please enable V4 logging as per WIKI and post here Beecon Instance Export and V4 log with startup and some states toggle

I will have a look at wiki later and figure out what V4 logging is and how to enable it happily - how?

the other thing was where do I try changing the timeout in the code to 10 seconds (-T value) for the football?

Sash 2010-11-17 15:38

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by No!No!No!Yes! (Post 875658)
Meego is naked!!!
No Widgets ... No Desktops ... No Queen Beecon!!!

Noooooooooooooo!:(

slarti 2010-11-18 19:45

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by No!No!No!Yes! (Post 823289)
http://i52.tinypic.com/au81ut.jpg
http://i51.tinypic.com/213ly69.jpg

Here's another way to have a "2 States Button" which is "ON" on widget/system startup and toggles at every press.

Hello

First of all, what a great application! I can't believe I haven't noticed this before because it is something I've been looking for.

I use it to control my lights. My server acts, among other things, as a controller for my zwave-network which controls the lights. I can send simple http-request commands to that server to switch on/off/dim any node (light) in that zwave network.

Since I'm a total idiot and can't do anything right, I've just created a single beecon for every command:

http://slarti.kuvat.fi/kuvat/screenshot06.png/_big.jpg

The only command that beecon sends is:

Code:

wget ´http://ipaddress:port/ZwaveCommand?command=device&id=21&level=100´
Where the device id is the node that should do something and the level command is from 0(off) to 100(on full).

This works well.

Now I'm trying to get the two-state buttons to work as ON/OFF buttons for the nodes AND show the current state.

When I send the http-request the server does its magic with the light and sends this back:

Code:

DEVICE~Eteinen~7~50~Controller
DEVICE~Iso taso~9~0~BinaryPowerSwitch
DEVICE~Jääkaappi~14~99~MultilevelPowerSwitch
DEVICE~Lamppu~15~0~MultilevelSwitch
DEVICE~Lastenhuone~19~0~MultilevelPowerSwitch
DEVICE~Makuuhuone~20~0~MultilevelPowerSwitch
DEVICE~Olohuone~8~99~MultilevelPowerSwitch
DEVICE~Pieni Taso~16~255~BinaryPowerSwitch
DEVICE~Ruokapöytä~22~99~MultilevelPowerSwitch
DEVICE~Spotit~12~0~BinarySwitch
DEVICE~Taustavalo~18~0~BinarySwitch
DEVICE~Tiskipöytä~11~0~BinaryPowerSwitch
DEVICE~Toimisto~21~99~MultilevelPowerSwitch

Meaning DEVICE~<name of device>~<device id>~<device level>~<type of device>

If I was to save that response to a zwave.txt file every time it is received, could I somehow make all the beecons "read" that text file and change their states (level=0 -> light off, level>0 -> light on) accordingly, while at the same time being able to send ON/OFF-requests? I'm not bothering with DIM-commands because that would require a slider and a way more complex beecon.

As I said, I'm a complete ***** especially when it comes to scripting, so if anyone would like to answer, please keep it simple..:o

Thanks,

Slarti

No!No!No!Yes! 2010-11-18 22:59

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
@slarti: Very interesting use case here :)
I don't know the ZWAVE controller - as a premise - but:

Is there any way for the ZWAVE to report an unsolicited status of all/some sensors, like for example if you have a temperature sensor attached to it, is it possible to be notified by ZWAVE about a change in the temperature or you have to periodically issue a polling wget?

Apart from wget command, is there any other way to change the status of devices (ex. some impulse on the device itself, switch, potentiometer...)?

Issue here, for representing devices status, is to be as much real-time as possible, thus triggering a beecon status update every time it is necessary (and avoid timered polling on all devices to know their status - what timer period? how much battery will this consume?)

How can the ZW initiate a communication with the N900, if possible?

The DIM part is not as much difficult as it seems on first sight.
In QBW you can sense the tap/click position on a widget and return a different exit status value which will be converted into an image; precision and tolerance is indeed up to you ... you want to manage 30 different intermediate levels you just create 30 different images and alter some divider in the script
Quote:

Originally Posted by Example from QBW Greedy Desktop Switcher (Post 835440)
command for retrieving the horizontal position where a horizontal bar widget is clicked:
PHP Code:

dsk=1;
if [ 
"_$QBW_EXEC_REASON== "_QBW_CLICK" ]; then
   gconftool
--/apps/osso/hildon-desktop/views/current -t int `expr $QBW_CLICK_X / 89 + 1`;
fi;
exit `
expr $dsk + 2


I'll follow up on this as soon as I receive some of your feedback on the matter

Bye.

geneven 2010-11-18 23:17

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Vintrc (Post 873697)
Hi,
anyone knows about some command for hide and show all desktop?
I mean one button will be everytime on desktop and when i press it, each icons, widget etc. hide and next show back.. because if i have some nice wallpaper, it would be fine :D

Yes! I proposed this a long time ago in Brainstorm, with little response.

matristain 2010-11-19 01:37

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Hi , Just starting with QBW I`ll appreciate some help.

I have this code on a call.sh i create a desktop icon to run it.
It does its work but i am looking for a better way to do this:

Call XXXXXXXXXX number , if call is till a active after 275 seconds Hang Up the call and call XXXXXXXXXX again.


PHP Code:

#!/bin/sh

dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"XXXXXXXXXX" uint32:0

sleep 275

output
=`dbus-send --system --dest=com.nokia.csd.Call --print-reply=literal /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.GetStatus`
if [ 
"$output== "   uint32 8" ]; then
    dbus
-send --system --dest=com.nokia.csd.Call --print-reply /com/nokia/csd/call com.nokia.csd.Call.Release
    sleep 4
    sh 
/home/user/.call/call.sh
    
exit
    
else
    exit
fi 

What i want is to stop the loop at any time becouse when I hang up manualy the call this scripts continue running and It will hung up any other call i make withing the 275 seconds.

NOTE: this is for a toll free number for less than 5 minuts call, and its very useful using Hands Free car kit.

Sorry for my english, still trying to improve it.

slarti 2010-11-19 12:16

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by No!No!No!Yes! (Post 877478)
@slarti: Very interesting use case here :)
I don't know the ZWAVE controller - as a premise - but:

Is there any way for the ZWAVE to report an unsolicited status of all/some sensors, like for example if you have a temperature sensor attached to it, is it possible to be notified by ZWAVE about a change in the temperature or you have to periodically issue a polling wget?

Apart from wget command, is there any other way to change the status of devices (ex. some impulse on the device itself, switch, potentiometer...)?

Issue here, for representing devices status, is to be as much real-time as possible, thus triggering a beecon status update every time it is necessary (and avoid timered polling on all devices to know their status - what timer period? how much battery will this consume?)

How can the ZW initiate a communication with the N900, if possible?

Thanks for the quick reply:)

The controller software is ZwaveCommander by Melloware. It uses a ThinkStick USB zwave-controller to get the status of all nodes in the zwave-network and give commands to nodes. It isn't possible to get status updates from ZwaveCommmander without asking for it with an http-request. The upside is that it always responds with all current statuses. I also have a node that physically does nothing when a command is sent to it. That could be used for a poll.

Every node has a switch and I have other means of controlling the lights as well, so real-time updating is out of the question because the beecons should indeed poll the server periodically. This isn't that much of a problem because the intended use is mostly remote use (for example to see if I left any lights on with a quick glance of the beecons). The beecon states could be updated only when zwave.txt gets rewritten, which would be every time a wget is sent.

Quote:

Originally Posted by No!No!No!Yes! (Post 877478)
The DIM part is not as much difficult as it seems on first sight.
In QBW you can sense the tap/click position on a widget and return a different exit status value which will be converted into an image; precision and tolerance is indeed up to you ... you want to manage 30 different intermediate levels you just create 30 different images and alter some divider in the script


I'll follow up on this as soon as I receive some of your feedback on the matter

Bye.

I didn't realise this. This makes QBW even more interesting.

Thanks,

Slarti

No!No!No!Yes! 2010-11-19 13:35

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by matristain (Post 877568)
Hi , Just starting with QBW I`ll appreciate some help.

I have this code on a call.sh i create a desktop icon to run it.
It does its work but i am looking for a better way to do this:

Call XXXXXXXXXX number , if call is till a active after 275 seconds Hang Up the call and call XXXXXXXXXX again.


PHP Code:

#!/bin/sh

dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"XXXXXXXXXX" uint32:0

sleep 275

output
=`dbus-send --system --dest=com.nokia.csd.Call --print-reply=literal /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.GetStatus`
if [ 
"$output== "   uint32 8" ]; then
    dbus
-send --system --dest=com.nokia.csd.Call --print-reply /com/nokia/csd/call com.nokia.csd.Call.Release
    sleep 4
    sh 
/home/user/.call/call.sh
    
exit
    
else
    exit
fi 

What i want is to stop the loop at any time becouse when I hang up manualy the call this scripts continue running and It will hung up any other call i make withing the 275 seconds.

NOTE: this is for a toll free number for less than 5 minuts call, and its very useful using Hands Free car kit.

Sorry for my english, still trying to improve it.

As quick suggestions ...
Avoid sleep 275
And in very-very-very-very metacode:
On widget startup (phone on ecc) $QBW_EXEC_REASON=="QBW_STARTUP_UPDATE", explicitly reset beecon timer parameters (delayIndex = 0 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after resetting both parms, issue a reset_rearm_timer method to the widget

On widget click $QBW_EXEC_REASON=="QBW_CLICK" , check if your very specific call active via usual dbus enquiries
If your specific call is not active (didn't dig how to check this) initiate call and explicitly set beecon timer parameters (delayIndex = 9 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after setting both parms, issue a reset_rearm_timer method to the widget
If your specific call is active (didn't dig how to check this) terminate call and reset widget timer as per QBW_STARTUP_UPDATE step

If execution of script is due to $QBW_EXEC_REASON=="QBW_TIMER_UPDATE" , check if specific call active via usual dbus enquiries
If your very specific call is active, drop call, and reinitiate call (275secs timer will still be in place)
If your very specific call is not active, reset timer as per previous steps

Issue specific exit status at the end of every condition if you want to draw different icons according to call status statuses

Hope this helps

sanros 2010-11-21 07:17

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
hello guys, please some one help me to make a queen beecon widget to restart device on pressing it. i have tryied different commands but no success. its a very simple thing in x terminal but i am not able to set a command in queen beecon.:(

slarti 2010-11-22 12:35

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
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?

matristain 2010-11-22 22:01

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Can QBW handle the "Long press" to avoid axidental execution?

No!No!No!Yes! 2010-11-23 08:00

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by matristain (Post 880659)
Can QBW handle the "Long press" to avoid axidental execution?

no longpress
yes multiclick

enable multi click support in update policies in qbw settings and test relevant $QBW_... variable for expected number of clicks. see parameter substitution in wiki for exact name and specs

matristain 2010-11-24 02:02

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by No!No!No!Yes! (Post 877913)
As quick suggestions ...
Avoid sleep 275
And in very-very-very-very metacode:
On widget startup (phone on ecc) $QBW_EXEC_REASON=="QBW_STARTUP_UPDATE", explicitly reset beecon timer parameters (delayIndex = 0 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after resetting both parms, issue a reset_rearm_timer method to the widget

On widget click $QBW_EXEC_REASON=="QBW_CLICK" , check if your very specific call active via usual dbus enquiries
If your specific call is not active (didn't dig how to check this) initiate call and explicitly set beecon timer parameters (delayIndex = 9 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after setting both parms, issue a reset_rearm_timer method to the widget
If your specific call is active (didn't dig how to check this) terminate call and reset widget timer as per QBW_STARTUP_UPDATE step

If execution of script is due to $QBW_EXEC_REASON=="QBW_TIMER_UPDATE" , check if specific call active via usual dbus enquiries
If your very specific call is active, drop call, and reinitiate call (275secs timer will still be in place)
If your very specific call is not active, reset timer as per previous steps

Issue specific exit status at the end of every condition if you want to draw different icons according to call status statuses

Hope this helps

How can i change the (delayIndex = 9 customIntervalSecs = 275) at runtime?

This is what I have (just first part)
PHP Code:

if [ "$QBW_EXEC_REASON== "QBW_CLICK" ]; then
    
if [ "$QBW_CURRENT_RESULTS_TEXT== "ON" ]; then
        
echo "OFF";
        exit 
0;
    else
        
#MAKE CALL
        #delayIndex = 9 customIntervalSecs = 275
        
echo "ON";
        exit 
1;
    
fi;  
fi


No!No!No!Yes! 2010-11-24 09:36

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by matristain (Post 881713)
How can i change the (delayIndex = 9 customIntervalSecs = 275) at runtime?

This is what I have (just first part)
PHP Code:

if [ "$QBW_EXEC_REASON== "QBW_CLICK" ]; then
    
if [ "$QBW_CURRENT_RESULTS_TEXT== "ON" ]; then
        
echo "OFF";
        exit 
0;
    else
        
#MAKE CALL
        #delayIndex = 9 customIntervalSecs = 275
        
echo "ON";
        exit 
1;
    
fi;  
fi


http://wiki.maemo.org/Queen_BeeCon_W..._QBW_over_DBUS

sanros 2010-11-24 18:46

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
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

matristain 2010-11-24 20:18

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
OK almost done, :P
I Just have one problem.
I can activate the "delayIndex" and set "customIntervalSecs" to start updating.
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

What I Can't do is make it stop.
This doesn't stop running avery 10 sec.
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

When i get into the setting @Interval is disable, but script still running until I save settings eaven without making any changes.

No!No!No!Yes! 2010-11-24 20:49

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by matristain (Post 882351)
OK almost done, :P
I Just have one problem.
I can activate the "delayIndex" and set "customIntervalSecs" to start updating.
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

What I Can't do is make it stop.
This doesn't stop running avery 10 sec.
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

When i get into the setting @Interval is disable, but script still running until I save settings eaven without making any changes.

Syntax is not correct, right syntax is:

For arming timer
PHP Code:

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

For disarming:
PHP Code:

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

replace id0 in command with value you find here in your beecon:
http://wiki.maemo.org/images/thumb/2...px-Snap017.png

No!No!No!Yes! 2010-11-25 07:33

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by sanros (Post 882286)
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

http://wiki.maemo.org/Desktop_Comman...scripts#Reboot

one1002 2010-11-25 09:30

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
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?

No!No!No!Yes! 2010-11-25 09:58

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by one1002 (Post 882786)
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?

Behaviour is by design as hildon home widget deletion mechanism does not offer confirmation in case of widget instance close/remove

If you wanto to purge a widget instance that you closed/removed on desktop with the top-right cross, open up another qbw setting and hit advanced buttons, you'll be asked to go pro and after that you'll be asked to purge closed instances one by one

Ciao.

No!No!No!Yes! 2010-11-25 12:37

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by slarti (Post 880214)
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?

slarti 2010-11-25 21:09

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by No!No!No!Yes! (Post 882912)
Hi, have you tried it in the Advanced Dialog Box Test Drive?

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:o):

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


I call it in QBW with:

PHP Code:

name="Node name"export namesh /home/user/zwave/script 

Now I'm trying to make them update on startup, update whenever zwave.txt gets rewritten and work as they do now.

I just tried this in QBW:

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 

For some reason that didn't work, it just exits with code 2. I'll keep trying...:rolleyes:

In the wiki there is:

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>"
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.

No!No!No!Yes! 2010-11-25 22:21

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by slarti (Post 883260)
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:o):

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


I call it in QBW with:

PHP Code:

name="Node name"export namesh /home/user/zwave/script 

Now I'm trying to make them update on startup, update whenever zwave.txt gets rewritten and work as they do now.

I just tried this in QBW:

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 

For some reason that didn't work, it just exits with code 2. I'll keep trying...:rolleyes:

In the wiki there is:

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>"
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.

Have a look at POKER DICE beecon script for example on how to issue update on multiple QBWs in sequence; it is also a goot example of 1 QBW driving others.
You can also write a loop like this (metacode by heart):
PHP Code:

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 

2 exit code you are experiencing might suggest some sort of syntax error in the script
also pay attention that if you need $QBW_* meta variables inside you external script then you need to pass them with something like this and manage positional parameters $1 $2 $3 $4 $5 inside your external script:
in QBW cmd:
PHP Code:

/home/user/myscripts/execme.sh $QBW_ID $QBW_EXEC_REASON 

in script:
PHP Code:

QBW_ID=$1
QBW_EXEC_REASON
=$2
... 



All times are GMT. The time now is 09:09.

vBulletin® Version 3.8.8