Hub restart - behaviour of drivers/devices


Is there any info regarding the behaviour of drivers/devices in the event of a hub reboot?

I have some code in a spawned coroutine, but I ‘think’ on restart it needs to respawn…Lots of ways to fix, just wondering if there is any ‘Hub has been restarted, need to respawn stuff’ event or flag is set

1 Like

Tagging @andresg

On restart all your drivers will go thru their init routines again. Do any work there.


Hi, @Davec

The driver_lifecycle can be used for that purpose. The second argument is the string name of the event and you can set it to"shutdown"

Hi, @Davec

Here is the documentation about driver_lifecycle

1 Like

Ok Thanks I will give it a try

1 Like

So when a hub is rebooted the shutdown event isn’t called (I don’t think)

@csstup suggestion to use init seems good.