Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

504 Response Code

Home Forums Mayfly Data Logger 504 Response Code

Viewing 7 reply threads
  • Author
    Posts
    • #15325
      Danielle IWI
      Participant

        I’m working on getting our 14 stations ready for deployment and had two stations give a 504 response code on Arduino and then not appear on envirodiy.org though they are saving data to the SD card:

        \/—- Line Saved to SD Card —-\/

        2021-03-24 13:10:00,424.0,210.5,19.80,4.943,26.00,-9999

        Sending data to [ 0 ] data.envirodiy.org

        POST /api/data-stream/ HTTP/1.1

        Host: data.envirodiy.org

        TOKEN: <<REMOVED>>

        Content-Length: 369

        Content-Type: application/json

         

        {“sampling_feature”:”<<REMOVED>>”,”timestamp”:”2021-03-24T13:10:00-05:00″,”<<REMOVED>>”:424.0,”<<REMOVED>>”:210.5,”<<REMOVED>>”:19.80,”<<REMOVED>>”:4.943,”<<REMOVED>>”:26.00,””:-9999}

         

        — Response Code —

        504

        ——————————————

        ——————————————

         

        \/—- Line Saved to SD Card —-\/

        2021-03-24 13:15:00,1154.3,210.2,19.80,4.867,25.75,90

        ——————————————

        Hologram says that the cards are active.

      • #15327
        Sara Damiano
        Moderator

          Do you see any connections or activity from the SIM cards on Hologram?  Sometimes it takes a really long time to connect to the network with a new SIM card, a new modem, or at a new location.

          Are you sure your tokens and UUIDs are all correct?

        • #15328
          Sara Damiano
          Moderator

            I should add that we haven’t figured out why some connect right away and others don’t.  So even with an apparently identical batch of sims and modems, it wouldn’t surprise me if some connect immediately and others don’t.

            I removed the UUID’s from your post.

          • #15329
            Danielle IWI
            Participant

              Yes, the SIM cards are appearing as active on Hologram.

              We had three staff try it separately, pulling the tokens and UUIDs each time from MMW so I’m assuming their correct.  We could try another time to make sure.

            • #15330
              Sara Damiano
              Moderator

                Hmm.  Does Hologram show any data being transferred?

                Monitor My Watershed is known to sometimes drop or not respond for no apparent reason.  But usually if one station is working all the time and another isn’t it’s either the UUID and tokens or the internet connection.  When you’re looking at MonitorMW, are you seeing anything at all?  The numbers are usually updated near instantly, but the plots are all delayed by up to an hour.  The pages also do not automatically refresh, you have to manually refresh to see anything.

              • #15333
                fisherba
                Participant

                  In addition to what Sara said (she’s the best!) about the UUIDs for the station when I’m doing that many stations at once I easily also miss an occasional apn = “hologram”.

                  If the code all checks out, I second the experience that it’s strange how sometimes it takes way longer for one or two modems to connect, even when things are from the same batch. I often let them run for a lunch time and come back to see if they connected.

                  And if I think it all should be right, I shut it all down and reseat all of the modem and battery connectors (not the coin battery). Then I scrutinize the Hologram data for each card, confirm that it’s the one on the station, etc.

                   

                • #15336
                  Shannon Hicks
                  Moderator

                    I saw this happen with someone recently who was having the same issue with data not showing up online and getting the 504 response code.  Turns out it was a missing UUID in the list of sensor variables in the Arduino sketch.  When there’s a mismatch between the string you send Monitor My Watershed and what it’s expecting, you get the 504 response.  I can’t see the original string that was posted before Sara edited to remove the UUIDs, but it appears that there’s a UUID missing from the string right before the last parameter (which I’m guessing is cell signal percent?)

                    So make sure there are the same number of parameters in the sketch as what the website is expecting, and that the sketch code in the two sections that deal with the UUIDs and parameters are matched up properly.

                  • #15337
                    Sara Damiano
                    Moderator

                      Doh, yes, Shannon’s right!  I didn’t look closely enough before I deleted it, but there probably is a missing UUID!

                      Looking back, I replaced all the UUID’s with <<REMOVED>> for you because you probably don’t want those to be public.  I can’t see or revert it to the original, but looking at it, your last measurement has just "":-9999} so it looks like I didn’t replace the UUID there, there wasn’t one.

                       

                  Viewing 7 reply threads
                  • You must be logged in to reply to this topic.