Closed jpmens closed 8 years ago
Done.
Whoops, I overlooked what you actually asked for. I made homie.quit() sending an $online = false
.
Why would we need a distinction of offline states? Wouldn't one need to take action anyway?
I did not mean distinction; I simply meant if the Python program stops, it (so the "device") is by definition offline, isn't it? So whether the program is killed and the broker sends the LWT or the program is terminated cleanly, the result is "$offline false".
Sorry: $online false
To cut a long story short, your commit does exactly what I think it should do.
Be it with or without
Homie.quit()
, I thinkhomie-python
should publish a retained$offline false
when it exits to indicate that the "device" actually is offline, irrespective of whether it crashed (i.e. in which case LWT would fire).What do you think?