Prowl notifications for Google Voice

An iPhone client for Growl available on the App Store.
rathkopf
Harmless
Posts: 4
Joined: Fri Sep 25, 2009 5:33 pm

Re: Prowl notifications for Google Voice

Postby rathkopf » Fri Sep 25, 2009 8:47 pm

Odd. When I try to log in from a browser using the string in the file from before I did my fix, I get a new login window, too. Not sure why it doesn't do that for you.

kjconrad
Muffin
Posts: 30
Joined: Sat Jul 18, 2009 5:41 am

Re: Prowl notifications for Google Voice

Postby kjconrad » Tue Sep 29, 2009 1:39 pm

Anyone have this script stop working for them overnight? All I get now is this:

Code: Select all

Traceback (most recent call last):
  File "prowlgooglevoice.py", line 66, in <module>
    gv.check()
  File "/Users/xxxx/GoogleVoice/googlevoicenotify.py", line 149, in check
    feed = self.get_inbox()
  File "/Users/xxxx/GoogleVoice/googlevoicenotify.py", line 70, in get_inbox
    return unicode(sp.response.html.contents[0])
AttributeError: 'NoneType' object has no attribute 'html'


over and over again on the official script. I don't get the error using tsuehpsyde's version of the script, but I don't get text messages either.


edit: Just a quick edit to say that something definitely changed with Google Voice last night, my GV Mobile app no longer works either. I get an "Invalid Credentials" error.

russell5
Harmless
Posts: 1
Joined: Tue Sep 29, 2009 2:32 pm

Re: Prowl notifications for Google Voice

Postby russell5 » Tue Sep 29, 2009 2:35 pm

I just started getting an error with the orginal script this morning.

When i try to use the modified one i don't get an error or any messages either.



For now i am going to have google voice forwarded text messages to email and turn on the new gmail push built in to google sync. Hopefully this works for now.

kjconrad
Muffin
Posts: 30
Joined: Sat Jul 18, 2009 5:41 am

Re: Prowl notifications for Google Voice

Postby kjconrad » Fri Oct 09, 2009 5:27 pm

Is this project pretty much dead now?

tsuehpsyde
Harmless
Posts: 18
Joined: Tue Aug 18, 2009 1:32 am

Re: Prowl notifications for Google Voice

Postby tsuehpsyde » Sat Oct 17, 2009 8:48 pm

I'm busy at work currently, but if Mike doesn't check into it, I may simply fork this and clean things up a bit since he seems busy. :)

cjduckk
Harmless
Posts: 6
Joined: Sat Aug 15, 2009 8:21 pm

Re: Prowl notifications for Google Voice

Postby cjduckk » Mon Oct 19, 2009 2:58 am

tsuehpsyde wrote:I'm busy at work currently, but if Mike doesn't check into it, I may simply fork this and clean things up a bit since he seems busy. :)


I vote for some tidying. From my brief communications with Mike he seems like good people, and I'd hate to see his project pulled out from under him, but open source is open for a reason, and I'm getting kind of annoyed with hearing "Didn't you get my text(s)??" =)

-c.

jimmie
Harmless
Posts: 1
Joined: Mon Oct 19, 2009 5:49 pm

Re: Prowl notifications for Google Voice

Postby jimmie » Mon Oct 19, 2009 6:18 pm

Hey folks,

Needed to solve the 'NoneType' object has no attribute 'html' problem as well. Came up with a solution.

Google's ServiceLoginBoxAuth now requires an additional form field to be submitted in its request. This sort of forces the user-agent to parse the HTML. I don't know why Google would do this, perhaps they wanted to break all the dumb automated scripts out there. Either way, we can always just simulate a real web browser's behavior. That's what this fix does.

ServiceLoginBoxAuth (https://www.google.com/accounts/ServiceLoginBoxAuth) returns something like this:

Code: Select all

<form action="ServiceLoginBoxAuth" method="post">
  <input type="hidden" name="GALX" value="s0M3Ch4rStR" />
  <input type="hidden" name="Email" id="Email" value="example@gmail.com" />
  <input type="password" name="Passwd"  id="Passwd />
  <input type="submit" />
</form>


That GALX field is important. ServiceLoginBoxAuth will reject any form submissions that are missing it. So in Python, we can grab that variable and include it in a subsequent form POST. Fortunately, GALX is also returned as a cookie in HTTP response headers. So we don't actually have to scrape the HTML, unless Google decides to change things again.

Code: Select all

           
            post_data = {
                'Email':   self.username,
                'Passwd':  self.password,
                'service': 'grandcentral',
            }
           
            login = self.do_req('https://www.google.com/accounts/ServiceLoginBoxAuth', urllib.urlencode(post_data)).read()
           
            # Google now requires us to submit back a hidden form element named GALX
            # It is also sent back as a cookie from the original login request
            # This is a quick and dirty way of getting it without parsing the HTML
           
            GALX = None
            for cookie in self.cookies:
                if cookie.name == 'GALX':
                    GALX = cookie
                    break
           
            # Make the same request again, this time with GALX included in the post_data
           
            if GALX:
                post_data['GALX'] = GALX.value
                login = self.do_req('https://www.google.com/accounts/ServiceLoginBoxAuth', urllib.urlencode(post_data)).read()
            else:
                return None
           
            # second step is to pass the cookie check
            cookie_check = self.do_req('https://www.google.com/accounts/CheckCookie?chtml=LoginDoneHtml').read()

            # etc etc...


This script is based on tsuehpsyde's modifications to mikeyk's googlevoicenotify.py v0.1, August 25, 2009. Its only additional requirement is urllib (included in Python) to aid in some housekeeping.

http://dl.getdropbox.com/u/8757/googlevoicenotify.py

Please let me know if I can make the inclusion of these changes any easier for future releases of googlevoicenotify. Also feel free to send me an email if this script gets broken in the future. I'm sure I'll want to know as soon as anybody else, and fix it just as quickly.

hitekalex
Harmless
Posts: 8
Joined: Mon Oct 05, 2009 12:35 am

Re: Prowl notifications for Google Voice

Postby hitekalex » Fri Oct 23, 2009 8:57 pm

With the ability to simply forward Google Voice SMS to your-API@mail2prowl.de e-mail address.. why is this tool even necessary now?

kjconrad
Muffin
Posts: 30
Joined: Sat Jul 18, 2009 5:41 am

Re: Prowl notifications for Google Voice

Postby kjconrad » Fri Oct 23, 2009 11:43 pm

hitekalex wrote:With the ability to simply forward Google Voice SMS to your-API@mail2prowl.de e-mail address.. why is this tool even necessary now?


I'm using one of these services right now, but if I thought I wouldn't have to fool around with this script every few weeks I'd get it working again in a heart beat. I don't need yet another service prying into my text messages and such.

Also I'd like my SMS's to not be cluttering up my e-mail inbox.

ngarjuna
Harmless
Posts: 2
Joined: Tue Oct 27, 2009 3:36 pm

Re: Prowl notifications for Google Voice

Postby ngarjuna » Tue Oct 27, 2009 3:45 pm

Hi, not a veteran of Python or scripting really, but I've followed the instructions here and elsewhere to get this setup and it doesn't seem to be working for me. Really my question is: is there a working version of the script as of today?

The version I started with seems to be deprecated (Mikey's most updated version), but it had a commented out print statement that I was using to see if the script was running; however with that version I was getting the HTML error described on page 4. I installed the more modern fixed version (Jimmie's) and that allowed the script to run without an error message returned but when I dove into the script to enable the print message (to see if it's running) I don't see that in the new script at all. I do see a line debug: print... but whenever I uncomment that line I get a different error message.

So...is this project still working for anybody? I don't mind doing some detective work to try and track down my problem but it would be pretty foolish to do that if the script is known to be bad currently.

Edit: Well, it was a truly newbie error on my part, got two files confused with one another. For anyone else troubleshooting and wondering, this Python setup is working for me. One thing that threw me off a bit in my testing is that the messages aren't showing up in my Growl history on the server. That said, I don't really care about that, I'm pleased to have a working solution for SMS notifications. So my gratitude to everyone involved in the creation and maintenance of this fine setup.

drnez
Harmless
Posts: 1
Joined: Sun Nov 15, 2009 1:32 pm

Re: Prowl notifications for Google Voice

Postby drnez » Sun Nov 15, 2009 1:35 pm

I'm currently working on a (free) service that will handle push notifications for you. It will basically work around the same idea as the mail2prowl.de service, but will not require you to setup your own gmail account. You'll be able to forward the SMS's (and VM's too, if you choose) to a specified address on our system, and it will automatically dispatch a notification through the prowl service.

I hope to have this off the ground within a couple weeks, and will followup in this thread.

If you have any specific idea's that you wish to share, please feel free. The project will be entirely web based, and may support other services in the future.

tsuehpsyde
Harmless
Posts: 18
Joined: Tue Aug 18, 2009 1:32 am

Re: Prowl notifications for Google Voice

Postby tsuehpsyde » Wed Dec 02, 2009 2:35 am

For what it's worth, I haven't really worked on/fiddled with this to get it working in some time ever since GMail Push was available on my phone (get SMS and email alerts in realtime now). My guess off the top is something changed on Google Voice's side.

I could fork this and work on it, but right now, I'm entirely too busy to solo it. However, if some people want to help out, I could help coordinate/confirm fixes and push them into a forked repo as well as fix some stuff myself (mainly consolidate this into one entirely independent program). If a few people will help, I can try to help get this working again.

ngarjuna
Harmless
Posts: 2
Joined: Tue Oct 27, 2009 3:36 pm

Re: Prowl notifications for Google Voice

Postby ngarjuna » Wed Dec 02, 2009 3:15 am

My edit was kind of buried in my post, but this script is working fine for me. It occasionally errors out and has to be restarted (every several days or so), but it's doing exactly what it's supposed to and has simplified my iPhone / Google Voice integration quite a lot. Thanks a bunch for the work you already did. I am aware of Gmail push but the only way I get that is if I give up my work email account, so this script is still very useful.

tsuehpsyde
Harmless
Posts: 18
Joined: Tue Aug 18, 2009 1:32 am

Re: Prowl notifications for Google Voice

Postby tsuehpsyde » Thu Dec 03, 2009 3:21 pm

So you're saying the latest one in the repo works for you? Or the latest one in the repo + some hacks from others in here work? Just curious. :) I tested mine again and it wasn't working, so I assumed it was busted for everyone. FWIW, I'm in the process of re-writing this myself and will post back in here once it's usable.

jemler
Harmless
Posts: 2
Joined: Thu Sep 10, 2009 1:53 pm

Re: Prowl notifications for Google Voice

Postby jemler » Sat Dec 19, 2009 11:21 pm

tsuehpsyde wrote:So you're saying the latest one in the repo works for you? Or the latest one in the repo + some hacks from others in here work? Just curious. :) I tested mine again and it wasn't working, so I assumed it was busted for everyone. FWIW, I'm in the process of re-writing this myself and will post back in here once it's usable.


Any luck tsuehpsyde? Mine also just quits without an error, and i don't really have the time to debug it at the moment. But checking my texts every 5mins isn't a solution either..


Return to “Prowl”

Who is online

Users browsing this forum: No registered users