Xymon Mailing List Archive search

Qt-Maemo5 xymon desktop widget for Nokia N900

7 messages in this thread

list Darrik Mazey · Tue, 05 Oct 2010 12:33:30 -0400 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello, all.

I wrote a desktop widget for the Nokia N900 that polls xymon server
status on a configured interval and reports the status via color icon
and notifications.

The source and installation instructions (via debian repository) are here:

http://github.com/darrikmazey/xymon-widget

Hope someone finds it useful.

Feedback and criticism are always welcome. :)

Cheers,
Darrik

- --
Darrik Mazey
DarmaSoft, LLC.
XXXX Marigold Avenue
Akron, Ohio 44301-2627
tele: XXX.XXX.XXXX
user-9bfdc5e6ebcb@xymon.invalid
http://www.darmasoft.com/

To obtain my public key, send an email to user-c82d852a3dca@xymon.invalid.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkyrU1oACgkQUplPW50tLfGykQCeNUlYpiT1e/k7F+keBnw28VCW
wjIAoII8FVzzVojMMU7qKDlciHmmP6qj
=lYrb
-----END PGP SIGNATURE-----
list Buchan Milne · Wed, 6 Oct 2010 17:11:03 +0100 ·
quoted from Darrik Mazey
On Tuesday, 5 October 2010 17:33:30 Darrik Mazey wrote:
Hello, all.

I wrote a desktop widget for the Nokia N900 that polls xymon server
status on a configured interval and reports the status via color icon
and notifications.

The source and installation instructions (via debian repository) are here:

http://github.com/darrikmazey/xymon-widget
I have been using an N900 for a few weeks, but only just installed the SDK over the past weekend. So, I decided to grab the source and compile. When compiling from Qt Creator from the SDK install, it compiles fine, but package creation fails (possibly due to the directory name). After messing with some things to fix it, only the executable ended up in the package.

I'll see if I can find the correct fixes to get it to build nicely straight from Qt Creator.
Hope someone finds it useful.
Well, I wonder if we could make it more useful. From reading the code, it seems to just look at the color of the bb2.html page. While this may be useful to some, I think many larger installations will have problems, e.g. those which need the critical systems view to make sense anything.

So, the question is, should we provide data in different formats than HTML, for smarter clients (and not just mobile ones). For example, would XML output (such as that generated by the hobbitdxboard command in bb)? The client may want to specify the options to the hobbitdxboard command (e.g. configured from the widget).

I'll try and get a bit further with this under Qt creator ...


Regards,
Buchan
list Darrik Mazey · Wed, 06 Oct 2010 14:41:42 -0400 ·
quoted from Buchan Milne
Buchan Milne wrote:
I have been using an N900 for a few weeks, but only just installed the SDK 
over the past weekend. So, I decided to grab the source and compile. When 
compiling from Qt Creator from the SDK install, it compiles fine, but package 
creation fails (possibly due to the directory name). After messing with some 
things to fix it, only the executable ended up in the package.
I caution you, it was five days' effort, so rough edges are just that
still.  Also, mostly the code is set up for my dev environment, to
generate a debian package.  If you have ideas for restructuring to make
that more generic, don't hold back.

It should be noted that this was my first N900 project, as I just got
one, and also my first shot at generating debian packages, so any advice
is appreciated.
quoted from Buchan Milne
I'll see if I can find the correct fixes to get it to build nicely straight from 
Qt Creator.
Let me know how that goes.  I build from the command-line, so I'm not
sure what would be going wrong in Qt Creator.
quoted from Buchan Milne
Well, I wonder if we could make it more useful. From reading the code, it 
seems to just look at the color of the bb2.html page. While this may be useful 
to some, I think many larger installations will have problems, e.g. those 
which need the critical systems view to make sense anything.
This is true.  All it does is parse for color to display the icon, and
then parses for individual non-green items to show in a notification.
Multiple views (one for small- to moderate-sized xymon installs and one
for larger) might be appropriate, selectable from the settings, perhaps.

This was not meant to be a full-scale app but just an at-a-glance view.
 If you're interested, we can always write a full-scale app that opens
when the desktop widget is tapped, providing more (and navigable) data.
I'll try and get a bit further with this under Qt creator ...
If there's something specific I can help with, feel free to contact me
off-list.
quoted from Darrik Mazey

Cheers,
Darrik


-- 
Darrik Mazey
DarmaSoft, LLC.
XXXX Marigold Avenue
Akron, Ohio 44301-2627
tele: XXX.XXX.XXXX
user-9bfdc5e6ebcb@xymon.invalid
http://www.darmasoft.com/

To obtain my public key, send an email to user-c82d852a3dca@xymon.invalid.
list dOCtoR MADneSs · Thu, 07 Oct 2010 09:55:11 +0200 ·
First of all, many thanks for this. I'm learning C and one of my first projects was to do something similar.
On the suggestions side, I think it should be usefull to save SSL certificate from https servers. I use apache' http authentication. I'm quite paranoid ;)
To hide password, at least in settings menu, should be very nice too.
It should be nice to let user choose how long the alert status page is shown. 
Finally I installed your widget from your apt repo, configured everything (the username/pwd fields are for http auth ?) and it works pretty well.
quoted from Buchan Milne

----- Message d'origine -----
Buchan Milne wrote:
I have been using an N900 for a few weeks, but only just installed the
SDK   over the past weekend. So, I decided to grab the source and
compile. When   compiling from Qt Creator from the SDK install, it
compiles fine, but package   creation fails (possibly due to the
directory name). After messing with some   things to fix it, only the
executable ended up in the package.
I caution you, it was five days' effort, so rough edges are just that
still.   Also, mostly the code is set up for my dev environment, to
generate a debian package.   If you have ideas for restructuring to make
that more generic, don't hold back.

It should be noted that this was my first N900 project, as I just got
one, and also my first shot at generating debian packages, so any advice
is appreciated.
I'll see if I can find the correct fixes to get it to build nicely
straight from   Qt Creator.
Let me know how that goes.   I build from the command-line, so I'm not
sure what would be going wrong in Qt Creator.
Well, I wonder if we could make it more useful. From reading the code,
it   seems to just look at the color of the bb2.html page. While this
may be useful   to some, I think many larger installations will have
problems, e.g. those   which need the critical systems view to make
sense anything.
This is true.   All it does is parse for color to display the icon, and
then parses for individual non-green items to show in a notification.
Multiple views (one for small- to moderate-sized xymon installs and one
for larger) might be appropriate, selectable from the settings, perhaps.

This was not meant to be a full-scale app but just an at-a-glance view.
   If you're interested, we can always write a full-scale app that opens
when the desktop widget is tapped, providing more (and navigable) data.
I'll try and get a bit further with this under Qt creator ...
If there's something specific I can help with, feel free to contact me
off-list.

Cheers,
Darrik


-- 
Darrik Mazey
DarmaSoft, LLC.
XXXX Marigold Avenue
Akron, Ohio 44301-2627
tele: XXX.XXX.XXXX
user-9bfdc5e6ebcb@xymon.invalid
http://www.darmasoft.com/

To obtain my public key, send an email to user-c82d852a3dca@xymon.invalid.

list Darrik Mazey · Thu, 07 Oct 2010 14:27:28 -0400 ·
quoted from dOCtoR MADneSs
dOCtoR MADneSs wrote:
First of all, many thanks for this. I'm learning C and one of my first projects was to do something similar.
On the suggestions side, I think it should be usefull to save SSL certificate from https servers. I use apache' http authentication. I'm quite paranoid ;)
To hide password, at least in settings menu, should be very nice too.
It should be nice to let user choose how long the alert status page is shown. 
Finally I installed your widget from your apt repo, configured everything (the username/pwd fields are for http auth ?) and it works pretty well.
Glad to hear you find it useful!  Hiding passwords in the text input is
something I realized but haven't gotten to yet.  As for saving the SSL
certs and comparing them, that's a good idea I hadn't thought of.  It
does use the SSL cert for establishing an encrypted connection (so your
http basic auth isn't sent in the clear) but doesn't verify the cert in
any way, mostly because everyone I know (including me) uses a
self-signed cert.

Regarding the notification timing, you have two options.  Manual (tap to
dismiss) and the default N900 notification timeout, which I believe is 5
seconds.

If you feel like implementing any improvements, feel free to do so.  You
can fork the project on github, then give me a pull request when you're
ready, or just send me a patch.  If you're just learning c/c++, feel
free to shoot me any questions about the code off-list (email or jabber:
user-4da6fe6fd2bc@xymon.invalid).  It's pretty straight-forward, but I'd be
glad to offer any assistance I can.  The world can always use more c
programmers. ;)
quoted from dOCtoR MADneSs

Cheers,
Darrik

-- 
Darrik Mazey
DarmaSoft, LLC.
XXXX Marigold Avenue
Akron, Ohio 44301-2627
tele: XXX.XXX.XXXX
user-9bfdc5e6ebcb@xymon.invalid
http://www.darmasoft.com/

To obtain my public key, send an email to user-c82d852a3dca@xymon.invalid.
list dOCtoR MADneSs · Sat, 09 Oct 2010 20:02:28 +0200 ·
quoted from Darrik Mazey
Le 07/10/2010 20:27, Darrik Mazey a écrit :
dOCtoR MADneSs wrote:
   
First of all, many thanks for this. I'm learning C and one of my first projects was to do something similar.
On the suggestions side, I think it should be usefull to save SSL certificate from https servers. I use apache' http authentication. I'm quite paranoid ;)
To hide password, at least in settings menu, should be very nice too.
It should be nice to let user choose how long the alert status page is shown.
Finally I installed your widget from your apt repo, configured everything (the username/pwd fields are for http auth ?) and it works pretty well.

     
Glad to hear you find it useful!  Hiding passwords in the text input is
something I realized but haven't gotten to yet.  As for saving the SSL
certs and comparing them, that's a good idea I hadn't thought of.  It
does use the SSL cert for establishing an encrypted connection (so your
http basic auth isn't sent in the clear) but doesn't verify the cert in
any way, mostly because everyone I know (including me) uses a
self-signed cert.

Regarding the notification timing, you have two options.  Manual (tap to
dismiss) and the default N900 notification timeout, which I believe is 5
seconds.

If you feel like implementing any improvements, feel free to do so.  You
can fork the project on github, then give me a pull request when you're
ready, or just send me a patch.  If you're just learning c/c++, feel
free to shoot me any questions about the code off-list (email or jabber:
user-4da6fe6fd2bc@xymon.invalid).  It's pretty straight-forward, but I'd be
glad to offer any assistance I can.  The world can always use more c
programmers. ;)

Cheers,
Darrik
   
Hi,

I've a strange behaviour since I installed your widget. When my device 
powers on, it asks me 2 times to connect. The first time I choose my 
connection (working), but the widget seems to ask a 2nd time anyway.
list Darrik Mazey · Sat, 23 Oct 2010 17:03:40 -0400 ·
dOCtoR MADneSs wrote:
Hi,
quoted from dOCtoR MADneSs
Hi.
I've a strange behaviour since I installed your widget. When my device
powers on, it asks me 2 times to connect. The first time I choose my
connection (working), but the widget seems to ask a 2nd time anyway.
The widget makes no calls into the connection API.  It simply requests a
url from the connection access manager.  It's entirely possible that the
widget is create the connection access manager object prior to the
connection being established, and so the NAM instigates the second
request.  Perhaps a delay on startup of xymon-widget would fix this
issue.  An improved version of xymon-widget would do a little connection
checking and maybe offer a "wifi only" option as well.  However, I
didn't want to add the dependency on the qt-mobility library, as it
seemed unnecessary and additionally seemed to be under rapid development
with frequent API changes.

I'll try to isolate that behavior and see if a startup delay represents
a suitable workaround for now.

As always, thanks for the feedback.
quoted from Darrik Mazey

Darrik


-- 
Darrik Mazey
DarmaSoft, LLC.
XXXX Marigold Avenue
Akron, Ohio 44301-2627
tele: XXX.XXX.XXXX
user-9bfdc5e6ebcb@xymon.invalid
http://www.darmasoft.com/

To obtain my public key, send an email to user-c82d852a3dca@xymon.invalid.