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

Reply To: Newbie Mayfly Setup for RS485 sensor to internet

Home Forums Mayfly Data Logger Newbie Mayfly Setup for RS485 sensor to internet Reply To: Newbie Mayfly Setup for RS485 sensor to internet

#12597
neilh20
Participant

    Ok thanks – great eye – I caught a couple of spaces when I pasted it in, but the last GUID was later
    Now I am posting and getting 201 back.

    So a question -if I’m going to submit updates – should I be working of the master branch or the develop branch?
    currently I have library from May 24th update of
    https://github.com/EnviroDIY/ModularSensors/blob/master/examples/logging_to_EnviroDIY/platformio.ini
    lib_deps =
    EnviroDIY_ModularSensors@>=0.12.2

    ………………
    Clock interrupt!
    Current Unix Timestamp: 1539171120
    Logging interval in seconds: 300
    Mod of Logging Interval: 120
    Number of Readings so far: 0
    Mod of 120: 0
    Time marked at (unix): 1539171120
    year: 2018
    month: 10
    date: 10
    hour: 11
    minute: 32
    second: 0
    Time marked at [char]: 2018-10-10T11:32:00-08:00
    Time to log!
    Local:RS485on–
    Turning modem on.
    nhTurning modem on by setting pin 23 to 0.
    Modem now on.
    Powering sensors…
    Skipping modem in sensor power up!
    Waking sensors…
    Updating sensor values…

    Waiting up to 5 seconds for modem to respond to AT commands…
    [12578] < 1 >
    [12582] ### AT:
    [12584] < 1 >
    [12593] ### AT: CN
    [12595] < 1 >
    [12814] < 1 >
    [12822] ### AT: AI
    [12830] ### AT: CN
    [12832] < 1 >
    No prior internet connection, attempting to make a connection.
    Waiting up to 5 seconds for modem to respond to AT commands…
    [13060] < 1 >
    [13064] ### AT:
    [13066] < 1 >
    [13074] ### AT: CN
    [13076] < 1 >

    Waiting up to 5 seconds for WiFi network…
    [13297] < 1 >
    [13303] ### AT: AI
    [13314] ### AT: CN
    [13316] < 1 >
    Sending credentials…
    [13535] < 1 >
    [13543] ### AT: EE 2
    [13547] < 1 >
    ……
    [13604] ### AT: WR
    [13635] < 1 >
    [13643] ### AT: AC
    [13647] < 1 >
    [13654] ### AT: CN
    [13658] < 1 >
    [13877] < 1 >
    [13883] ### AT: AI
    [13891] ### AT: CN
    ……
    [18872] < 1 >
    [18878] ### AT: AI
    [18888] ### AT: CN
    [18890] < 1 >
    … Connection failed
    Connecting to NIST daytime server to check connection strength…
    Connecting to 129.6.15.30…[19116] < 1 >
    [19124] ### AT: IP 1
    [19128] < 1 >
    [19146] ### AT: DL 129.6.15.30
    [19150] < 1 >
    [19159] ### AT: DE 25
    [19163] < 1 >
    [19169] ### AT: WR
    [19202] < 1 >
    [19208] ### AT: AC
    [19212] < 1 >
    [19218] ### AT: CN
    [19222] < 1 >
    …Success!
    Getting signal quality:
    [19550] < 1 >
    [19556] ### AT: LM
    [19566] ### AT: CN
    [19568] < 1 >
    RSSI: 162
    Percent signal strength: 0
    Get Values:
    Pressure_mbar:3.18
    Temp_C: 17.18
    Height_m:0.03
    Get Values:
    Pressure_mbar:3.17
    Temp_C: 17.16
    Height_m:0.03
    Get Values:
    Pressure_mbar:3.17
    Temp_C: 17.16
    Height_m:0.03
    Putting sensors back to sleep…
    Cutting sensor power…
    Skipping modem in sensor power down!
    Local:RS485off–
    Connecting to the Internet…

    Waiting up to 5 seconds for modem to respond to AT commands…
    [24643] < 1 >
    [24647] ### AT:
    [24649] < 1 >
    [24657] ### AT: CN
    [24659] < 1 >

    Waiting up to 50 seconds for WiFi network…
    [24879] < 1 >
    [24887] ### AT: AI
    [24895] ### AT: CN
    [24897] < 1 >
    … Connected with saved WiFi settings!
    Connecting to data.envirodiy.org…[25120] < 1 >
    [25145] ### AT: LA data.envirodiy.org
    [25288] ### AT: IP 1
    [25290] < 1 >
    [25313] ### AT: DL 129.123.41.212
    [25317] < 1 >
    [25325] ### AT: DE 50
    [25329] < 1 >
    [25335] ### AT: WR
    [25368] < 1 >
    [25374] ### AT: AC
    [25378] < 1 >
    [25387] ### AT: CN
    [25389] < 1 >
    …Success!

    \/—- Post Request to EnviroDIY —-\/
    POST /api/data-stream/ HTTP/1.1
    Host: data.envirodiy.org
    TOKEN: 7b19191b-b3d6-416d-9e07-4fbe549f2493
    Content-Length: 334
    Content-Type: application/json

    {“sampling_feature”: “b918f150-4fff-424d-813a-a69a808a93b6”, “timestamp”: “2018-10-10T11:32:00-08:00”, “3907922a-56fe-46f3-a56e-9de6b77d3679”: 21.25, “f40a9dff-2c54-43ae-a016-1c5095c188eb”: 0.0324, “7bc30855-ae08-4865-ab89-a8e17df93bfc”: 17.16, “2c58e64d-6b66-4d9e-b893-bfdb10b65426”: 3.972, “0cf94fc8-a5d2-4fbe-82f2-2a81650575a8”: 0}

    [26597] < 1 >
    [26605] ### AT: TM0
    [26609] < 1 >
    [26615] ### AT: WR
    [26648] < 1 >
    [26654] ### AT: AC
    [26658] < 1 >
    [26664] ### AT: CN
    [26669] < 1 >
    [26888] < 1 >
    [26896] ### AT: TM64
    [26900] < 1 >
    [26906] ### AT: WR
    [26939] < 1 >
    [26945] ### AT: AC
    [26949] < 1 >
    [26955] ### AT: CN
    [26959] < 1 >
    Closed TCP/IP.
    — Response Code —
    201
    Running a daily clock sync…
    Disconnecting from the Internet…
    Turning modem off.
    Turning modem off by setting pin 23 to 1.
    Modem now off.
    Successfully connected to SD Card with card/slave select on pin 12
    Opened existing file: nh06d_2018-10-10.csv

    \/—- Line Saved to SD Card —-\/
    2018-10-10 11:32:00,21.25,0.0324,17.16,3.972,0

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