Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-15-2012, 08:08 PM   #76
jimmy.caille
Junior Member
jimmy.caille began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2012
Device: Kobo Glo
Quote:
Originally Posted by KevinShort View Post
It could be done on a Glo. The script just needs to be updated for the Glo's higher-resolution screen.


Great! Sorry I haven't gotten back to you sooner, but here's a small python script
that creates an image with the text "Hello" in the upper-left corner and then calls
the Kobo's "show_pic" command to display the image. If that script works, then
creating the display you want won't be hard at all.
Ok, so on the script-side, not too much to adapt.

But can I use the Kobo Wifi files to root my Glo ?

[EDIT]

So, I have telnet access on my Glo now.
I know that the resolution is bigger and fbset command give me this :
Quote:
mode "1024x758-0"
# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
geometry 1024 758 1024 1536 16
timings 0 0 0 0 0 0 0
accel false
rgba 5/11,6/5,5/0,0/0
endmode
[EDIT2]

I used the files of the Kobo Touch and it works !
But it appears like that :

So the only thing to adapt is the size of the screen and images emplacements inside weather.py ?

Last edited by jimmy.caille; 12-18-2012 at 03:15 AM.
jimmy.caille is offline   Reply With Quote
Old 12-17-2012, 03:24 PM   #77
FeRDNYC
Junior Member
FeRDNYC began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2012
Device: none
Quote:
Originally Posted by KevinShort View Post
Hmm, accuweather might work. I have used a desktop weather script that
fetched data from accuweather, and it was quite accurate. As you said, the
city code could be a problem, but I'll look into it. Thanks for the suggestion!
For the Gnome Shell weather extension (a statusbar "gadget" displaying conditions and forecasts), we get our data from Yahoo Weather.

They have a pretty good free API and sensible policies (each user isn't forced to obtain their own separate API key, like with weather.com and some others), they actually supply a lot of nice detail for the current conditions (humidity, pressure, wind conditions, sunrise/sunset times, lunar phase IIRC), and it's available worldwide with reportedly pretty good accuracy.

The down side is, they only supply two days of forecast data. So you're limited to the current conditions, plus tomorrow and tomorrow+1 forecasts... no five-day. So, it's a tradeoff.

There appears to be a python wrapper pre-built, but that was last updated in 2009 so I'm a bit pessimistic about it. (If nothing else, it'll work against Yahoo's older, deprecated API, which doesn't seem wise.)

Honestly, I'm not sure a wrapper is necessary; the Shell extension just implements the interface directly, building a request URL that retrieves all of the weather data as a single JSON dump, which is then parsed. Their official API (which we're not quite using) offers either RSS or XML, and a good XML parsing library would probably serve just as well, if not better than a purpose-built API.

In fact, here's a Yahoo Developer Network article titled Parse XML using Python that actually uses the Weather API as an example.

----

The currently-active fork of the weather extension code lives in github, if you're looking for inspiration, tho there a few things done "wrong" for legacy reasons. (Including the use of deprecated Yahoo Location IDs, not WOEIDs ("Where On Earth IDs"), despite what the code/docs say. That, you definitely don't want to emulate; use the WOEIDs.)

Gnome Shell extensions are written in JavaScript, not Python, but as I said the request/response processing is pretty basic. All of the Yahoo Weather interaction specifically lives in extension.js starting with get_weather_url() @ line ~273.

Speaking of WOEIDs, users will need theirs. We have a Location ID lookup tool in our configurator (finally!), but for an embedded system it probably makes sense to just have users do an external lookup and configure their WOEID in place of the lat/long values.

Yahoo's API docs recomend going to http://weather.yahoo.com/, looking up weather for your target location, and then pulling the WOEID out of the result URL. I suppose that's one option, and certainly the easiest official path since their GeoPlanet API does require an API key for lookup requests (!?!), but there are third-party tools like http://woeid.factormystic.net/ out there that have already gone through all of that hassle.

...It's a great-looking weather station, BTW — awesome project! Really cool stuff. Makes me wish I had a Kobo of my own to play with. :-)
FeRDNYC is offline   Reply With Quote
Old 12-20-2012, 01:03 PM   #78
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by jimmy.caille View Post
So the only thing to adapt is the size of the screen and images emplacements inside weather.py ?
That should be all that's needed.

Quote:
Originally Posted by FeRDNYC View Post
For the Gnome Shell weather extension (a statusbar "gadget" displaying conditions and forecasts), we get our data from Yahoo Weather.

They have a pretty good free API and sensible policies (each user isn't forced to obtain their own separate API key, like with weather.com and some others), they actually supply a lot of nice detail for the current conditions (humidity, pressure, wind conditions, sunrise/sunset times, lunar phase IIRC), and it's available worldwide with reportedly pretty good accuracy.

...
Thanks for the suggestion. Now that you've mentioned it, a two-day forecast with more information besides just high/low and conditions might be quite nice.
KevinShort is offline   Reply With Quote
Old 01-11-2013, 07:39 PM   #79
Mikem42
Junior Member
Mikem42 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2013
Location: Hillsboro, Oregon, USA
Device: Kobo Wifi
Got it working too!

I got it working pretty easily. Then I decided to add a clock. My initial version of the code has cron call the script every minute, so I'll need to do something more clever to not query the weather server ever minute, as well as make it a little prettier. I'll post code after I get things pretty :-)

Thanks so much for sharing your work!

Mikem42 is offline   Reply With Quote
Old 01-25-2013, 05:20 AM   #80
andyh2000
Fanatic
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 562
Karma: 1568694
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy S4 Mini phone / Kindle 4 Black / Kindle Paperwhite
My version

Here's a screenshot (on Windows) of my first attempt. It's based mainly on Kevin's original version but with only two days' weather forecast as I wanted a big date display. I'm also pulling in cloud cover forecast information from 7timer (http://www.7timer.com/index.php?product=astro) as I'm an amateur astronomer.

Click image for larger version

Name:	weatherdate.png
Views:	150
Size:	47.7 KB
ID:	100016

Andrew
andyh2000 is offline   Reply With Quote
Old 01-25-2013, 06:08 PM   #81
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
@Mikem42, andyh2000: Thanks for posting your works, it's always cool to see what people come up with.
KevinShort is offline   Reply With Quote
Old 01-27-2013, 03:58 PM   #82
paste0x78
Junior Member
paste0x78 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: Kobo Mini
Exclamation Kobo Mini

So I too have a Kobo mini and can't seem to get anything displayed.

I installed from your link here and had the same TTF font issues. Is that the most recent version of the file?

After converting the fonts to OTF everything runs smoothly. I killed nickel and ran the script and nothing is displayed.

Any ideas? On a Kobo Mini what is the method to display an image on the screen? It seems to have changed a lot between models.

Code:
[root@(none) /root]# /mnt/onboard/.python/weather.sh 
Kobo Wifi weather forecast started.
Getting weather information . . .
Creating image . . .
Converting image . . .
Image converted.
Code:
[root@(none) /root]# uname -a
Linux (none) 2.6.35.3-850-gbc67621+ #606 PREEMPT Mon Nov 5 14:13:06 CST 2012 armv7l GNU/Linux
Code:
[root@(none) /root]# fbset

mode "800x600-0"
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
        geometry 800 600 800 1280 16
        timings 0 0 0 0 0 0 0
        accel false
        rgba 5/11,6/5,5/0,0/0
endmode
paste0x78 is offline   Reply With Quote
Old 01-27-2013, 08:03 PM   #83
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by paste0x78 View Post
So I too have a Kobo mini and can't seem to get anything displayed.

I installed from your link here and had the same TTF font issues. Is that the most recent version of the file?
I made a seperate version of the file for the Kobo Touch, which should work on the Mini as well. Download from here. That version has OTF font files, and uses a different method to refresh the display that should work on the Mini, since it works on both the Glo and Touch.
KevinShort is offline   Reply With Quote
Old 01-28-2013, 06:55 PM   #84
paste0x78
Junior Member
paste0x78 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: Kobo Mini
Quote:
Originally Posted by KevinShort View Post
I made a seperate version of the file for the Kobo Touch, which should work on the Mini as well. Download from here. That version has OTF font files, and uses a different method to refresh the display that should work on the Mini, since it works on both the Glo and Touch.
Thank you. It works wonderfully. I figured I had the wrong archive when I didn't see full_update anywhere. Is it something that came with one of the devices or something of your creation?
paste0x78 is offline   Reply With Quote
Old 01-28-2013, 09:02 PM   #85
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by paste0x78 View Post
Thank you. It works wonderfully. I figured I had the wrong archive when I didn't see full_update anywhere. Is it something that came with one of the devices or something of your creation?
I wrote the program myself after studying the Freescale documentation on driving the e-ink screen used in the Kobo devices. If you're familiar with C code it's quite straightforward, though when I started trying to drive the display I had never written a line of C in my life. I just barely managed to understand enough of the documentation to write the code to refresh the display.
KevinShort is offline   Reply With Quote
Old 02-23-2013, 12:00 PM   #86
hercules
Junior Member
hercules began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch
Great "app"
I got it running, but i´m a complete newbie with this , and if i restart or shutdown the Kobo the app doesn't appear anymore.

So the question is, how can i enable it back again?


Thank you.
Nice works
hercules is offline   Reply With Quote
Old 02-23-2013, 02:10 PM   #87
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by hercules View Post
Great "app"
I got it running, but i´m a complete newbie with this , and if i restart or shutdown the Kobo the app doesn't appear anymore.

So the question is, how can i enable it back again?
How are you starting the weather display in the first place? Are you using the kobo tweaks plugin?
KevinShort is offline   Reply With Quote
Old 02-23-2013, 06:49 PM   #88
hercules
Junior Member
hercules began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch
Thank you for the reply.
Kobo tweaks plugin...Well i did say i was a noob on this

I just installed the weather display and expected to works for itself, unaware that there were other requirements. Sorry.

Could you please point were i can find the plugin for the Touch?

Sorry for the inconvenience.
Many thanks
hercules is offline   Reply With Quote
Old 02-23-2013, 08:05 PM   #89
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Supporting the Kobo Touch was really just an afterthought with this project, so it takes a little extra work to get it all going. Unfortunately, telnet access is needed to get this app up and running. This is the first step. Instructions can be found on the wiki.

The kobo tweaks plugin can be found in this thread, but telnet is still needed to run the weather app.

I know, I know, the whole process is not very friendly towards newbies.
Maybe one of these days I'll get around to making the app more user-friendly.

Last edited by KevinShort; 02-23-2013 at 08:12 PM. Reason: spelling
KevinShort is offline   Reply With Quote
Old 02-24-2013, 05:22 AM   #90
hercules
Junior Member
hercules began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch
Many thanks.
I got telnet working so i´m going to try the plugins.
Edit:
Just a final question, in order to get the weather app running is it necessary to always running it from telnet?
Going trough telnet and executing the steps i the initial post, does works but only if i use the killall nickel command first.

The issue is that i got the app runing but the screens freezes and in order to get back to the normal functions of the Kobo í have to soft reset it.
Then the app is gone and is the only way to activate it is trough telnet?

I have installed the plugins , wich gave me aan extra options, tools-browser-chess-tweak settings,initial menu, Diverse(?) and Leds.

Again many thanks for your time

Last edited by hercules; 02-24-2013 at 05:44 AM.
hercules is offline   Reply With Quote
Reply

Tags
hacking, kobo wifi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd; Kobo-purchased book reads fine on Desktop, WiFi and Sony -but not on Kobo Touch. beautifulsoup Kobo Reader 4 07-17-2012 09:29 AM
Kobo Touch in cold weather Judsuw General Discussions 15 06-02-2012 06:23 PM
Sync epubs between Kobo app and Kobo wifi? emilikins Kobo Reader 1 11-17-2011 04:12 PM
Kobo Desktop App v1.7 onboard Kobo WiFi ZombWii Kobo Reader 6 10-20-2010 12:24 PM
Forrester upgrades sales forecast by 50% xoox News 0 10-10-2009 04:11 AM


All times are GMT -4. The time now is 01:59 AM.


MobileRead.com is a privately owned, operated and funded community.