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-02-22 00:47

[Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Hi, Folks.
Based on an idea and widget by cpscotti ("Desktop Command Execution Widget" R E S P E C T & Kudos, Dude!) and due to personal needs, I forked developments towards:

http://i.imgur.com/5YbFw.pngQueen BeeCon Widgethttp://i.imgur.com/5YbFw.png
AT FULL POWER!
http://i.imgur.com/Khwoi.png
http://i41.tinypic.com/12375g8.png
http://i49.tinypic.com/2e2qb9t.png

Queen BeeCon Widget is a highly customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for Maemo 5 Fremantle and the N900.

The Widget is based on the execution of external Shell/OS Commands which can be either as simple as one-liner statements or as complex as articulated shell scripts, which, for example, fetch, parse and aggregate contents retreived from the system, other applications or the Internet.

There are two basic Widget types, Beecons and Snippets:

Beecons are small hexagonal cells whose background color or associated image/icon changes according to the executed Command Exit Status.

Beecons can handle virtually unlimited Command Exit Status:
  • <0 Normally notifying system errors in esecuting the script/command
  • 0 Returned when script/command successfully completes
  • 1 Used to report a warning condition
  • 2 If script/command needs to notify some application error conditions
  • <=126 Other exit status which can be handled for displaying user defined icons/images

Snippets are normal text/graphic boxes with fixed background color and images which is not influenced by the executed Command Exit Status.

See WIKI

Enjoy, No!No!No!Yes!

No!No!No!Yes! 2010-02-22 00:48

Queen BeeCon Widget: Features List & Known Issues
 
Moved to WIKI

No!No!No!Yes! 2010-02-22 00:48

Queen BeeCon Widget: Now-Brewing, Change Log & TODO list
 
Moved to WIKI

Bratag 2010-02-22 14:47

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
I find this app to be both cool and a little confusing, but I suspect thats because Its so comprehensive. Purely as a way of monitoring items at a glance however its great, though perhaps a little space consuming on the desktop.

No!No!No!Yes! 2010-02-22 16:45

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Here is the Normal version of the "Rootfs(%):" command:
Code:

df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:

df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:
Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full
http://i45.tinypic.com/1zjhvc.png http://i48.tinypic.com/2cyje5i.png http://i47.tinypic.com/1625lyd.png

Bratag 2010-02-22 16:48

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 541337)
Here is the Normal version of the "Rootfs(%):" command:
Code:

df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:

df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:

Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full
http://i45.tinypic.com/1zjhvc.png http://i48.tinypic.com/2cyje5i.png http://i47.tinypic.com/1625lyd.png

Very cool - One imagines this can be applied to pretty much any % based command.

late666 2010-02-22 17:46

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
It's a cool idea, but I think a more elegant way to do this is to stick to the half transparent black rectangle like the one in the original desktop command execution widget..
It would also save up on space.

No!No!No!Yes! 2010-02-22 18:06

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Bratag (Post 541340)
Very cool - One imagines this can be applied to pretty much any % based command.

Sure... see also following Beeconified version of a "ping -q -c 3 server1" command to test server1 responsiveness:
Code:

ping -q -c 3 server1 | awk 'BEGIN { FS="[ \/]+"; rt=0 } $1 == "round-trip" { rt=1; print $6 "\n" $7 "\n" $8 "\n(ms)"; if ($8 < 100) exit 0; else if ($8 < 200) exit 1; else exit 2 } END { if ( rt == 0 ) exit -1 }'
The awk statement will return:
Exit Status 0 (Green Beecon) for round-trip max below 100ms
Exit Status 1 (Yellow Beecon) for round-trip max between 100 and 200 ms
Exit Status 2 (Red Beecon) for round-trip max above 200ms
Exit Status -1 (Grey Beecon) for server1 unresponsiveness
http://i49.tinypic.com/23uc5s3.png http://i45.tinypic.com/2zeiauh.png http://i49.tinypic.com/30hpnr6.png http://i45.tinypic.com/2ev82l5.png

No!No!No!Yes! 2010-02-22 19:36

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by late666 (Post 541421)
It's a cool idea, but I think a more elegant way to do this is to stick to the half transparent black rectangle like the one in the original desktop command execution widget..
It would also save up on space.

Ciao,
I discussed about this matter with cpscotti, the current maintainer of DCEW, before I went public. We both agreed with the fact that both tools can have supporters and admirers especially if we move the topic into the "elegance" vs. "versatility" vs. "simplicity" vs. "practicality" vs. "completeness" vs. "complexity" vs. "beautifulness" vs. "coolness" vs. "hackishness" debate.
Due to my personal needs, for home and for work, I dedicated two, out of the four desktops, to monitoring widgets and I rely more on a visual/chromatic experience than on a plain textual feedback.
Furthermore, on the todo list there is also an open mind in developing a graphic architecture with far more freedom for the end-users to design and plug in their favourite visual "geometry", being that basic shapes or multi-area/clickable icons with alpha channel.
Thank you for your feedback. Bye.

No!No!No!Yes! 2010-02-24 01:14

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
http://i46.tinypic.com/ege1sh.jpg

And now... let's get ready for the 2010 MLB season...

Before using this Beecon make sure you have "wget" package installed:

Start X-Terminal and type:
Code:

Nokia-N900-51-1:/home/user/MyDocs# wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
Nokia-N900-51-1:/home/user/MyDocs#

If you don't receive the above output you need to install the package:
Code:

apt-get install wget
Beecon provides periodic updates for matches of your favourite MLB team:
Code:

wget -q -O - http://m.mlb.com/scores/`date +%Y%m%d`/ | awk 'BEGIN{t="NYY";m=0}/<td>.+<\/td>/{split(gensub(/<[^>]*>/,"","g"),a);if(a[1]!=t && a[3]!=t && a[4]!=t)next;m=1;if(a[2]=="vs."){print a[1] "\n" a[3] "\n" a[4],a[5];exit 1}print a[1],a[2] "\n" a[4],a[5] "\n" a[6];if((a[4]==t&&a[5]>a[2])||(a[1]==t&&a[2]>a[5]))exit 0;if(a[5]==a[2])exit 1;else exit 2}END{if(m==0){print "No\nMatch!\n";exit 1}}'
Just replace the:
Code:

t="NYY"
with one of the predefined abbreviations:
ATL, LAD, NYY, TOR, FLA, NYM, BOS, BAL, CIN, WSH, SD, PHI, SF, PIT, CHC, HOU, CLE, CWS, DET, KC, MIL, STL TB, TEX, MIN, OAK, LAA, SEA, COL, ARI.

Set update interval as you like and enjoy...

Beecon will return:
Exit Status 0 (Green Beecon) if team is winning
Exit Status 1 (Yellow Beecon) if match is tied up or no match for the day or match starting later on
Exit Status 2 (Red Beecon) if team is losing the match

http://i49.tinypic.com/wciudv.png http://i49.tinypic.com/nyg41w.png http://i45.tinypic.com/24b589i.png
http://i47.tinypic.com/j7ep2v.png http://i49.tinypic.com/wbywb7.png http://i47.tinypic.com/15ge1k.png

fpp 2010-02-24 14:56

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Hi,

I don't think my use cases will fit the "Queeen Beecon" approach, but I must thank you none the less for bringing its ancestor "Desktop Command Execution" to my attention. I don't know how I managed to miss it, but the idea behind both widgets is incredibly useful !

No!No!No!Yes! 2010-02-24 16:41

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 543602)

Before using this Beecon make sure you have "wget" package installed:

Start X-Terminal and type:
Code:

Nokia-N900-51-1:/home/user/MyDocs# wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
Nokia-N900-51-1:/home/user/MyDocs#

If you don't the above output you need to install the package:
Code:

apt-get install wget

I quote a previous post to clarify some possible issues with respect to the use of wget to retreive webpages to be parsed for relevant contents.

Proxy support in N900 Maemo (don't know for previous versions) is far from being perfect and comfortable to handle.

While testing the previous Beecon behind our company's firewall, hildon-home/desktop got frozen because of the wget command trying to access internet resources while being blocked by our firewall.

Only way to unfreeze it was to kill both the shell script spawned by Beecon, awk and wget hung processes.

UPDATE 201002251730{Don't know why wget hung itself like this in endless timeout but} Setting -t 1 -T 3 options prevents wget from hanging and getting stuck for more then -T 3 seconds even if connection or proxy problems arise!!! However set -T <secs> according to the foreseen size of the web content to be fetched
I figured out a way to programmatically retrieve the proxy settings both for HTTP and for HTTPS from the internal MicroB browser configuration file: /home/user/.mozilla/microb/prefs.js

File holds several values related to proxy settings:
Code:

user_pref("network.proxy.http", "my.proxy.pri");
user_pref("network.proxy.http_port", 3128);
user_pref("network.proxy.no_proxies_on", "");
user_pref("network.proxy.ssl", "my.proxy.pri");
user_pref("network.proxy.ssl_port", 3128);
user_pref("network.proxy.type", 1);

These values are also updated every time a new internet/network connection is estabilished with the configurations present in the internet connection settings.
http://i47.tinypic.com/3582csk.png

In order for wget to properly work behind a proxy, two environment variables must be set in this way:
Code:

export http_proxy=http://my.proxy.pri:3128/
export https_proxy=http://my.proxy.pri:3128/

Following one-liner script, which must be prepended to the wget command, does exactly that. It parses the MicroB/Browser configuration file and generates the statements to dynamically set those two variables:

Code:

`awk 'BEGIN {FS="[\(\", ;\)]+"}/proxy\.http"/{hx=$3}/proxy\.http_port"/{hp=$3}/proxy\.type"/{pt=$3}/proxy\.ssl"/{sx=$3}/proxy\.ssl_port"/{sp=$3}END{if(pt==0)exit;print "export http_proxy=http://" hx ":" hp "\/ export https_proxy=http://" sx ":" sp "\/"}' /home/user/.mozilla/microb/prefs.js`
So the final statement to feed the MLB Beecon with, will be this one:
Code:

`awk 'BEGIN {FS="[\(\", ;\)]+"}/proxy\.http"/{hx=$3}/proxy\.http_port"/{hp=$3}/proxy\.type"/{pt=$3}/proxy\.ssl"/{sx=$3}/proxy\.ssl_port"/{sp=$3}END{if(pt==0)exit;print "export http_proxy=http://" hx ":" hp "\/ export https_proxy=http://" sx ":" sp "\/"}' /home/user/.mozilla/microb/prefs.js`;wget -t 1 -T 3 -O - http://m.mlb.com/scores/`date +%Y%m%d`/ | awk 'BEGIN{t="NYY";m=0}/<td>.+<\/td>/{split(gensub(/<[^>]*>/,"","g"),a);if(a[1]!=t && a[3]!=t && a[4]!=t)next;m=1;if(a[2]=="vs."){print a[1] "\n" a[3] "\n" a[4],a[5];exit 1}print a[1],a[2] "\n" a[4],a[5] "\n" a[6];if((a[4]==t&&a[5]>a[2])||(a[1]==t&&a[2]>a[5]))exit 0;if(a[5]==a[2])exit 1;else exit 2}END{if(m==0){print "No\nMatch!\n";exit 1}}'
Of course you can save the proxy variables builder command into a file system shell script, lets say: pxy.sh and drop it into some PATH-reachable directory ex. /usr/sbin
Code:

# cat /usr/sbin/pxy.sh

awk '
BEGIN {
  FS="[\(\", ;\)]+"
}

/proxy\.http"/ { hx=$3 }
/proxy\.http_port"/ { hp=$3 }
/proxy\.type"/ { pt=$3 }
/proxy\.ssl"/ { sx=$3 }
/proxy\.ssl_port"/ { sp=$3 }

END {
  if ( pt==0 ) exit;
  print "export http_proxy=http://" hx ":" hp "\/ export https_proxy=http://" sx ":" sp "\/"
} ' /home/user/.mozilla/microb/prefs.js

#

Change permissions to executable:
Code:

chmod 755 /usr/sbin/pxy.sh
and, inside the Beecon, use a shorter statement prepended to wget command:
Code:

`pxy.sh` ; wget -t 1 -T 3 -O - http://m.mlb.com/scores/`date +%Y%m%d`/ | awk 'BEGIN{t="NYY";m=0}/<td>.+<\/td>/{split(gensub(/<[^>]*>/,"","g"),a);if(a[1]!=t && a[3]!=t && a[4]!=t)next;m=1;if(a[2]=="vs."){print a[1] "\n" a[3] "\n" a[4],a[5];exit 1}print a[1],a[2] "\n" a[4],a[5] "\n" a[6];if((a[4]==t&&a[5]>a[2])||(a[1]==t&&a[2]>a[5]))exit 0;if(a[5]==a[2])exit 1;else exit 2}END{if(m==0){print "No\nMatch!\n";exit 1}}'

No!No!No!Yes! 2010-02-25 21:48

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
queen-beecon (0.0.3) uploaded to autobuilder a few minutes ago ... should be in devel for download shortly...

* Bugfixing for widget resize(dimensions) and positioning
* Bugfixing for general network related behaviours and content update, even after settings change
* Bugfixing for Command Edit and blank command selector after returning from command edit dialog
* Changed Exit Code output for command from !?0000xxxx to !?xxxx
* Changed Command Output is returned, if any, even if Exit Code less then 0

No!No!No!Yes! 2010-02-26 15:42

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
http://i50.tinypic.com/8yb23a.png
GMail New Messages Notifier Beecon
Following Beecon retrieves number of unread messages in specified Gmail Inbox.
Substitute <username> and <password> with your personal account information.
Code:

wget -t 1 -T 3 -q -O - https://<username>:<password>@mail.google.com/mail/feed/atom --no-check-certificate | awk 'BEGIN{m=2}/<fullcount>.+<\/fullcount>/{gsub(/<[^>]*>/,"",$0);print $1 " New";if($1>0)m=1;else m=0}END{exit m}'
The Beecon statement will return:
Exit Status 0 (Green Beecon) for 0 New Mails
Exit Status 1 (Yellow Beecon) for >0 New Mails
Exit Status 2 (Red Beecon) for problems fetching Mails
Exit Status -1 (Grey Beecon) for System problems

For PROXY/WGET related info have a look at THIS post

Ciao, No!No!No!Yes!

No!No!No!Yes! 2010-03-01 22:43

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
http://i49.tinypic.com/2e2qb9t.png

Stay Tuned...

No!No!No!Yes! 2010-03-02 07:05

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
queen-beecon (0.1.0) now in extras-devel ... same usual relevant advices! :)

* WARNING! Architecture and readibility of code has been heavily revised for implementing the new functionalities...
* WARNING! Please bear with possible regressions and report bugs to the Maintainer
* New: Implemented the possibility to hide the background Canvas both for Beecons and Snippets
* New: Implemented the possibility to use different icons/images for Beecon's status output instead of just specific background color (Ex. 0=green led, 1=yellow led, 2=red led) (with high positioning versatility) ;)
* New: Implemented the possibility to use icons/images instead of text both for Beecons/Snippets command title and output (with high positioning versatility) ;)
* New: Implemented creation and management of private general purpose directory "~/.queen_beecon_dir" for widget (images/icons/etc.)
* New: Implemented "Update on widget Startup" option for every instance
* New: Implemented basic management/deletion of dead/disposed instances configurations data from config file
* New: Added button "Save & Run" settings dialog which saves settings and contextually triggers command execution
* Changed: Widget Layout is now nicer with better gummy "button-press" like visual feedback using Gradient fill
* Changed: Button Save in settings dialog does not trigger a command execution any more
* Changed: Now command do not get updated after getting back from settings dialog (even after "save"); relevant event only drives updates (manual, timer, desktop, network)

No!No!No!Yes! 2010-03-02 20:39

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
1 Attachment(s)
queen-beecon (0.1.1) now in extras-devel ... same usual relevant advices! :)

* Changed: Visual feedback for widget pressure is now also provided for Canvas-less beecons and snippets (button down canvas is displayed when pressed)
* Changed: Changed default size for newly created instances (50px=>100px)
* Changed: Housekeeping for dead/disposed instances is now run on each instance initialization and on class termination (should be more accurate now)
* Bugfixing: Writing/Reading configuration file inconsistencies fixed
* Bugfixing: Correction in images (status/results/title) hide/show logic. If images displayed and then commented out, they kept showing! - FIXED

And some goodies...
http://i50.tinypic.com/15mcmsk.png attached to the post for use as status icon with Beecons.

Bratag 2010-03-02 20:41

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 552950)
queen-beecon (0.1.1) now in extras-devel ... same usual relevant advices! :)

* Changed: Visual feedback for widget pressure is now also provided for Canvas-less beecons and snippets (button down canvas is displayed when pressed)
* Changed: Changed default size for newly created instances (50px=>100px)
* Changed: Housekeeping for dead/disposed instances is now run on each instance initialization and on class termination (should be more accurate now)
* Bugfixing: Writing/Reading configuration file inconsistencies fixed
* Bugfixing: Correction in images (status/results/title) hide/show logic. If images displayed and then commented out, they kept showing! - FIXED

And some goodies...
http://i50.tinypic.com/15mcmsk.png attached to the post for use as status icon with Beecons.

So we need to install these independently - not installed by default?

No!No!No!Yes! 2010-03-02 20:59

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Bratag (Post 552953)
So we need to install these independently - not installed by default?

Ciao...
I'm sorry I still haven't studied how to package icons/images inside .deb and to extract them in relevant directory at .deb install time. If you can point me to some tutorial for doing this, please do... however this issue is in my TODO list but with low priority.
To use this icons you have just to extract them in the ~/.queen_beecon_dir directory and directly refer to them in the settings (if no pathname is specified then QBW looks inside that)
I'm mostly working on solving widget issues and testing core functionalities.
I'd also like to come out with some ways to export/import whole Beecons (basic parameters and possibly icons/images)... to more easily share them once assembled and tested. (I'm also aware of potential security concerns with respect to this matter).

Ciao, No!No!No!Yes!

No!No!No!Yes! 2010-03-02 21:50

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Queen Beecon Widget 0.1.1 has now been promoted to extra testing.

No!No!No!Yes! 2010-03-08 01:12

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Uhm...
Just a preview of how 0.1.3 is gonna look like...

http://i49.tinypic.com/2jfg3tt.png

Sometimes ... you win...

http://i48.tinypic.com/ke7khd.png

Sometimes ... you lose...

http://i47.tinypic.com/2vn4bc9.png

And sometimes ... it just ... rains!!!

Now only your fantasy and artistic skill are your boundaries ... :D

As soon as I can have some sleep ... I'll try to prepare a tutorial about how I made MLBeecon.

Ciao, No!No!No!Yes!

No!No!No!Yes! 2010-03-08 11:11

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
... and Hot Stove for www.tvrage.com TV Series Beecon in the brewery!!!

http://i46.tinypic.com/2iu7pfn.png

Still internal testing for 0.1.3...

Change Log:
* New: Added possibility to show or hide both snippet's image/text and beecon image/text. This way you can have two images and two text placeholders on widget, for more flexibility in graphic layout
* New: Added supplementary images/icons directory storage "~/Mydocs/.images/queen_beecon_dir". If images/icons without path are not found here then they are searched in "~/.queen_beecon_dir". For easier population via USB of BLUETOOTH File Services.
* New: Added functions in Advanced Maintenance Dialog Box: instance export/import w/ checksum, command export/import w/ checksum, command update with current Test Drive buffer, clipboard operations
* New: Added some confirmation dialogs for critical operations and some notification messages
* New: Added possibility to use different images/icons for Command Exit Statuses >=3 . Basically the Exit Status value will be appended to a fixed image filename and relevant image will be loaded (ex. "queen-beecon-status.png.3" ... 4 ... 5 ...)
* New: Basic Images/Icons for Snippets and Beecon Statuses incorporated into .deb package and installed inside canonical hildon hicolor 48x48 directory
* Bugfixing: Fixed size and positioning of controls in Advanced Maintenance Dialog Box
* Bugfixing: Removed directory purge in "rmnobraco.sh" script
* Bugfixing: Checked and removed some memory leaks and resources deallocation (were causing hildon-home desktop to crash on instance disposal)
* Changed: Restyle and lots of optimization in Settings Dialog Box UI layout
* Changed: Widget's fill gradients when background is enabled
* Changed: Restyle in Advanced Maintenance Dialog Box interface, now more functional and user friendly
* Changed: When opening Advanced Maintenance Dialog Box, command in current instance is automatically copied to the TestDrive command text box
* Changed: Advanced Maintenance Dialog Box changed font to Monospace Bold for the three text views for inproved visibility

No!No!No!Yes! 2010-03-10 21:53

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Icons galore ... to play smooth!!! :cool:

http://i41.tinypic.com/9bdgfn.png

A nice set of tools ... to play rough!!! :eek:

http://i40.tinypic.com/m8kbad.png

No!No!No!Yes! 2010-03-10 22:27

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
WARNING! Feel free to play with this software, but be aware that this is software under development. For further info please READ THIS!!!


0.1.3 now in extras-devel ... stick with this ... as it is the most stable of all around. Don't bother with 0.1.1 in extras-testing as it has been demoted for too much instability.

As I promised I just need some spare time to write a little tutorial for the MLBeecon or the TV Rage Beecon ... stay tuned.

No!No!No!Yes! 2010-03-15 12:45

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Beecon for Italian Serie A Soccer League

http://i41.tinypic.com/119wgnt.png

In code, replace f="JUVENTUS" with f="<your team>"

Code:

wget -t 1 -T 3 -q -O - "http://mobile.gazzetta.it/calcio/ultimi_risultati.jsp?nC=serieA&cC=1320" | awk 'BEGIN {        FS="[<>\"]";f="JUVENTUS";r=-1;}$3=="giornata" {        print "<big><span foreground=\"cyan\" size=\"x-large\"><b>Serie A [" $11 "]</b></span></big>";next;}$5=="text-decoration:none" {gsub(/ &nbsp; /,"",$7) rs = $7 " " $9;if(index($7,f)!=0){rs = "<span foreground=\"blue\"><b>" rs "</b></span>";split($7,t,"[ -]+");split($9,s,"[ -]+");if ((t[1]==f && s[1]>s[2])||(t[2]==f && s[2]>s[1])) r=0;else {if(s[1]==s[2]) r=1;else r=2;}}print rs;next;}END{exit r}'

No!No!No!Yes! 2010-03-15 23:55

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
And now in 0.1.4 version still in internal testing ... the possibility to have Minimized/Standby Beecons which are ready to be activated and maximized with just a click on the sleeping beecon icon!!!
  1. TVRage (TV Show of the Day), Italian Serie A last sunday's soccer results, MLB Yesterday and Today results ... beecons maximized and active

    http://i39.tinypic.com/b7zaki.png

  2. TVRage (TV Show of the Day), Italian Serie A last sunday's soccer results, MLB Today results ... beecons maximized and active, MLB Yesterday beecon minimized and disabled but ready to full service again with just one click on it.

    http://i40.tinypic.com/15zs5g4.png

  3. TVRage (TV Show of the Day) beecon ... maximized and active, Italian Serie A last sunday's soccer results, MLB Today results, MLB Yesterday beecon minimized and disabled but ready to full service again with just one click on them.

    http://i42.tinypic.com/qnp7pg.png

No!No!No!Yes! 2010-03-16 00:22

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
AT FULL POWER!

http://i39.tinypic.com/2vux35f.png

No!No!No!Yes! 2010-03-16 13:28

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
queen-beecon (0.1.4) now in extras-devel

* New: Implementation of Widget Instance disabling and minimizing on desktop (click on minimized icon on desktop will wakeup and maximize instance)
* New: Implementation of image/icon scaling function for all images used (Zoom In/Out from 5% to 200% or Fit to Widget Width/Height)
* Bugfixing: In Advanced Maintenance Dialog Box several bugfixes for Import/Export commands and instances

and a preview of what is now possible!!!

Milan (Italy) Ringroad Live Traffic Beecon
http://i44.tinypic.com/e6408y.png

Also available for ROME, TURIN, FLORENCE, NAPLES, BOLOGNA!

Beecon Export soon available!

Credits go to the cited Companies, Organizations, Product, Services. Please report if any contents is neither appropriate nor allowed to be published and it will be removed within short time span.

Bratag 2010-03-16 13:33

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Wow this app is sure growing up fast :)

No!No!No!Yes! 2010-03-18 15:08

Queen BeeCon Widget: Import of Beecon Exported Instance Data
 
http://i46.tinypic.com/1zn04fm.pngQueen BeeCon Widgethttp://i46.tinypic.com/1zn04fm.png
[HowTo] Import Procedure for Beecon Exported Instance Data


Make sure you have already copied into your phone's clipboard the Beecon Exported Instance Data
  1. Then three usual and basic steps to instantiate the Widget:
    http://i41.tinypic.com/oan8n8.png
    http://i42.tinypic.com/6hlrh4.png
    http://i41.tinypic.com/oq92yc.png
    http://i42.tinypic.com/2ebualz.png

  2. Now click on the Settings Wrench Icon and we reach the Settins Dialog.

  3. Click on the "Advanced" button (1)
    http://i42.tinypic.com/2vxpqo6.png

  4. Confirm that we are PROFESSIONALS :) and we know what we are doing. Button (1)
    http://i43.tinypic.com/ab0cnb.png

  5. We reach the Advanced Settings and Tools Dialog Box... scroll down to the bottom.
    http://i41.tinypic.com/4h9sgz.png

  6. We reach following screen. If we press Button (1), we paste our Exported Instance Data into the Import/Export buffer, ready to be processed.
    http://i42.tinypic.com/ejzpdt.png

  7. After the Import Buffer is filled with Import Data, let's click on Import Snippet/Beecon Button (1)
    http://i40.tinypic.com/14xkqx5.png

  8. And confirm we really want to Import our Instance
    http://i41.tinypic.com/2m43vxf.jpg

  9. SUCCESS!!! We have now imported our Exported Instance.
    http://i44.tinypic.com/15y87xd.png

  10. Let's dismiss the warning and, after imported data is reloaded, we will be back at our Instance Settings Dialog Box. You'll see the new instance data [Buttons (1)(2)(3)(4))
    And we start our newly created Beecon by saving data and running with Button (5)
    http://i43.tinypic.com/1zwya3c.png

And now proceed with instance specific post-import steps!!!

No!No!No!Yes! 2010-03-21 10:59

Queen BeeCon Widget: [HowTo] Copy Exported Instance Data to Phone's Clipboard
 
http://i46.tinypic.com/1zn04fm.pngQueen BeeCon Widgethttp://i46.tinypic.com/1zn04fm.png
[HowTo] Copy Exported Instance Data to Phone's Clipboard


Best way (to me): Just use N900 Microb Browser to open page with Exported Instance Data and Copy to clipboard according to this simple procedure:

http://i41.tinypic.com/2lkplxj.png

http://i42.tinypic.com/rtkljn.png

Then proceed with Instance Advanced Settings Dialog operations.

No!No!No!Yes! 2010-03-23 08:18

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Release 0.1.4 is now in Extras-Testing repository.

Testers and a bit of promotion needed for taking it to Extras.

Anybody can help?

Patola 2010-03-24 04:58

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Is there a possibility of different scripts for showing the information on the beecon and updating it? Like, say, I have a VPN status script which shows on the beecon, but if I click it, it changes the status. Or I have a FM transmitter status which shows on the beecon, but if I click it, it changes the status. This would be greatly useful.

No!No!No!Yes! 2010-03-24 08:00

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Patola (Post 579737)
Is there a possibility of different scripts for showing the information on the beecon and updating it? Like, say, I have a VPN status script which shows on the beecon, but if I click it, it changes the status. Or I have a FM transmitter status which shows on the beecon, but if I click it, it changes the status. This would be greatly useful.

Absolutely Yes, if I understand your use case correctly.
Your script can handle statuses persistence...
for example (and in metalanguage) the script could perform like this:
Code:

Beecon pressed
isFmOn() { // check some kind of system status indicator
          // (test presence of a file or ps|grep process)
  // Its on, turn it off
  turnFmOff()
  touchOffFlag() // if necessary
  handleError()  // if necessary
  exit(1) //Beecon will sense 1 Exit Code and show relevant icon/color
} else {
  // Its off, turn it on
  turnFmOn()
  touchOnFlag() // if necessary
  handleError() // if necessary
  exit(0) //Beecon will sense 0 Exit Code and show relevant icon/color
}

You can also set a very short timer interval for handling unexpected status changes.

Everything depends on the amount of persistence logic or complexity you can handle via your script/command.

Patola 2010-03-24 18:30

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 579861)
Absolutely Yes, if I understand your use case correctly.
Your script can handle statuses persistence...
for example (and in metalanguage) the script could perform like this:
Code:

Beecon pressed
isFmOn() { // check some kind of system status indicator
          // (test presence of a file or ps|grep process)
  // Its on, turn it off
  turnFmOff()
  touchOffFlag() // if necessary
  handleError()  // if necessary
  exit(1) //Beecon will sense 1 Exit Code and show relevant icon/color
} else {
  // Its off, turn it on
  turnFmOn()
  touchOnFlag() // if necessary
  handleError() // if necessary
  exit(0) //Beecon will sense 0 Exit Code and show relevant icon/color
}

You can also set a very short timer interval for handling unexpected status changes.

Everything depends on the amount of persistence logic or complexity you can handle via your script/command.

Thanks for the response. Actually I've made this with Desktop Command Execution, but there is a problem nevertheless with the design decision of updating and showing being activated by the same script.

Namely, the problem is that, to show the status, you have to update. And sometimes you just don't want that; for example, when I reconfigure anything on the desktop, it reinitializes all widgets, and the script on Desktop Command Execution toggles my FM transmitter again, which I didn't want. Or when I reboot, it does the same thing - it toggles - I had to add some logic to verify from /proc/uptime whether 100 seconds have passed so that it could update only after that.

That's why I am asking for such a feature on Queen Beecon itself. It would ve very useful to me.

No!No!No!Yes! 2010-03-24 20:40

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Patola (Post 580749)
Thanks for the response. Actually I've made this with Desktop Command Execution, but there is a problem nevertheless with the design decision of updating and showing being activated by the same script.

Namely, the problem is that, to show the status, you have to update. And sometimes you just don't want that; for example, when I reconfigure anything on the desktop, it reinitializes all widgets, and the script on Desktop Command Execution toggles my FM transmitter again, which I didn't want. Or when I reboot, it does the same thing - it toggles - I had to add some logic to verify from /proc/uptime whether 100 seconds have passed so that it could update only after that.

That's why I am asking for such a feature on Queen Beecon itself. It would ve very useful to me.

Hi ... with these settings you can prevent Beecon from executing unless the button is explicitly pressed manually. No other event will trigger execution (neither startup of system/widget)

http://i39.tinypic.com/eiwjms.png

But help me model your use case...
  1. How would you trigger the two different scripts?
  2. A timer?
  3. Two different hot-spots on the Beecon surface (Maybe center for execute (script) and peripheral for status (script))?
  4. Same triggering logic for both states/scripts?
  5. How would you like to handle status persistency across reboots?
Quote:

Originally Posted by Patola (Post 580749)
...when I reconfigure anything on the desktop, it reinitializes all widgets,...

Could you please clarify this more? Seems some sort of bug to me. Does it happen to QBW as well?

Patola 2010-03-24 22:01

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 580977)
But help me model your use case...
  1. How would you trigger the two different scripts?
  2. A timer?
  3. Two different hot-spots on the Beecon surface (Maybe center for execute (script) and peripheral for status (script))?
  4. Same triggering logic for both states/scripts?
  5. How would you like to handle status persistency across reboots?


Could you please clarify this more? Seems some sort of bug to me. Does it happen to QBW as well?

Sorry, I think I confused my script running under Desktop Command Execution and Queen Beacon Widget. Most of the issues aren't there with QBW indeed. If I edit the desktop, the widget is not reinitialized. If I reboot, it is not auto activated either.

However, due to the nature of my script a small problem still rests. Since the update script is also the script that shows state, I can't get it activated on reboot because it will toggle the FM transmitter. And if I don't get it activated, it will show "Not updated" on the widget.

The script is this one:

Code:

result=$( /usr/bin/fmtx_client -p$( /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ) | /usr/bin/awk -F '=' '($1=="state") {print $2}' ); echo $result; [ $result = "enabled" ]
Answering your questions:
  • The first script would toggle the state of FM TX, as my script does. The other would just show the result of the fmtx, using fmtx_client with no parameters and grepping the state.
  • Timer? No, no timers or periodic execution are needed on my script. What I did for the Desktop Command Execution version was an if with /proc/uptime to update or not, so that it wouldn't trigger on boot but also wouldn't trigger with a click until 100 seconds had passed.
  • Well, I don't think that would fit for a workaround...
  • No, the one would trigger when clicked, the other would trigger e.g. on reboot or repaint when the option for the first not triggering on boot was activated.
  • I wouldn't. I'd rely on the device (FM TX) behaviour to get and set its status, as I did on the script.

Cheers,

Cláudio (Patola)

EDIT: BTW, I noticed a small bug. When entering the text in the input line, sometimes it capitalizes the first letter of some word. With the unix shell being case-sensitive, this results in the script failing. I've noticed that there are programs which do not capitalize any letter, maybe you need to set a flag or something in the input box properties.

No!No!No!Yes! 2010-03-24 23:33

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Patola (Post 581092)
Sorry, I think I confused my script running under Desktop Command Execution and Queen Beacon Widget. Most of the issues aren't there with QBW indeed. If I edit the desktop, the widget is not reinitialized. If I reboot, it is not auto activated either.

However, due to the nature of my script a small problem still rests. Since the update script is also the script that shows state, I can't get it activated on reboot because it will toggle the FM transmitter. And if I don't get it activated, it will show "Not updated" on the widget.

The script is this one:

Code:

result=$( /usr/bin/fmtx_client -p$( /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ) | /usr/bin/awk -F '=' '($1=="state") {print $2}' ); echo $result; [ $result = "enabled" ]
Answering your questions:
  • The first script would toggle the state of FM TX, as my script does. The other would just show the result of the fmtx, using fmtx_client with no parameters and grepping the state.
  • Timer? No, no timers or periodic execution are needed on my script. What I did for the Desktop Command Execution version was an if with /proc/uptime to update or not, so that it wouldn't trigger on boot but also wouldn't trigger with a click until 100 seconds had passed.
  • Well, I don't think that would fit for a workaround...
  • No, the one would trigger when clicked, the other would trigger e.g. on reboot or repaint when the option for the first not triggering on boot was activated.
  • I wouldn't. I'd rely on the device (FM TX) behaviour to get and set its status, as I did on the script.

Cláudio, would you mind trying with different scripts? Have a look at this topic: http://talk.maemo.org/showpost.php?p...&postcount=100 and please report back here results...

other suggestion:
why don't you just set "enable on startup" and programmatically skip first run from within your script like:
Code:

  if [! -f /tmp/1st_run ]
  then
      touch /tmp/1st_run
  else
      <your code here>
  fi

Quote:

EDIT: BTW, I noticed a small bug. When entering the text in the input line, sometimes it capitalizes the first letter of some word. With the unix shell being case-sensitive, this results in the script failing. I've noticed that there are programs which do not capitalize any letter, maybe you need to set a flag or something in the input box properties.
This is not a bug ... it is standard behaviour for text entry fields. Needs to be programmatically changed soon after entry text creation.
Thanks to querty12 tip this has already been changed in 0.1.5 still in internal testing on my N900

No!No!No!Yes! 2010-03-25 07:21

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
I made some test last night and it seems to me that when fmtx switches on the radio, and no sound is sent through it, after a while the FM radio gets automatically switched off.
I believe it is not easy for Beecon to track this kind of behaviour unless continuously polling with very short rest time... being a real Battery squeezer.

Patola 2010-03-25 18:49

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Yes, that's why I think the click script and update content script should be different! My "show" script could just get the battery status from fmtx_client polling every x minutes, while my "update" script could change it to what I want.

And thanks for the response, I'll try for the time being using the temporary file but I'd really prefer the feature of separate scripts.


All times are GMT. The time now is 11:25.

vBulletin® Version 3.8.8