Welcome! Log In Create A New Profile

Advanced

PyDPF not working due to Google disabling API!

Posted by BigRon 
PyDPF not working due to Google disabling API!
November 02, 2012 01:28PM
Hi there Folks....


Finally now after nearly 2 days of trying out , installing things, many compiling errors and so on I got the Firmwares compiled from " http://dpf-ax.svn.sourceforge.net/ " ...

God I was raging many times til now! ^^

I flashed then the PearlDisplay (AX206) Landscape Mode while in Bootloader Mode and now there are many eyes looking at me! ^So the Flashing was successfull...

Now I also compiled lcd4linux and it is working and also installed tightvnc to get the PyDpf.py with my MPD Server working.


I am startig tightvnc with folowing command:
vncserver :2 -geometry 320x240 -depth 24

And after executing PyDPF.py I am getting following error:
root@soprano:/home/lcd4linuxstuff/pydpf/pydpf# python PyDPF.py
Found AX206 DPF
Got LCD dimensions: 320x240
Traceback (most recent call last):
  File "PyDPF.py", line 627, in <module>
    main()
  File "PyDPF.py", line 616, in main
    handler = RemoteEventHandler()
  File "PyDPF.py", line 476, in __init__
    self._mpdHandler = MPDHandler(self._DPF,dpfrender.MPDrender(self._DPF),config.MPD_REFRESH,self)
  File "PyDPF.py", line 269, in __init__
    super(MPDHandler,self).__init__ (DPF,render,timeout,parentThread)
  File "PyDPF.py", line 215, in __init__
    self._weather.update(config.WEATHER_CITY)
  File "/home/lcd4linuxstuff/pydpf/pydpf/utils/weather.py", line 59, in update
    self._wt = pywapi.get_weather_from_google(city)
  File "/home/lcd4linuxstuff/pydpf/pydpf/utils/pywapi.py", line 115, in get_weather_from_google
    handler = urllib.urlopen(url)
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 444, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden

I think it has to do with google disabling the Weather API. But I disabled as shown in the pydpf Config file the Weather feature and the Picture-Show Feature but it still gives me this error.
Is there a different easier way to show the VNC Screen on the DPF?
Can someone help me with this... I am near to completion...


And What I also wanted to ask:

Should I use the hackfin Firmwares or are there any more feature rich firmwares available for the Pearl AX206 Display?

I wanted to get the Display right into VNC Mode after bootup displaying MPD Informations. Is there a way to replace the Picture with the eyes with a self made picture? And when lcd4linux is shut down is there a way to show again this self made picture/logo again instead of showing the goodbye message from lcd4linux?

Is there also a way to change the view-mode of PyDPF while running? So e.g. when MPD is Playing it shows the MPD Informations and when MPD is not playing any Music the Display will show Time and weather or something else like disabling itself?

Is there also a way to control the Backlight directly over lcd4linux or do i need to set it manually to the intensity with the Buttons on the back of the DPF ?


Thank you in advance. Man. This was a real PITA to the state I got this working now. Only the PyDPF errors arent resolved now... I am really happy about any help!


Thank you!

Greetings Ron!



Edited 1 time(s). Last edit at 11/02/2012 01:36PM by BigRon.
Re: PyDPF not working due to Google disabling API!
November 02, 2012 09:04PM
Why don't you report the problem to the upstream program (PyDPF) author - irimi?

A initial glance suggests uncommenting code in pywapi.py (lines 248 to 429) to use yahoo weather and line 59 of weather.py requires changes to call get_weather_from_yahoo. But I have no idea if irimi actually tested the commented code.
Re: PyDPF not working due to Google disabling API!
November 03, 2012 06:11AM
BigRon Wrote:
-------------------------------------------------------
> Hi there Folks....
>
>
> Finally now after nearly 2 days of trying out ,
> installing things, many compiling errors and so on
> I got the Firmwares compiled from "
> http://dpf-ax.svn.sourceforge.net/ " ...
>
> God I was raging many times til now! ^^
>

Could you tell us what the major problems were compiling dpf-ax?
Any suggestions what we can do to make it easier for "first time" users?

>
> And What I also wanted to ask:
>
> Should I use the hackfin Firmwares or are there
> any more feature rich firmwares available for the
> Pearl AX206 Display?
>

No other fw available. What features are you missing?

> I wanted to get the Display right into VNC Mode
> after bootup displaying MPD Informations. Is there
> a way to replace the Picture with the eyes with a
> self made picture? And when lcd4linux is shut down
> is there a way to show again this self made
> picture/logo again instead of showing the goodbye
> message from lcd4linux?
>

For flashing self made splash screens have a look at setsplash.sh in the fw folder.
If you want to change the "standard" splash, convert your image to rgb with setsplash.sh (or ffmpeg directly) and put it in the src/res folder under the correct name (in your case "splash.320x240.rgb") and recompile.

For showing a picture after lcd4linux shutdown you can use PyDPF or dpfsend.

> Is there also a way to control the Backlight
> directly over lcd4linux or do i need to set it
> manually to the intensity with the Buttons on the
> back of the DPF ?
>

Lcd4linux config-parameter "Backlight". Value 0 = off, 7 = max.

superelchi



Edited 3 time(s). Last edit at 11/03/2012 06:14AM by superelchi.
Re: PyDPF not working due to Google disabling API!
November 16, 2012 07:21AM
There's a new version of PyDPF v0.19 using yahoo weather.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: