Hi,
First up..... thanks for your help so far.
Well I've been trying different things.
I ended up buying a new router with more features. It wasn't just for this, I had a couple of other reasons as well. Anyway the new router allowed me to port forward
to a different port number internally which the old one would not. So I have gone back to internal port of 80.
Reconfigured the app and the arduino and was working again. So back to the prowl problem.
I tried many different settings including using
char prowlServerName[] = "209.20.72.170";
char prowlServerName[] = "http://209.20.72.170";
uint8_t myDns[4] = { 8, 8, 8, 8 };
uint8_t myGateway[4] = { ?, ?, ?, ? }; <= from router status page
MyDoorOpenerServer myDoorOpenerServer(password, mac, ip, myDns, myGateway);
But all those things never got me anything that said "connection established" in the serial monitor
However only when I used
- Code: Select all
char prowlServerName[] = "api.prowlapp.com";
coupled with
- Code: Select all
MyDoorOpenerServer myDoorOpenerServer(password, mac, ip);
Did I get the much more promising messages of
-------------------------------
*** Push - server name: 'api.prowlapp.com' - apiKey: 'Valid Key Removed' - subject: 'MyDoorOpener Notification' - body: 'A door or device has just been opened.' ***
*** Push - connection established ***
*** Push - connection stopped ***
*** Push - completed ***
*** Push - server name: 'api.prowlapp.com' - apiKey: 'Valid key Removed' - subject: 'MyDoorOpener Notification' - body: 'A door or device has been opened for more than 1 minute(s).' ***
*** Push - connection established ***
*** Push - connection stopped ***
*** Push - completed ***
------------------------------------------
This shows its getting to this bit of code which should work.
- Code: Select all
if (pushClient.connect(prowlServerName, prowlServerPort))
{
#if defined(PUSH_SERIAL_DEBUGGING)
Serial.println(F("*** Push - connection established ***"));
#endif
pushClient.print(F("GET "));
pushClient.print(prowlApiBaseUrl);
pushClient.print(F("?apikey="));
pushClient.print(prowlApiKey);
pushClient.print(F("&application=MyDoorOpener"));
pushClient.print(F("&url=mydooropener%3A%2F%2Fstatus"));
char encodedBuffer[100] = "";
pushClient.print(F("&event="));
memset(encodedBuffer, 0, 100);
getUrlEncoded(subject, encodedBuffer);
pushClient.print(encodedBuffer);
pushClient.print(F("&description="));
memset(encodedBuffer, 0, 100);
getUrlEncoded(body, encodedBuffer);
pushClient.print(encodedBuffer);
pushClient.println(F(" HTTP/1.1"));
pushClient.print(F("Host: "));
pushClient.println(prowlServerName);
pushClient.print(F("Accept: *"));
pushClient.print(F("/"));
pushClient.println(F("*"));
pushClient.println(F("Connection: close"));
pushClient.println();
pushClient.stop();
#if defined(PUSH_SERIAL_DEBUGGING)
Serial.println(F("*** Push - connection stopped ***"));
#endif
}
---------------------------------------------------
This problem seems to be the exact same as tiga31328 was having in this post
http://forums.mydooropener.com/viewtopic.php?f=2&t=309&start=40#p836As always.... any help appreciated.
Cheers
PTB