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

neilh20

Forum Replies Created

Viewing 10 posts - 181 through 190 (of 371 total)
  • Author
    Posts
  • in reply to: Using Xbee Cellular Modem with ThingSpeak #15771
    neilh20
    Participant

      @zeke-holloman do you want to send me the thingspeak details on my email neilh20@wLLw.net and I’ll try them in my setting.  I have a historical thingspeak account which has exceeded its free quota, so I can’t create more devices.

      The hologram account should work with the Xbee LTE ( I have an XB3-CA2-UT-001) if setup, and I started with hologram.  If it works for getting time, should work for any other connection.  If you post the trace can see if its getting good response .

      @vogelrnws  gosh sounds interesting, especially as you are logging the readings. I couldn’t see the python files – could you provide a link.

       

      in reply to: Using Xbee Cellular Modem with ThingSpeak #15767
      neilh20
      Participant

        https://thingspeak.com/channels/5940 shows a data point at Aug 02 2021 15:17 GMT-0700  Yeah!!

        in reply to: Using Xbee Cellular Modem with ThingSpeak #15766
        neilh20
        Participant

          @zeke-holloman,  I figured out that the other day I hadn’t changed the apn to the source I was using.

          So with your code, my apn and thingspeak API, using tera-term 4.105 with TimeStamp and the following changes I got a good response from  thingspeak

          #include <ModularSensors.h> //pre 0.30.0 was <LoggerBase.h></div>

          The core thingspeak looks like this

          I have a lot more debug, and better scale-ability built into my fork https://github.com/neilh10/ModularSensors but the above worked for me.

          in reply to: Using Xbee Cellular Modem with ThingSpeak #15765
          neilh20
          Participant

            Hello @rick-vogel – sounds fascinating & fun to use python in the Xbee.  Though for ModularSensors there are layers of software that allow the physical modem to be abstracted so it could be possible to use another LTE when it becomes available (0.30.0 seems to have hooks for a new LTE modem SIM7080G) – through TinyGSM. As a Class package that @srgdamiano has put together its quite comprehensive – though as with all abstractions it has upsides and downsides.   I think this is working through what it takes to figure out the control flow, which would be needed whatever route is taken. In my fork (with some LTE interface changes) it has worked.


            @zeke-holloman
            , I’d got pulled off onto something else, now I’ve added the STREAMDEBUGGER_DBG to your “Logging_to_Thingskeak5.ino”and removed my extra code that I had and about to test it – but I have to get another dataplan going to test it – I use https://dataplans.digikey.com/ that has a 50Mbytes/month plans,

            in reply to: Using Xbee Cellular Modem with ThingSpeak #15762
            neilh20
            Participant

              hello @zeke-holloman. Just looking through it, and yes thats my assumption at the moment is that its the cellular side that is not connecting.
              There are 2 parts 1) getting internet & time 2) thingspeak.
              1) If the cell phone connects for NIST time, then it can connect with the internet, and the cell modem account setting is good.

              2) if thingspeak then doesn’t connect its something to do with the account ino.

              I’m just looking at your posted new file

              The STREAMDEBUGGER_DBG is a bit strange, it should really be this

              The log you posted with some basic cell phone interface is looking very minimal. Possibly also compile it with

              -DMS_DATAPUBLISHERBASE_DEBUG
              -DMS_THINGSPEAKPUBLISHER_DEBUG

              -DSTREAMDEBUGGER_DBG

              .
              I was thinking of creating a branch off envirodiy (master) – and seeing if it can be referenced for an update to the cell phone interface so it can show more detail. Gotta try it out.

              in reply to: Using Xbee Cellular Modem with ThingSpeak #15757
              neilh20
              Participant

                @zeke-holloman – I have no idea why my previous post came out so badly, and it won’t allow me to edit it!!. My usual way of recovering strange posts.

                It should be interesting to see what you get with your cell modem.

                Using your sketch, which references the latest ModularSensors

                Using ModularSensors Library version 0.30.0
                TinyGSM Library version 0.11.4

                My cell modem which is running on Verizon wouldn’t connect.  The modem issues are  technical and I believe understood, and have been discussed.

                This specific modem has been working no problem in my fork  which has modifications for managing the startup of the cell modem and works for the cell company I’ve been using …. my fork currently is at ModularSensors 0.28.5

                I did try compiling your program in my fork, but there is some changes in 0.30.0 that aren’t backward compatible, so I need to upgrade before I can try this.

                Still with your software, referncing MS 0.30.0  I switched the modem to Digi WiFi  S6B, which I use a lot in testing,  and it worked no problem.

                Once connected to an TCP/IP link – whether over cell or wifi – the passage of data is the same, though Modem AT cmds may be a little different.

                So this is what I get

                in reply to: Using Xbee Cellular Modem with ThingSpeak #15756
                neilh20
                Participant

                  @zeke-holloman   interesting, seems like it should work.

                  When I have strange issues, I delete the .pio/…   and force it to  do a refresh with all the remote libs.  I see you are using the DecagonCTD which recently changed to hydros21, but seems like it should work.

                  I’ve taken your platformio.ini and program  and adding my thingspeak keys, and will try running. I have a test system  with Digi LTE I’m in the process of switching so I can try your setup

                  In the meantime

                  platformio.ini to

                  build_flags =    -DSTREAMDEBUGGER_DBG   #usually add at end of list

                  lib_deps =
                  https://github.com/vshymanskyy/StreamDebugger  ;Debug when needed

                  logging_to_thinkgspeak :  look for DigiXBeeCellularTransparent  and make changes

                  // Create the modem object
                  <span style=”color: #ff0000;”>#if defined STREAMDEBUGGER_DBG</span>
                  <span style=”color: #ff0000;”>#include <StreamDebugger.h></span>
                  <span style=”color: #ff0000;”>StreamDebugger modemDebugger(modemSerial, STANDARD_SERIAL_OUTPUT);</span>
                  <span style=”color: #ff0000;”>#define modemSerHw modemDebugger</span>
                  <span style=”color: #ff0000;”>#else</span>
                  <span style=”color: #ff0000;”>#define modemSerHw modemSerial</span>
                  <span style=”color: #ff0000;”>#endif  // STREAMDEBUGGER_DBG</span>
                  DigiXBeeCellularTransparent modemXBCT(&<span style=”color: #ff0000;”>modemSerHw</span>, modemVccPin, modemStatusPin,
                  useCTSforStatus, modemResetPin,
                  modemSleepRqPin, apn);

                  in reply to: Using Xbee Cellular Modem with ThingSpeak #15754
                  neilh20
                  Participant

                    @zeke-holloman  a correction on my part, when I looked through the thingspeak API, both the historical and the MQTT method use the POST to deliver it to thingspeak, however they have a slightly different API.

                    Initially when looking at your posting I assumed you had removed the keys as it was public, however looking at your your trace it is saying that it doesn’t have the keys in it.

                    Your response is
                    Topic [ 41 ]: channels/thingSpeakChannelID/publish/thingSpeakChannelKey

                    and it should look something like

                    Topic [ 38 ]: channels/5940/publish/DHCKWX0HZQLXGIAX <–ThingSpeakPublisher

                    Please confirm that your run has the API keys in.

                    If that doesn’t work, can you post your platformio.ini

                    I’m committed to something for the next couple of hours but I can add describe the STREAMDEBUG setup after looking at your platformio.ini

                     

                     

                    in reply to: Using Xbee Cellular Modem with ThingSpeak #15742
                    neilh20
                    Participant

                      Hi @zeke-holloman – looks like the ThingSpeak keys and channel need to be added.

                      Add them to (the following are examples)
                      const char* thingSpeakMQTTKey =
                      “Z0G6QX4IXEHKG0PK”; // Your MQTT API Key from Account > MyProfile.
                      const char* thingSpeakChannelID =
                      “5940”; // The numeric channel id for your channel eg
                      const char* thingSpeakChannelKey =
                      “DHCKWX0HZQLXGIAX”; // The Write API Key for your channel

                      Your response is
                      Topic [ 41 ]: channels/thingSpeakChannelID/publish/thingSpeakChannelKey

                      and it should look something like

                      Topic [ 38 ]: channels/5940/publish/DHCKWX0HZQLXGIAX <–ThingSpeakPublisher

                      Followed by this
                      Dumping the TX Buffer <–dataPublisherBase
                      Message [ 129 ]: created_at=2021-07-28T19:04:00-08:00&field1=1&field2=2000.000&field3=-0.223&field4=4.1748&field5=4.215&field6=22.20&field7=0.0088 <–ThingSpeakPublisher
                      Opening MQTT Connection <–ThingSpeakPublisher
                      MQTT connected after 874 ms <–ThingSpeakPublisher
                      ThingSpeak topic published! Current state: 0: MQTT_CONNECTED
                      Disconnecting from MQTT <–ThingSpeakPublisher
                      Disconnected after 418 ms <–ThingSpeakPublisher

                      in reply to: Using Xbee Cellular Modem with ThingSpeak #15740
                      neilh20
                      Participant

                        I’ll have to get about streamdebugger as heading out the office, back in 2hrs

                        For debug you should see the following in platformIO.ini – add it to the end. It will force a complete recompile

                        <!–more–>
                        [env:mayfly]
                        monitor_speed = 115200
                        board = mayfly
                        platform = atmelavr
                        framework = arduino
                        lib_ldf_mode = deep+
                        lib_ignore =
                        RTCZero

                        build_flags =
                        -DSDI12_EXTERNAL_PCINT
                        -DNEOSWSERIAL_EXTERNAL_PCINT
                        -DMQTT_MAX_PACKET_SIZE=240
                        -DTINY_GSM_RX_BUFFER=64
                        -DTINY_GSM_YIELD_MS=2
                        -DMS_DATAPUBLISHERBASE_DEBUG
                        -DMS_THINGSPEAKPUBLISHER_DEBUG

                      Viewing 10 posts - 181 through 190 (of 371 total)