Asset Tracker v2 - How to monitor the On/Off state of the sliding switches: sw1 and sw2 reported every minute from the nRF9160DK device to a topic of the AWS IoT Core?

I have built and run the application: Asset Tracker v2 using Segger IDE with nRF Connect SDK 1.8.0 , and my nRF9160DK device communicates with the  AWS IoT Core topics.

I can see the battery voltage data (with its time stamp) reported every minute from my nRF9160DK device to the shadow topics of the AWS IoT Core and I can also see the button-pressed data reported (when a button is pressed) from my nRF9160DK device to the AWS IoT Core topic: <IMEI>/messages.

As a next step, I would like to see the On/Off state of the sliding switches: sw1 and sw2 reported every minute from my nRF9160DK device to a topic on the AWS IoT Core.

How can this be done? 

Parents
  • Hi, 

    In addition to the info that I sent to DevZone a few minutes ago, I attach a section of the log file: "LTE Link Monitor log 2022-01-27" - that I sent already to DevZone a few minutes ago - that shows in line 14 the following: "aws_iot: Incoming MQTT message too large for payload buffer [0m".   This may indicate the nature of the problem reported by me to DevZone a few minutes ago.

    How can this problem be resolved?

    Regards,

    JM

    2022-01-27T08:06:57.819Z DEBUG modem << %CESQ: 72,3,30,4
    2022-01-27T08:07:02.091Z DEBUG modem << [00:00:27.877,136] [0m<inf> event_manager: CLOUD_EVT_CONNECTED[0m
    2022-01-27T08:07:02.165Z DEBUG modem << [00:00:27.883,789] [0m<inf> event_manager: DATA_EVT_DATE_TIME_OBTAINED[0m
    2022-01-27T08:07:02.172Z DEBUG modem << [00:00:27.891,082] [0m<inf> event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, NEIGHBOR_CELLS, GNSS, MOD_STAT)[0m
    2022-01-27T08:07:02.177Z DEBUG modem << [00:00:27.908,905] [0m<inf> event_manager: GPS_EVT_ACTIVE[0m
    2022-01-27T08:07:02.180Z DEBUG modem << [00:00:27.915,466] [0m<inf> event_manager: GPS_EVT_AGPS_NEEDED[0m
    2022-01-27T08:07:02.184Z DEBUG modem << [00:00:27.922,546] [0m<inf> event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED[0m
    2022-01-27T08:07:02.229Z DEBUG modem << [00:00:28.010,864] [0m<inf> event_manager: DATA_EVT_AGPS_REQUEST_DATA_SEND[0m
    2022-01-27T08:07:02.275Z DEBUG modem << [00:00:28.019,683] [0m<inf> event_manager: MODEM_EVT_MODEM_STATIC_DATA_READY[0m
    2022-01-27T08:07:02.322Z DEBUG modem << [00:00:28.027,893] [0m<inf> event_manager: CLOUD_EVT_DATA_ACK[0m
    2022-01-27T08:07:02.329Z DEBUG modem << [00:00:28.073,486] [0m<inf> event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY[0m
    2022-01-27T08:07:02.334Z DEBUG modem << [00:00:28.120,697] [0m<inf> event_manager: MODEM_EVT_BATTERY_DATA_READY[0m
    2022-01-27T08:07:02.342Z DEBUG modem << [00:00:28.129,974] [0m<inf> event_manager: MODEM_EVT_NEIGHBOR_CELLS_DATA_READY[0m
    2022-01-27T08:07:04.140Z DEBUG modem << [00:00:29.923,370] [1;31m<err> aws_iot: Incoming MQTT message too large for payload buffer[0m
    2022-01-27T08:07:04.149Z DEBUG modem << [00:00:29.931,823] [1;31m<err> aws_iot: publish_get_payload, error: -122[0m
    2022-01-27T08:07:04.213Z DEBUG modem << [00:00:29.938,873] [1;31m<err> aws_iot: Cloud MQTT input error: -16[0m
    2022-01-27T08:07:04.217Z DEBUG modem << [00:00:29.945,312] [1;31m<err> aws_iot: Cloud MQTT input error: -16[0m
    2022-01-27T08:07:04.278Z DEBUG modem << [00:00:29.951,843] [1;31m<err> aws_iot: Cloud MQTT input error: -16[0m
    

Reply
  • Hi, 

    In addition to the info that I sent to DevZone a few minutes ago, I attach a section of the log file: "LTE Link Monitor log 2022-01-27" - that I sent already to DevZone a few minutes ago - that shows in line 14 the following: "aws_iot: Incoming MQTT message too large for payload buffer [0m".   This may indicate the nature of the problem reported by me to DevZone a few minutes ago.

    How can this problem be resolved?

    Regards,

    JM

    2022-01-27T08:06:57.819Z DEBUG modem << %CESQ: 72,3,30,4
    2022-01-27T08:07:02.091Z DEBUG modem << [00:00:27.877,136] [0m<inf> event_manager: CLOUD_EVT_CONNECTED[0m
    2022-01-27T08:07:02.165Z DEBUG modem << [00:00:27.883,789] [0m<inf> event_manager: DATA_EVT_DATE_TIME_OBTAINED[0m
    2022-01-27T08:07:02.172Z DEBUG modem << [00:00:27.891,082] [0m<inf> event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, NEIGHBOR_CELLS, GNSS, MOD_STAT)[0m
    2022-01-27T08:07:02.177Z DEBUG modem << [00:00:27.908,905] [0m<inf> event_manager: GPS_EVT_ACTIVE[0m
    2022-01-27T08:07:02.180Z DEBUG modem << [00:00:27.915,466] [0m<inf> event_manager: GPS_EVT_AGPS_NEEDED[0m
    2022-01-27T08:07:02.184Z DEBUG modem << [00:00:27.922,546] [0m<inf> event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED[0m
    2022-01-27T08:07:02.229Z DEBUG modem << [00:00:28.010,864] [0m<inf> event_manager: DATA_EVT_AGPS_REQUEST_DATA_SEND[0m
    2022-01-27T08:07:02.275Z DEBUG modem << [00:00:28.019,683] [0m<inf> event_manager: MODEM_EVT_MODEM_STATIC_DATA_READY[0m
    2022-01-27T08:07:02.322Z DEBUG modem << [00:00:28.027,893] [0m<inf> event_manager: CLOUD_EVT_DATA_ACK[0m
    2022-01-27T08:07:02.329Z DEBUG modem << [00:00:28.073,486] [0m<inf> event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY[0m
    2022-01-27T08:07:02.334Z DEBUG modem << [00:00:28.120,697] [0m<inf> event_manager: MODEM_EVT_BATTERY_DATA_READY[0m
    2022-01-27T08:07:02.342Z DEBUG modem << [00:00:28.129,974] [0m<inf> event_manager: MODEM_EVT_NEIGHBOR_CELLS_DATA_READY[0m
    2022-01-27T08:07:04.140Z DEBUG modem << [00:00:29.923,370] [1;31m<err> aws_iot: Incoming MQTT message too large for payload buffer[0m
    2022-01-27T08:07:04.149Z DEBUG modem << [00:00:29.931,823] [1;31m<err> aws_iot: publish_get_payload, error: -122[0m
    2022-01-27T08:07:04.213Z DEBUG modem << [00:00:29.938,873] [1;31m<err> aws_iot: Cloud MQTT input error: -16[0m
    2022-01-27T08:07:04.217Z DEBUG modem << [00:00:29.945,312] [1;31m<err> aws_iot: Cloud MQTT input error: -16[0m
    2022-01-27T08:07:04.278Z DEBUG modem << [00:00:29.951,843] [1;31m<err> aws_iot: Cloud MQTT input error: -16[0m
    

Children
No Data
Related