HTTPRequest> and Notify My Android

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

HTTPRequest> and Notify My Android

Post by Grovkillen » Wed May 01, 2013 6:26 pm

Hi there,

I'm trying to use NMA to push script results to my Android phone but I have some problem with the GET request:

Code: Select all

HTTPRequest>http://www.notifymyandroid.com/publicapi/verify?apikey=111111111111111111111111111111111111111111111111,,GET,,strHTML
This will give me the return call "strHTML":

Code: Select all

?xml version="1.0" encoding="UTF-8"?><nma><success></nma>
But NMA recommend using HTTPS but when trying to connect using the secure protocol will result in a 404 error. Any idea if this is related to the way MS handle HTTP GET command? Is the HTTPRequest> command not compatable with HTTPS?

If I try the https://www.notifymyandroid.com/publicapi/verify?apikey=111111111111111111111111111111111111111111111111 address in my browser I get a correct answer (not a 404 bad request as with MS using HTTPRequest>).

PS. violet=made up API key!
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Wed May 01, 2013 6:43 pm

If anyone want to play around you POST notifications with the following address:
>http://www.notifymyandroid.com/publicapi/notify?apikey=X&application=Y&event=Z&description=O

More info here>>
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Wed May 01, 2013 7:16 pm

Is this what you're looking for?

Code: Select all

Let>HTTP_SSL=1
HTTPRequest>http://www.notifymyandroid.com/publicapi/notify?apikey=X&application=Y&event=Z&description=O,,GET,,strHTML,,,,
mdl>strHTML


User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed May 01, 2013 9:06 pm

I only have a plain old cell phone on a pay as you go plan. Costs me about $100 a year and even that I find perturbing. But can't you simply use pop3 to email to any cell phone whether its an android a smart phone or even my antique?

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Wed May 01, 2013 9:23 pm

Rain, didn't work... not with HTTPS but with HTTP. Do you mean that if I add:
Let>HTTP_SSL=1
before
HTTPRequest>http://ww.. (note: http with out "s")
it will post it using HTTPS? Doesn't make sense to me...

JRL, yes I could but it's not that sexy. And I think it require more code. I want my users to be able to just add their API key and start receiving notifications. No need for entering POP3 settings etc. etc.

Both, thanks for the input! :)
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 02, 2013 8:28 am

From the help file:
For SSL (https) connections set HTTP_SSL to 1. To use SSL you will first need to install the OpenSSL libraries. See:

http://www.openssl.org/related/binaries.html
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Thu May 02, 2013 12:14 pm

Sorry but I missed that information!? I'm usually good at reading the manual but this one got through. Thanks for pointing it out Marcus.

PS. I would guess that the end user also would need to have OpenSSL installed. Thus using the none secure line is the only way to keep the compiled exe independent?
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu May 02, 2013 12:20 pm

Only two DLLs are needed, so you could simply ship them alongside the exe:
http://www.mjtnet.com/blog/2012/05/18/h ... f-openssl/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Thu May 02, 2013 2:19 pm

Marcus, great news. Thanks for the info!
Let>ME=%Script%

Running: 15.0.27
version history

paulinoe
Newbie
Posts: 1
Joined: Tue Jun 18, 2013 3:02 pm

Post by paulinoe » Wed Jun 19, 2013 3:58 am

Amazing! I just bought my Android phone and it's good to land here, got some ideas.

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Wed Jun 19, 2013 6:07 am

paulinoe, please share any ideas you might have with the forum. I'd be happy to help and give feedback. :D
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Wed Jun 19, 2013 7:18 am

Thanks for the link Grovkillen,

I have NMA and use it for TV show notifications, although its having an issue at the moment none are coming though (even test notifications). However I can see me incorporating this into a script for notification on run / fail etc.
FIREFIGHTER

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Wed Jun 19, 2013 7:21 am

CyberCitizen, that's my main use of this as well (fail/success info)! :)


EDIT: Haven't used this myself but for WindowsPhone Pushalot is a equivalent to NMA:
Homepage>>
Windows Phone Store>>
Let>ME=%Script%

Running: 15.0.27
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts