Shop OBEX P1 Docs P2 Docs Learn Events
POST Form to PINK — Parallax Forums

POST Form to PINK

MCL9449MCL9449 Posts: 6
edited 2006-05-05 15:24 in BASIC Stamp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-05 03:57
    Are you using an SX to interface to the PINK Module?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • MCL9449MCL9449 Posts: 6
    edited 2006-05-05 04:20
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-05 15:20
    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
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-05-05 15:24
    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
Sign In or Register to comment.