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.