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: Using Xbee Cellular Modem with ThingSpeak

Home Forums Mayfly Data Logger Using Xbee Cellular Modem with ThingSpeak Reply To: Using Xbee Cellular Modem with ThingSpeak

Zeke Holloman

    Hi there @neilh20. Thanks for your response, sorry I couldn’t get to it until now. I spent some time on the code, and I tried the code with the 0.28.5 version of the EnviroDIY ModularSensors library just to see if anything changed. It still isn’t uploading to ThingSpeak though. I tried the 0.30.0 version of the ModularSensors library, alongside the StreamDebugger as well, here’s the output of the code (excluding the ThingSpeak data). It doesn’t look that much different.


    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.

    Try the new cross-platform PowerShell https://aka.ms/pscore6

    PS C:\Users\waked\OneDrive – East Carolina University\Documents\PlatformIO\Projects\LearnEnviroDIYcode-master> pio device monitor –port COM10 –baud 115200
    — Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
    — More details at http://bit.ly/pio-monitor-filters
    — Miniterm on COM10 115200,8,N,1 —
    — Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
    Now running logging_to_thingspeak5.ino on Logger logger

    Using ModularSensors Library version TinyGSM Library version 0.11.4
    Current RTC time is: 2021-08-02T12:16:53-05:00
    CTDcond has a non-unique UUID!
    CTDtemp has a non-unique UUID!
    CTDdepth has a non-unique UUID!
    Battery has a non-unique UUID!
    12345678-abcd-1234-ef00-1234567890ab -> CTDcond
    12345678-abcd-1234-ef00-1234567890ab -> CTDtemp
    12345678-abcd-1234-ef00-1234567890ab -> CTDdepth
    12345678-abcd-1234-ef00-1234567890ab -> Battery
    12345678-abcd-1234-ef00-1234567890ab -> decibelMiliWatt

    This logger has a variable array with 5 variables, of which 4 come from 2 sensors and 1 are calculated.


    Setting up sensors…
    Attempting to connect to the internet and synchronize RTC with NIST
    This may take up to two minutes!

    Clock already within 5 seconds of time.
    Putting modem to sleep
    Setting up file on SD card
    Data will be saved as logger_2021-08-02.csv
    Putting processor to sleep

    \/—- Line Saved to SD Card —-\/
    2021-08-02 12:20:00,0.0,22.40,-3.2,4.897,-81


    Sending data to [ 0 ] mqtt.thingspeak.com
    MQTT connection failed with state: -4: MQTT_CONNECTION_TIMEOUT



    \/—- Line Saved to SD Card —-\/
    2021-08-02 12:21:00,0.0,22.40,-2.7,4.897,0

    Sending data to [ 0 ] mqtt.thingspeak.com
    MQTT connection failed with state: -4: MQTT_CONNECTION_TIMEOUT


    Additionally, here’s the updated version of the code with the StreamDebugger stuff.

    That’s very strange that the code worked with the Digi Wifi module. Any other suggestions are greatly appreciated! And if you see anything that I did wrong with the code, please let me know! I’m still rather new to this.