[SOLVED] Need help with AppDaemon 3.0 Error

Here is the error from the log file:

2018-03-24 09:14:52.550533 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:53.664838 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:53.665423 WARNING AppDaemon: Unexpected error:
2018-03-24 09:14:53.665806 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:53.666453 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1654, in check_config
for file in latest[“deleted”]:
KeyError: ‘deleted’

Any idea how to resolve this one?

Thanks!

at what point does that error show up?
what do you have installed? (hassio, hassbian, ubuntu, …)
what python version?
do you have running apps or dashboards?

please i little more info, so we have a clue.

1 Like

I’ll answer the best I can.

As soon as I issue the sudo systemctl start [email protected] I see those errors in the log, it never gets past them.

I have been updating the AIO, been using hass since around 0.3 and keep updating it, on a raspberry pi 3.

I did the move from python 3.4 to 3.6 virtual environment roughly 4 months ago, no issues during that time.

I do not have any dashboards, but do have several simple apps. But I don’t think it is getting to the point of loading them yet.

I hope this helps.

so you never had appdaemon 3.0 working correct?
what is in your appdaemon.yaml and please can you show your logfiles from the startpoint.

1 Like

Correct, this is the first attempt at the updrade from 2.xx to 3.0.

Here is the appdaemon.yaml

log:
  errorfile: /home/pi/appdaemon/appdaemonerr.log
  logfile: /home/pi/appdaemon/appdaemon.log
appdaemon:
  app_dir: /home/pi/appdaemon/conf/apps/
  threads: '10'
  plugins:
    HASS:
      type: hass
      ha_key: xxxxxxx
      ha_url: xxxxxx
HADashboard: {}

All that appears in the error log file. The normal log file is blank. I always clear them between updates.

2018-03-24 09:14:47.921861 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:48.000598 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:48.003174 WARNING AppDaemon: Unexpected error:
2018-03-24 09:14:48.003639 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:48.004388 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1654, in check_config
for file in latest[“deleted”]:
KeyError: ‘deleted’

2018-03-24 09:14:48.004761 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:49.147183 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:49.147755 WARNING AppDaemon: Unexpected error:
2018-03-24 09:14:49.148100 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:49.148864 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1654, in check_config
for file in latest[“deleted”]:
KeyError: ‘deleted’

2018-03-24 09:14:49.149408 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:50.284809 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:50.285416 WARNING AppDaemon: Unexpected error:
2018-03-24 09:14:50.285862 WARNING AppDaemon: ------------------------------------------------------------
2018-03-24 09:14:50.286668 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1654, in check_config
for file in latest[“deleted”]:
KeyError: ‘deleted’

It just keeps repeating.

dashboard is now without capitals.
but if you dont use it i would leave it out.

1 Like

and did you change your apps?
and replaced the apps.yaml to your apps directory?

1 Like

Here is an example of a converted app for 3.0:

import appdaemon.plugins.hass.hassapi as hass
import datetime

class WelcomeHome(hass.Hass):
  def initialize(self):
    self.input_id = ""
    self.entity_id = ""
    self.alarm_id = ""
    self.handle = None

# Listeners
if "input_id" in self.args:
  self.listen_state(self.input_callback, self.args["input_id"])
  self.input_id = str(self.get_state(self.args["input_id"]))
  #self.log("Initing input_id: {}".format(self.input_id))
else:
  self.log("Input_id not detected.")

if "alarm_id" in self.args:
  self.listen_state(self.update_alarm, self.args["alarm_id"])
  self.alarm_id = str(self.get_state(self.args["alarm_id"]))
  #self.log("Initing alarm_id: {}".format(self.alarm_id))
else:
  self.log("Alarm_id not detected.")

if "entity_id" in self.args:
  self.listen_state(self.update_entity, self.args["entity_id"])
  self.entity_id = str(self.get_state(self.args["entity_id"]))
  #self.log("Initing entity_id: {}".format(self.entity_id))
else:
  self.log("Entity_id not detected.")

  def update_alarm(self, entity, attribute, old, new, kwargs):
    self.alarm_id = str(new)
    
  def update_entity(self, entity, attribute, old, new, kwargs):
    self.entity_id = str(new)

  def input_callback(self, entity, attribute, old, new, kwargs):
    self.input_id = str(new)
    if new == "on" and old == "off" and self.alarm_id == "armed away":
      self.turn_on(self.args["entity_id"])
    elif new == "on" and old == "off" and self.now_is_between("14:30:00", "22:00:00"):
      self.turn_on(self.args["entity_id"])

@ReneTode THANK YOU! I missed the part in the instruction about moving the apps.yaml to the apps directory.

That fixed it!!!

1 Like