# Swan wake up reason

**URL:** <https://discuss.blues.com/t/swan-wake-up-reason/3262>\
**Category:** Notecard API\
**Created:** [August 22, 2025, 2:24am UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262 "2025-08-22T02:24:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![scavoj](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@scavoj](https://discuss.blues.com/u/scavoj)\
**Post date:** [August 22, 2025, 2:24am UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/1 "2025-08-22T02:24:09Z")

</div>

Is there a way to get the reason for Swan wake up? If I am reading command

{“req”: “card.attn”, “start”: true }

correctly, it says that in the “files” response member “will include keywords to signify the occurrence of other attention mode triggers:” env and motion (are the ones I use). I also use “usb”, but that one is not in the list.

I’ve tried to use this but I am not receiving anything in the list. More specifically, the “files” member does not appear in the response.

I am arming with

{“req”: “card.attn”,  
“mode”: “arm,motion,env,usb,sleep”, ”seconds”: 3600\*wake\_up\_hours}

I also use -motion depending on if I have tracking disabled. I also tried adding in “files”: [“motion”, “env”, “usb”], but that didn’t seem right since those are not files.

I’m probably doing something wrong.

Thanks,

Joe

---

<div class="post-metadata">

**Author:** ![abucknall](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/abucknall/32/1335_2.png) [@abucknall](https://discuss.blues.com/u/abucknall)\
**Post date:** [August 23, 2025, 9:01am UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/3 "2025-08-23T09:01:29Z")

</div>

Hi Joe,

You are correctly using {“req”: “card.attn” “start”: true} to retrieve the trigger events.

If you want to use `files` to observe changes to Notes, you’ll need to use it as follows:

Watch specific files:  
`{“req”: “card.attn”, “mode”: “arm”, “files”: [“data.qo”, “settings.db”], “seconds”: 1800}`

Watch all file modifications:  
`{“req”: “card.attn”, “mode”: “arm,files”, “seconds”: 1800}`

Check what files triggered attention:  
`{“req”: “card.attn”, “start”: true}`  
`// Response might include: {“files”: [“data.qo”, “modified”]}`

Where “modified” is the reason.

See what files you’re currently watching:  
`{“req”: “card.attn”, “verify”: true}`  
`// Response might include: {“files”: [“data.qo”, “settings.db”]}`

Have you been able to confirm which modes have been enabled using `verify`? Can I also ask which Notecarrier you are using?

Thanks,

Alex

---

<div class="post-metadata">

**Author:** ![scavoj](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@scavoj](https://discuss.blues.com/u/scavoj)\
**Post date:** [August 23, 2025, 11:39pm UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/4 "2025-08-23T23:39:54Z")

</div>

Alex,

I am using a Notecard-F and have the Feather\_en dip switch set to N\_ATTN. I have not confirmed settings, I guess, because I’m not sure how to set it up. I understand the setup if I was monitoring files. but I just want to get “env” or “motion” according to the docs (if I understand what the docs are stating).

The docs for the card.attn request’s “files” response member states “…In addition _{to files}_, this field will include keywords to signify the occurrence of other attention mode triggers:“, where “env” and “motion” appear in the list. So my question is, how to set it up and look for these keywords?

The full list of keywords in the docs is:

`"connected"`

`"env"`

`"files"`

`"location"`

`"motion"`

`"timeout"`

`"watchdog"`

Thanks,

Joe

---

<div class="post-metadata">

**Author:** ![abucknall](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/abucknall/32/1335_2.png) [@abucknall](https://discuss.blues.com/u/abucknall)\
**Post date:** [August 26, 2025, 11:45am UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/5 "2025-08-26T11:45:45Z")

</div>

Hi Joe,

I doubled-checked as I believe what is mentioned in the documentation isn’t clear enough (I’ve got a ticket open to fix it). You shouldn’t need to specify file monitoring to get the `“env”` and `“motion”` keywords—just `arm` attention for those specific triggers:

Setup:  
`{“req”: “card.attn”, “mode”: “arm,env,motion”, “seconds”: 3600}`

Check what triggered attention:  
`{“req”: “card.attn”, “start”: true}`

Example responses:

- Motion detected: `{“files”: [“motion”]}`
- Environment variable change: `{“files”: [“env”]}`
- Both triggers: `{“files”: [“motion”, “env”]}`
- Timeout (after 3600 seconds with no other events): `{“files”: [“timeout”]}`

The keywords appear in the same files array whether you’re monitoring actual files or not. Then `“start”: true` is used to see why attention fired (this clears the events, so  
it’s a one-time read). You can also add `usb` to your mode string if you want to monitor USB connection changes.

From your initial message, it looks like your first arming request should be successful. You’re not seeing the modes in the response `“files”`property?

Perhaps it might help for you to share exactly which requests you are performing, and I’ll try to replicate them. Can I also ask for how you are attempting to test the wake-up triggers?

Setting the Notecarrier-F `FEATHER_EN` dip switch to `N_ATTN` will remove power to the swan when you `arm` the Notecard with `card.attn`, so the `sleep`mode isn’t necessary unless you want to use the `payload`feature.

I apologise for having to confirm this, `card.attn` quite a complex request!

Thanks,

Alex

---

<div class="post-metadata">

**Author:** ![scavoj](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@scavoj](https://discuss.blues.com/u/scavoj)\
**Post date:** [August 28, 2025, 12:31am UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/6 "2025-08-28T00:31:24Z")

</div>

Alex,

I’m doing the arm (“mode”: “arm,motion,env,usb”), then upon wakeup, I run some setup code to set up the notecard (some settings are based on environment variables), then I try to retrieve what triggered the attention ({“req”: “card.attn”, “start”: true}). And I am not seeing the “files” response member.

The Swan is waking up on all of the triggers just fine. **Edit** : I have the response JSON sent to a Blynk datastream which shows up on the app. The only response members I’m getting is “crc” and “set”: “True”.

You mention that the files response member is a one shot deal. Can any of the following requests alter the {“req”: “card.attn”, “start”: true} results?

Thanks,

Joe

{“req”: “hub.set”,  
“product”: product\_id,  
“version”: VERSION,  
“inbound”: 1,  
“outbound”: 0,  
“mode”: “continuous”,  
“sync”: True,  
“duration”: -1}

{“req”:“card.voltage”,  
“mode”:“lipo”}

{“req”: “card.aux.serial”,  
“mode”: “gps”}

{“req”: “card.location.mode”,  
“mode”: “continuous”}

{“req”: “card.time”}

{“req”: “card.motion.mode”,  
“seconds”: 15,  
“motion”: 1,  
“start”: True}

---

<div class="post-metadata">

**Author:** ![abucknall](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/abucknall/32/1335_2.png) [@abucknall](https://discuss.blues.com/u/abucknall)\
**Post date:** [September 1, 2025, 8:41am UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/7 "2025-09-01T08:41:59Z")

</div>

Hi Joe,

None of those requests should alter the response from `{“req”: “card.attn”, “start”: true}`.

Could you please share the responses you are seeing? Are you using note-arduino?

I think it may be easiest for me to see the code that you are using to handle the wakeup event. If you prefer, you can send this to me via a direct message or share it here, and I’ll take a look.

Thanks,

Alex

---

<div class="post-metadata">

**Author:** ![scavoj](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@scavoj](https://discuss.blues.com/u/scavoj)\
**Post date:** [September 1, 2025, 8:35pm UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/8 "2025-09-01T20:35:04Z")

</div>

Alex,

I’m using CircuitPython and note-python. I’ll have to whittle down the code a bit unless you want to see all 600+ lines of code. I’m working more than one issue and will get back to you as soon as I can.

Thanks,

Joe

---

<div class="post-metadata">

**Author:** ![scavoj](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@scavoj](https://discuss.blues.com/u/scavoj)\
**Post date:** [October 8, 2025, 11:43pm UTC](https://discuss.blues.com/t/swan-wake-up-reason/3262/9 "2025-10-08T23:43:09Z")

</div>

Alex,

I just realized that you asked for code used to handle the wakeup event. With CircuitPython and note-python, the swan wakes up and the code runs from the beginning. The notecard commads listed above is what I issue when the code begins. Then, I issue the request listed in the first post to retrieve the wake up trigger event(s). And the result is always

{‘crc’: ’0008:87CEAA27’,’set’: True}

Thanks,

Joe
