Announcement: AppDaemon 1.4.0

A few additions including module dependencies:

1.4.0 (2017-01-20)

Features

  • notify() now supports names
  • It is now possible to set a timeout value for underlying calls to the HA EventStream
  • It is no longer neccesary to specify latitude, longitude and timezone in the config file, the info is pulled from HA
  • When being reloaded, Apps are now able to clean up if desired by creating an optional terminate() function.
  • Added support for module dependencies

Fixes

Breaking Changes

  • To include a title when using the notify() call, you must now use the keyword title instead of the optional positional parameter

None

2 Likes

How lovely! Does terminate() also get run if AppDaemon runs into an exception it can’t recover from? (eg. is closed suddenly)

Nope (10 characters)

hmm, nice on the one side, but not nice on the other side.
most of the time when i change something it is because i did something wrong.
and when i do something wrong that leads to an errorstate.

in “normal” apps thats no problem. i edit and the app restarts automaticly “clean”

but in the “new” type of apps that isnt the case.
isnt there a way to clean up everything old at the moment an app starts?
because the end is most of the time not reached while i am developing.

Trust me - this is the easiest way. AppDaemon has no way to understand that the App has created a thread or how to clean it up - we have to do that for AppDaemon.

i trust you, but it doesnt help me.
i still need to restart appdaemon many times when i am developing apps like this.
but at least part of the times that i know needed to restart are gone.

but just thinking:

you have a terminate function to close opened threads. so you know which threads are opened right?
isnt there a way to save that with the name from the app connected to it? like in a record in a small db.

if that is possible then we could check at start from an app if old threads are cleaned up.

Hi Rene,

I am not sure you can actually clean a thread up in an App once that App has been terminated and reloaded - the way I have given you is the only way I know how to make this work. I am happy to be wrong but I don’t have a better idea at the moment, and this method works perfectly for my Apps …

Hi Andrew,
i dont have the time this week anymore. (not for testing either :wink: )
ill come back to it end of next week.

i checked out your changes and its more then i can deal with in a few minutes :wink:

like i said, its an improvement anyway. maybe not as much as had hoped, but even a small improvement is an improvement :wink:
maybe i should learn to doublecheck for typos before trying to execute :wink:

1 Like