Announcement: AppDaemon 1.5.0

A fairly big update here - the biggest change is a switch to using WebSockets instead of EventStream for consuming HA events. The chjange should be transparent, and AppDaemon will fall back to EventStream if you have an older version of HA. Also, I cleaned up the code and updated the examples.

ā€“

1.5.0 (2017-01-21)

Features

  • Swap from EventStream to Websockets (Requires Home Assistant 0.34 or later). For earlier versions of HA, AppDaemon will fallback to EventStream.
  • Restored less verbose messages on HA restart, but verbose messages can be enabled by setting -D DEBUG when starting AppDaemon
  • From the command line ctrl-c now results in a clean shutdown.
  • Home Assistant config e.g. Latitude, Longitude are now available in Apps in the self.ha_config dictionary.
  • Logging can now take placeholder strings for line number, function and module which will be appropriately expanded in the actual message
  • Add example apps: battery, grandfather, sensor_notification, sound
  • Updates to various example apps

Fixes

  • get_app() will now return None if the app is not found rather than throwing an exception.

Breaking Changes

  • get_app() will now return None if the app is not found rather than throwing an exception.

None

4 Likes

I upgraded to 1.5 this morning, and now all my self.log statements result in an error

2017-01-30 11:57:38.138404 WARNING Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/appdaemon/appdaemon.py", line 730, in readApp
    init_object(name, class_name, module_name, config[name])
  File "/srv/homeassistant/lib/python3.4/site-packages/appdaemon/appdaemon.py", line 516, in init_object
    conf.objects[name]["object"].initialize()
  File "/home/homeassistant/.homeassistant/apps/hello.py", line 12, in initialize
    self.log("Hello from AppDaemon")
  File "/srv/homeassistant/lib/python3.4/site-packages/appdaemon/appapi.py", line 57, in log
    msg = self._sub_stack(msg)
  File "/srv/homeassistant/lib/python3.4/site-packages/appdaemon/appapi.py", line 40, in _sub_stack
    msg = msg.replace("__module__", stack[2].filename)
AttributeError: 'tuple' object has no attribute 'filename'

Any idea what is wrong?

Fixed in 1.5.1 just about to go live.

That fixed it. Thanks.

1 Like