PDA

View Full Version : POST Form to PINK



MCL9449
05-05-2006, 10:41 AM
I am trying to write to PINK variable locations using RealBasic HTTP Sockets' POST function and keep getting an "error" 302 (redirect). The location that I get redirected to is the same page I was attempting to POST to. When I attempt to respond to the redirect I get an error code of "0". Through it all, nothing gets written to the variable.

The same technique sent to other web pages works fine, as do the examples in the PINK Manual.

My questions:

1. Are there internets headers that need to be set in a particular way for the PINK module to accept the POST request?
2. Are there other means (using GET for instance) to set a variable over a network?
3. Has there been thought to using UDP to set/read variables?

Thanks,
Mike

Chris Savage
05-05-2006, 11:57 AM
Are you using an SX to interface to the PINK Module?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

MCL9449
05-05-2006, 12:20 PM
No. I'm using a Stamp2.

I am attempting to integrate the PINK into my home monitoring and security system. The system consists of Stamp2s that collect sensor data (doors, windows,temperatures,air condition state, motion detectors, etc), and an old laptop to put the data on the local network as broadcast UDP transmissions. Other computers on the network analyse the data and take the appropriate action (emails, paging, camera activation, etc.)

I'd like to replace the laptop with the PINK module, but I need to be able to use the network to send data back to the Stamps as they also summarize the sensor data and feed it to a conventional burglar alarm system.

I also use a SitePlayer to broadcast the UDP packets for redundency, but again it is only one way.

Mike

Chris Savage
05-05-2006, 11:20 PM
Mike,

I asked because you posted in the SX Forum, which is for SX discussion. This thread is being moved to the BASIC Stamp Forum.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Ryan Clarke
05-05-2006, 11:24 PM
The stamp (or what ever micro) will need to pro-actively poll the PINK for changes. Even UDP messages when received must be checked for by the controller.

Ryan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support

RClarke@Parallax.com (mailto:RClarke@Parallax.com)