# Device lifecycle

**URL:** <https://community.homey.app/t/device-lifecycle/61153>\
**Category:** Developers\
**Created:** [February 28, 2022, 10:23am UTC](https://community.homey.app/t/device-lifecycle/61153 "2022-02-28T10:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aybert](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Aybert](https://community.homey.app/u/Aybert)\
**Post date:** [February 28, 2022, 10:23am UTC](https://community.homey.app/t/device-lifecycle/61153/1 "2022-02-28T10:23:52Z")

</div>

Hi there  
is there somewhere a detailed documentation of a device lifecycle ? which method is called when ?  
to me, unless I miss something, the official Homey documentation mentions properly what happens when a device is paired (onInit, onAdded method are triggered) but I do not see what happens when a device gets unavailable for instance, what happens when the homey system resarts (e.g. when a firmware update is deployed), etc…  
I read something in the SDK reference with methods like “onDiscoveryXXX” but honestly I do not understand how they work  
thank you for your help
