prowl help

General support questions and discussions.

Re: prowl help

Postby Fred57 » Sat Mar 08, 2014 3:06 am

Thanks for staying with me on this.

Firstly, I have three controllers that communicate with my iPhone App perfectly and reliably.

Secondly, If I enable either of the notifications you mention on the controller I am trying this on I get continual output and did get three instances of a push notification, all with the same time stamp. I think this is putting too much overhead on the controller because whilst outputting notifications I can not access it with the iPhone at all, either over wifi or 3G. Eventuall each session with the phone times out.

see attached log output.
*** MyDoorOpener setup completed ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - sending notification ***
*** Push - server name: 'api.prowlapp.com' - apiKey: '*****************************************************' - subject: 'MyDoorOpener Notification' - body: 'A door or device has just been opened.' ***
*** Push - connection established ***
*** Push - connection stopped ***
*** Push - completed ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***
*** isOpen - status value for pin: '2' is '0' returing: 'Closed' ***
*** isOpen - status value for pin: '3' is '1' returing: 'Opened' ***
*** open notification handler - detected an opened device/door @ pin #3 ***
*** open notification handler - NOT sending notification ***

In fact this output would continue for as long as I leave the serial session open so to stop it I had to in fact flashed the previous code version without notifications uncommented.

The way I read the notifications functions is that they should "fire" only when the state changes but I am getting a constant repaeted output it seems. This output does to start within the push instruction but the controller only has enough time to actually push three signals out before it closes however the controller continues to output the status. Am I right and hoe can I restrict the push outputs to 1 per state change?

Thanks you.
Fred57
 
Posts: 19
Joined: Sun Nov 24, 2013 11:31 pm

Re: prowl help

Postby support » Sat Mar 08, 2014 9:55 am

There is built-in logic in the code to prevent a single status change to fire multiple notifications ... The way this logic is built is that
it will make sure status goes from open to closed prior to re-firing another open notification. Actually, that's what the log you uploaded
shows ... It reports the transition and only fires the notification the first time and mutes subsequent ones. I don't see what problem you
are trying to describe ... Your logs seem perfectly OK.

Indeed, having serial debugging turned ON may overwhelm the Arduino and you might not be able to have it work properly while that's
turned ON. You might want to reduce logging to troubleshoot any issue you think you're having ...

If you're getting multiple fires for a same transition, you might have a "shaky" status sensor that went CLOSE->OPEN->CLOSE->OPEN quickly
before stabilizing to OPEN. If such is the case (your logs don't seem to be showing that though), indeed two or more notifications could get
fired for what your eye thinks is a single event, but which indeed was perceived as multiple transitions by the built-in logic.

After troubleshooting, if you have this consistently, you could tweak this logic to make it more tolerant and wait/ignore the first inputs
prior to firing ... But this would be the first time we hear about someone having to do this. I'd first look at your status sensing device to
make sure it's not "shaky" and that it doesn't "wobble" in what it reports ...
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: prowl help

Postby Fred57 » Mon Mar 10, 2014 5:11 am

Well, we got there. At least all the comms are happening but it seems that the "push" performance through my 3G ISP leaves alot to be desired. I am getting single push notifications per event at best anywhere between 30 minutes and 3 hours after the event and at worst not at all. I get better results through local wifi and therefore my VDSL provider than I do via my 3G provider which when looking on the net is not so unusual. This is not your issue I know but if anyone else out there is having similar issues with Vodafone NZ it might be helpfull for us to compare notes.

Thanks.
Fred57
 
Posts: 19
Joined: Sun Nov 24, 2013 11:31 pm

Re: prowl help

Postby support » Mon Mar 10, 2014 9:44 am

We get our 3G with Fido (Rogers) in Canada and we also get better results with our WiFi network, but it's
hardly noticeable. We get 3G push notifications within 5 seconds ... Over WiFi (Videotron Cable), it's more
like 0-1 seconds ...
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: prowl help

Postby Fred57 » Thu Mar 13, 2014 6:03 am

So, saying , I'd got there has not turned out to be the case. I get notifications of opening events but they can be hours after the fact. I have noticed though that with all debugging switched of the simple action of opening the serial monitor in the Arduino application causes a push notification of an opening event within seconds when my phone is on the local wifi network. I can replicate this as often as I choose but once my phone moves into the 3G sphere any push notications are either very delayed or never make it. What could I be reading into this? I have played with different DNS servers and have opted for the primary server as advised by my ISP as being the best but the results are no different to using 8.8.8.8. I have a VDSL connection that is tagged to the physical landline so no user name or password is required to connect to the internet. There must be something I am missing. I have IP cameras that run on Linux and are acessible from my phone or remote pc and I have not needed to configure anything more than a local IP and some port forwarding and as I have previously indicated I have configured ethernet. begin with mac, ip, dns and gateway values in my micro controller.
Any further thoughts before I give this idea away?

Thanks
Fred57
 
Posts: 19
Joined: Sun Nov 24, 2013 11:31 pm

Re: prowl help

Postby support » Mon Mar 24, 2014 7:20 pm

First off, sorry for the delay in getting back ...

Maybe you want to produce a small Arduino sketch that simply connects to your SMTP and sends out an email (or push notification). See
if that works, in a very stripped down and lightweight manner to better isolate the problem. If you replicate the issue with such stripped
down sketch, it might be easier to troubleshoot the issue and/or get support from the community.

What you are experiencing is indeed very strange. It could also be related to faulty hardware. That's why, isolating things and having a
reduced sketch will better help isolate the issue at hand.

Keep us posted.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: prowl help

Postby Fred57 » Thu Mar 27, 2014 3:46 am

Thanks for your reply once more.

I had another go at this and realised something else. With notifications active and push set up, every time I reset or re start the controller I get push notification immediately but I get no notifications when either of the devises controlled are opened (or closed.)

With push notifications debug active I see:
*** Push - server name: 'api.prowlapp.com' - apiKey: 'abc....' - subject: 'Garage Door OPEN Notification' - body: 'Garage Door Has been Opened!.' ***
*** Push - connection established ***
*** Push - connection stopped ***
*** Push - completed ***

but only each time the controller is reset either after the sketch I'm using is uploaded after some modification or I power the thing down and up again. In fact the door has not been opened or closed to cause this notification. This is the case each time. Does this tell you anything?
Fred57
 
Posts: 19
Joined: Sun Nov 24, 2013 11:31 pm

Re: prowl help

Postby support » Sat Mar 29, 2014 8:09 am

Sounds like you have something that isn't properly connected or you have some faulty hardware. Make sure
you have everything connected properly. Once that is confirmed OK, you might want to try out a simpler
and easier to troubleshoot sketch to isolate what the issue is.

What you're experiencing shouldn't happen.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: prowl help

Postby Fred57 » Sat Mar 29, 2014 6:12 pm

I ran the same sketch on a different Arduino board with direct I/O arrangement, not DF Robot relay board, and got exactly the same outcome so I guess the hardware is ok.

I then tried uncommenting the Mydooropener serial debugging and the sketch wouldn't compile, pointing to an error in the <Time.h> file.

Errors reported are:
MyDoorOpenerHome:36: error: variable or field 'output' declared void
MyDoorOpenerHome:36: error: 'WebServer' was not declared in this scope
MyDoorOpenerHome:36: error: 'server' was not declared in this scope
MyDoorOpenerHome:36: error: expected primary-expression before 'char'
MyDoorOpenerHome:36: error: expected primary-expression before 'bool'
MyDoorOpenerHome:37: error: variable or field 'output' declared void
MyDoorOpenerHome:37: error: 'WebServer' was not declared in this scope
MyDoorOpenerHome:37: error: 'server' was not declared in this scope
MyDoorOpenerHome:37: error: expected primary-expression before 'int'
MyDoorOpenerHome:37: error: expected primary-expression before 'bool'
MyDoorOpenerHome:28: error: 'define' does not name a type
In file included from MyDoorOpenerHome.ino:35:
C:\Program Files\Arduino\libraries\SPI/SPI.h:53: error: 'SPIClass' does not name a type
C:\Program Files\Arduino\libraries\SPI/SPI.h:55: error: 'SPIClass' has not been declared
C:\Program Files\Arduino\libraries\SPI/SPI.h:62: error: 'SPIClass' has not been declared
C:\Program Files\Arduino\libraries\SPI/SPI.h:66: error: 'SPIClass' has not been declared

I've looked at the SPI.h but sorry to say I don't know what I'm looking for but I'm hoping some assistance here might help with my issue.

Thanks,
Fred57
 
Posts: 19
Joined: Sun Nov 24, 2013 11:31 pm

Re: prowl help

Postby support » Sun Mar 30, 2014 10:05 am

We have all debugging turned ON (see below), and all compiles fine for us.

Code: Select all
// Uncomment to turn ON serial debugging

#define MYDOOROPENER_SERIAL_DEBUGGING 1
#define WEBDUINO_SERIAL_DEBUGGING 1
#define NOTIFICATIONS_SERIAL_DEBUGGING 1
#define SMTP_SERIAL_DEBUGGING 1
#define PUSH_SERIAL_DEBUGGING 1

#include <Arduino.h>
#include <SPI.h>
#include <Time.h>
#include <Ethernet.h>
#include <WebServer.h>
#include <aes256.h>

//*******************************************************************
// Global configuration (adjust to reflect your setup)
//*******************************************************************
...


Did you change anything in the .INO file that could have caused the compiler errors?
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

PreviousNext

Return to Support



cron