# Card.voltage for power out

**URL:** <https://discuss.blues.com/t/card-voltage-for-power-out/1227>\
**Category:** Uncategorized\
**Created:** [February 2, 2023, 5:59pm UTC](https://discuss.blues.com/t/card-voltage-for-power-out/1227 "2023-02-02T17:59:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rksteeves](https://avatars.discourse-cdn.com/v4/letter/r/c77e96/32.png) [@rksteeves](https://discuss.blues.com/u/rksteeves)\
**Post date:** [February 2, 2023, 5:59pm UTC](https://discuss.blues.com/t/card-voltage-for-power-out/1227/1 "2023-02-02T17:59:30Z")

</div>

I am looking at implementing a power outage detection using card.voltage. I understand that if the following command is sent  
{  
“req”: “card.voltage”,  
“usb”: true,  
“alert”: true,  
“sync”: true  
}  
an event would write to \_health.qo when the power goes out. I cannot seem to find what the message would look like for the power out, or when the power comes back on. Is this documented somehwere?

Finally, if there is a message for when the power comes back on, would this message be generated when the notecard first boots up on initial power on, as I am assuming one the above command is sent, it would remain in memory.

randy

---

<div class="post-metadata">

**Author:** ![tjvantoll](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/tjvantoll/32/231_2.png) [@tjvantoll](https://discuss.blues.com/u/tjvantoll)\
**Post date:** [February 2, 2023, 7:50pm UTC](https://discuss.blues.com/t/card-voltage-for-power-out/1227/2 "2023-02-02T19:50:19Z")

</div>

Hey @rksteeves,

> an event would write to \_health.qo when the power goes out. I cannot seem to find what the message would look like for the power out, or when the power comes back on. Is this documented somehwere?

I just tried this out on one of my Notecards and you can see the messages in the screenshot below —see `{usb-disabled}` and `{usb-enabled}`.

 ![Screenshot 2023-02-02 at 2.39.15 PM](https://us1.discourse-cdn.com/flex020/uploads/blues/original/1X/9d79521d41982e5f5896579e9f03fc240952c04a.png)

> Finally, if there is a message for when the power comes back on, would this message be generated when the notecard first boots up on initial power on, as I am assuming one the above command is sent, it would remain in memory.

The Notecard will only be able to send the messages if it has power. I’d recommend adding a LiPo battery so the Notecard has backup power to send the appropriate Notes when you lose and regain power. This article has a pretty good writeup if you haven’t seen it yet: [Cellular-Enabled Power Outage Detector w/ SMS Notifications - Hackster.io](https://www.hackster.io/rob-lauer/cellular-enabled-power-outage-detector-w-sms-notifications-181408).

TJ

---

<div class="post-metadata">

**Author:** ![rksteeves](https://avatars.discourse-cdn.com/v4/letter/r/c77e96/32.png) [@rksteeves](https://discuss.blues.com/u/rksteeves)\
**Post date:** [February 2, 2023, 8:30pm UTC](https://discuss.blues.com/t/card-voltage-for-power-out/1227/3 "2023-02-02T20:30:43Z")

</div>

Thanks, I read the article you reference, the difference is that there is now a reference to the card.voltage in the article, which seems to be a nice solution, but I was not sure what the resulting health.qo would look like.

---

<div class="post-metadata">

**Author:** ![abari](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@abari](https://discuss.blues.com/u/abari)\
**Post date:** [February 3, 2023, 5:31pm UTC](https://discuss.blues.com/t/card-voltage-for-power-out/1227/4 "2023-02-03T17:31:31Z")

</div>

When the notecard comes back online after a power outage the \_health.qo message is

`{"text":"boot (brown-out & hard reset [4015681])"}`
