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 - Ringroads Live Traffic Beecons (https://talk.maemo.org/showthread.php?t=47528)

No!No!No!Yes! 2010-03-16 15:34

[Announce] Queen BeeCon Widget - Ringroads Live Traffic Beecons
 
Customize Queen BeeCon Widget (>=v0.1.4) to display Italian Ringroads Live Traffic

http://i41.tinypic.com/15x5m5k.png

Current Beecon is configured to display Live Traffic graphic status of Milan Ringroads System.

Other major cities in Italy are also available: ROME, TURIN, FLORENCE, NAPLES, BOLOGNA! See relevant section of this thread to adapt the command to different cities.

Let's go...

Preparation Steps:
  1. Download and Install Queen Beecon Widget (>=v0.1.4) (Warning! It's still in extras-devel; if you like it, I need your support for testing and promoting to Testing and Extras)

  2. Make sure we copy the following Exported Instance Data to our phone's clipboard. (Do not modify anything as it is checksum protected and modifications will invalidate checksum!)
    Code:

    [queen-beecon-header]
    version=1,000000
    checksum=1248650
    [queen-beecon-exported-instance]
    widgetType=1
    operationalStatus=0
    hideCanvas=false
    snippetBgRGB=0
    beecon_lt0_ImgZoom=0
    beecon_lt0_BgRGB=2
    beecon_lt0_ImgFilename=queen-beecon-syserr.png
    beecon_eq0_ImgZoom=0
    beecon_eq0_BgRGB=3
    beecon_eq0_ImgFilename=queen-beecon-appok.png
    beecon_eq1_ImgZoom=0
    beecon_eq1_BgRGB=4
    beecon_eq1_ImgFilename=queen-beecon-appwrn.png
    beecon_ge2_ImgZoom=0
    beecon_ge2_BgRGB=5
    beecon_ge2_ImgFilename=queen-beecon-apperr.png
    beecon_idxge2_ImgZoom=0
    beecon_idxge2_BgRGB=11
    beecon_idxge2_ImgFilename=queen-beecon-index.png
    widWidth=399
    widHeight=400
    instanceTitle=Milan Ringroad Live Traffic Beecon
    instanceCmd=echo "`date`" ; wget --user-agent="" -q -t 1 -T 10 -O "/home/user/MyDocs/.images/queen_beecon_dir/milan-ringroad.gif" "http://traffico.octotelematics.it/dyn/5.gif?ts="
    cmdImgFilename=;queen-beecon.png
    cmdImgZoom=0
    cmdFgRGB=5
    cmdVisibilityPosition=1
    cmdImgVisibilityPosition=1
    cmdJustify=0
    cmdFontName=3
    cmdFontSize=14
    resImgFilename=milan-ringroad.gif
    resImgZoom=1
    resFgRGB=4
    resVisibilityPosition=7
    resImgVisibilityPosition=5
    resJustify=0
    resFontName=3
    resFontSize=12
    updOnStartup=false
    updOnClick=true
    updOnDesktop=false
    delayIndex=0
    updNeworkPolicy=1

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

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

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

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

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

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

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

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

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

  12. 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 Here we Are!!!

We can also access graphics for other Italian Ringroads:
  1. Let's start the Main Settings Dialog Box Again and click on the "Edit Cmd" button (1)
    http://i40.tinypic.com/j5hu2q.png

  2. Let's change the command title according to the new City we'd like to retreive traffic status (Text 1)
    http://i44.tinypic.com/2dsi7vm.png
  3. For ROME change URL in command (Text 2) with: http://traffico.octotelematics.it/dyn/1.gif?ts=
  4. For NAPLES change URL in command (Text 2) with: http://traffico.octotelematics.it/dyn/2.gif?ts=
  5. For FLORENCE change URL in command (Text 2) with: http://traffico.octotelematics.it/dyn/3.gif?ts=
  6. For BOLOGNA change URL in command (Text 2) with: http://traffico.octotelematics.it/dyn/4.gif?ts=
  7. For TURIN change URL in command (Text 2) with: http://traffico.octotelematics.it/dyn/6.gif?ts=
  8. Save changed command with Button (3) and "Save and Run" in next dialog!

Have Fun!!!

Data is made available on the internet and is freely accessible also through a normal browser by pointing to "www.octotelematics.it". 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.

No!No!No!Yes! 2010-03-16 19:38

Re: [Announce] Queen BeeCon Widget - Italian Ringroads (Tangenziali) Live Traffic Beecon
 
Added:

Code:

--user-agent=""
into wget command options to prevent wget from showing himself as bot!
At times, in fact, web server responded with 403 permission denied.
Let's see if this works better now!

debernardis 2010-03-17 06:53

Re: [Announce] Queen BeeCon Widget - Italian Ringroads (Tangenziali) Live Traffic Beecon
 
Thanks - I didn't know of this site. It's going to be exceptionally useful...

sebastiaan.lampo 2010-10-14 12:15

Re: [Announce] Queen BeeCon Widget - Ringroads Live Traffic Beecons
 
2 Attachment(s)
Traffic for Flanders (Belgium)

Hi, I made a similar BeeCon for my own area. Specifities:
  • source page is traffic map
  • A transparent PNG is shown in overlay on a map of the area
  • The image url changes

To overcome these difficulties, an awk script is used, in combination with 2 subsequent wgets. To ease the QBW, I put everything in a shell script. Note: it might be possible to do this more efficiently as I'm a first time user of both awk, shell scripts and QBW :)

/home/user/.queen_beecon_dir/verkeerskaart.sh (the shell script)
Code:

wget -T 80 -O kaart http://www.verkeerscentrum.be/verkeersinfo/kaart
wget -T 80 -O ~/MyDocs/.images/queen_beecon_dir/map_image.png http://www.verkeerscentrum.be`awk -f verkeerskaart.awk kaart`
ls -l ~/MyDocs/.images/queen_beecon_dir/map_image.png | awk '{ print $8 }'
ls -l ~/MyDocs/.images/queen_beecon_dir/map_image.png | awk '{ print $7,$6 }'
rm -f kaart

/home/user/.queen_beecon_dir/verkeerskaart.awk (the awk script)
Code:

BEGIN { FS = "'" }
/congestions.layer[^_].*'(.map_image.*)/ { print $2 }

now, use the attached picture as a background if you have the marina theme. Otherwise, download from the traffic website and modify to your liking. (note, matching the position of background is a bit tricky. use the supplied background to pinpoint for positioning)

I haven't mastered exporting my QBW yet, but settings are as follows:
type=snippet
result image = map_image.png , size 150%
hide background
size max: 800 x 420.

Custom command:
Code:

cd ~/.queen_beecon_dir
./verkeerskaart.sh

I found it necessary to use the cd, otherwise the picture did not get updated. (It did return the correct date & time though)

Enjoy :D

No!No!No!Yes! 2010-10-14 18:14

Re: [Announce] Queen BeeCon Widget - Ringroads Live Traffic Beecons
 
Quote:

Originally Posted by sebastiaan.lampo (Post 840864)
Traffic for Flanders (Belgium)

Hi, I made a similar BeeCon for my own area. Specifities:
  • source page is traffic map
  • A transparent PNG is shown in overlay on a map of the area
  • The image url changes

To overcome these difficulties, an awk script is used, in combination with 2 subsequent wgets. To ease the QBW, I put everything in a shell script. Note: it might be possible to do this more efficiently as I'm a first time user of both awk, shell scripts and QBW :)

/home/user/.queen_beecon_dir/verkeerskaart.sh (the shell script)
Code:

wget -T 80 -O kaart http://www.verkeerscentrum.be/verkeersinfo/kaart
wget -T 80 -O ~/MyDocs/.images/queen_beecon_dir/map_image.png http://www.verkeerscentrum.be`awk -f verkeerskaart.awk kaart`
ls -l ~/MyDocs/.images/queen_beecon_dir/map_image.png | awk '{ print $8 }'
ls -l ~/MyDocs/.images/queen_beecon_dir/map_image.png | awk '{ print $7,$6 }'
rm -f kaart

/home/user/.queen_beecon_dir/verkeerskaart.awk (the awk script)
Code:

BEGIN { FS = "'" }
/congestions.layer[^_].*'(.map_image.*)/ { print $2 }

now, use the attached picture as a background if you have the marina theme. Otherwise, download from the traffic website and modify to your liking. (note, matching the position of background is a bit tricky. use the supplied background to pinpoint for positioning)

I haven't mastered exporting my QBW yet, but settings are as follows:
type=snippet
result image = map_image.png , size 150%
hide background
size max: 800 x 420.

Custom command:
Code:

cd ~/.queen_beecon_dir
./verkeerskaart.sh

I found it necessary to use the cd, otherwise the picture did not get updated. (It did return the correct date & time though)

Enjoy :D

So you managed ... in the end!?!?!?
Watch out however that html page is quite heavy ~125KB + png ~25KB makes 150KB every polling ... maybe there's an equivalent liter page for it by specifying different useragent to wget ... gotta experiment a little bit more though.

Cool beecon indeed!!!

sebastiaan.lampo 2010-10-14 21:05

Re: [Announce] Queen BeeCon Widget - Ringroads Live Traffic Beecons
 
Quote:

Originally Posted by No!No!No!Yes! (Post 841170)
So you managed ... in the end!?!?!?
Watch out however that html page is quite heavy ~125KB + png ~25KB makes 150KB every polling ... maybe there's an equivalent liter page for it by specifying different useragent to wget ... gotta experiment a little bit more though.

Cool beecon indeed!!!

Yeah, it worked in the end. The key was this cd, as all files simply went to an unknown directory. I noted QBW running from / by default by running "ls" in the test area and went from there... :)

I never use mobile internet due to charges of 0.5 euro / 5 min in Belgium, so it's only a final check before leaving the home.. but you've got a point there. Also set update to click only.

I'll try out to reduce traffic by using filebeeld.be which is a mobile version of that website (basicly only a trancoder though). If I can get the image url from there, it might save some traffic.

gianko 2013-03-11 17:50

Re: [Announce] Queen BeeCon Widget - Ringroads Live Traffic Beecons
 
the website traffico.octotelematics.it now ask for registration?

we need to change the url with an access token or something?

ps: can you make a similar beecon with this real time traffic data from Rome,Italy ? is opendata, updated regularly:
http://85.18.173.117/opendata/UltimoRilevamento.xml


All times are GMT. The time now is 10:49.

vBulletin® Version 3.8.8