OccuSim: AppDaemon just notifies but does not switch lights


#1

Hi,
what am I missing? It just sends notifications but no lights are switched.

Jan 16 15:23:44 homeassistant hass[14759]: INFO:homeassistant.components.http:Serving /api/services/notify/notify to 127.0.0.1 (auth: True)
Jan 16 15:23:44 homeassistant hass[14759]: INFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=notify, service_call_id=1977702928-33, service=notify, service_data=message=Executing step Evening Fitnessroom_off_1>
Jan 16 15:23:44 homeassistant hass[14759]: INFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=notify, service_call_id=1977702928-34, service=pushover_1, service_data=message=Executing step Evening Fitnessroom_off_1>
Jan 16 15:23:44 homeassistant hass[14759]: INFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=notify, service_call_id=1977702928-35, service=pushover_2 service_data=message=Executing step Evening Fitnessroom_off_1>
Jan 16 15:23:44 homeassistant hass[14759]: INFO:homeassistant.core:Bus:Handling <Event service_executed[L]: service_call_id=1977702928-33>
Jan 16 15:23:44 homeassistant hass[14759]: INFO:homeassistant.core:Bus:Handling <Event service_executed[L]: service_call_id=1977702928-34>
Jan 16 15:23:45 homeassistant hass[14759]: INFO:homeassistant.core:Bus:Handling <Event service_executed[L]: service_call_id=1977702928-35>

Config

[Occupancy Simulator]
module = occusim
class = OccuSim

log = 1
notify = 1
enable = input_boolean.vacation,on
test = 0
dump_times = 1
reset_time = 02:00:00

step_morning_name = Morning
step_morning_days = mon,tue,wed,thu,fri,sat,sun
step_morning_start = sunrise - 01:00:00
step_morning_end = sunrise
step_morning_on_1 = event.MODE_CHANGE,mode

step_day_name = Day
step_day_start = sunrise + 00:45:00
step_day_on_1 = event.MODE_CHANGE,mode

step_evening_name = Evening
step_evening_start = sunset - 00:45:00
step_evening_on_1 = event.MODE_CHANGE,mode

step_night_name = Night
step_night_start = 21:30:00 
step_night_end = 23:30:00
step_night_on_1 = event.MODE_CHANGE,mode

step_upstairs_name = Upstairs activity
step_upstairs_relative = Evening
step_upstairs_start_offset = 00:00:10
step_upstairs_on_1 = light.gastezimmer
step_upstairs_on_2 = light.fitnessraum
step_upstairs_on_3 = light.schlafzimmer

step_downstairs_name = Downstairs activity
step_downstairs_relative = Evening
step_downstairs_start_offset = 00:00:10
step_downstairs_on_1 = scene.downstairs_only

step_bedtime_name = Bedtime
step_bedtime_start = 21:30:00 
step_bedtime_end = 22:30:00
step_bedtime_on_1 = light.schlafzimmer

step_downstairs_off_name = Downstairs Off
step_downstairs_off_relative = Bedtime
step_downstairs_off_start_offset = 00:00:05
step_downstairs_off_off_1 = light.dimmer_livingroom_level_3_0

random_office_name = Evening Office
random_office_start = Evening
random_office_end = Night
random_office_minduration = 00:03:00
random_office_maxduration = 00:30:00
random_office_number = 5
random_office_on_1 = light.studio
random_office_off_1 = light.studio

random_fitness_name = Evening Fitnessroom
random_fitness_start = Evening
random_fitness_end = Night
random_fitness_minduration = 00:03:00
random_fitness_maxduration = 00:30:00
random_fitness_number = 5
random_fitness_on_1 = light.fitnessraum
random_fitness_off_1 = light.fitnessraum

#2

anything in your appdaemon logs?


#3

Just this:

Jan 16 07:08:07 homeassistant appdaemon[12297]: 2017-01-16 08:08:07.595611 INFO Got initial state
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.600040 INFO Reloading Module: /home/pi/src/appdaemon/conf/apps/occusim.py
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.605643 INFO Loading Object Occupancy Simulator using class OccuSim from module occusim
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.617491 INFO Reloading Module: /home/pi/src/appdaemon/conf/apps/hello.py
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.627862 INFO Waiting for App initialization: 1 remaining
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.699465 INFO Occupancy Simulator: Morning in the past - ignoring
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.701546 INFO Occupancy Simulator: Day: @ 2017-01-16 08:48:53
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.703402 INFO Occupancy Simulator: Evening: @ 2017-01-16 16:00:48
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.705202 INFO Occupancy Simulator: Upstairs activity: @ 2017-01-16 16:00:58
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.707206 INFO Occupancy Simulator: Downstairs activity: @ 2017-01-16 16:00:58
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.709441 INFO Occupancy Simulator: Evening Fitnessroom_on_1: @ 2017-01-16 16:22:54
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.711526 INFO Occupancy Simulator: Evening Fitnessroom_off_1: @ 2017-01-16 16:23:44
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.713589 INFO Occupancy Simulator: Evening Fitnessroom_on_0: @ 2017-01-16 17:26:43
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.715639 INFO Occupancy Simulator: Evening Fitnessroom_off_0: @ 2017-01-16 17:51:47
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.717686 INFO Occupancy Simulator: Evening Office_on_2: @ 2017-01-16 18:05:07
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.719778 INFO Occupancy Simulator: Evening Office_on_4: @ 2017-01-16 18:17:35
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.721740 INFO Occupancy Simulator: Evening Office_off_2: @ 2017-01-16 18:17:37
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.723799 INFO Occupancy Simulator: Evening Fitnessroom_on_2: @ 2017-01-16 18:26:28
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.725840 INFO Occupancy Simulator: Evening Fitnessroom_off_2: @ 2017-01-16 18:30:26
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.727899 INFO Occupancy Simulator: Evening Office_off_4: @ 2017-01-16 18:40:11
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.730127 INFO Occupancy Simulator: Evening Office_on_3: @ 2017-01-16 18:42:59
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.732098 INFO Occupancy Simulator: Evening Office_off_3: @ 2017-01-16 18:46:09
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.734095 INFO Occupancy Simulator: Evening Fitnessroom_on_4: @ 2017-01-16 19:36:25
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.736059 INFO Occupancy Simulator: Evening Office_on_1: @ 2017-01-16 19:44:40
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.738023 INFO Occupancy Simulator: Evening Fitnessroom_off_4: @ 2017-01-16 19:51:57
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.740132 INFO Occupancy Simulator: Evening Office_off_1: @ 2017-01-16 20:10:44
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.742079 INFO Occupancy Simulator: Evening Fitnessroom_on_3: @ 2017-01-16 21:36:47
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.743928 INFO Occupancy Simulator: Bedtime: @ 2017-01-16 21:50:39
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.745869 INFO Occupancy Simulator: Downstairs Off: @ 2017-01-16 21:50:44
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.747851 INFO Occupancy Simulator: Evening Office_on_0: @ 2017-01-16 22:03:00
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.750097 INFO Occupancy Simulator: Evening Fitnessroom_off_3: @ 2017-01-16 22:03:01
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.752036 INFO Occupancy Simulator: Evening Office_off_0: @ 2017-01-16 22:23:46
Jan 16 07:08:09 homeassistant appdaemon[12297]: 2017-01-16 08:08:09.753865 INFO Occupancy Simulator: Night: @ 2017-01-16 23:07:47
Jan 16 07:08:10 homeassistant appdaemon[12297]: 2017-01-16 08:08:10.629207 INFO App initialization complete

Will try to investigate further tonight.


#4

Still no idea why this does not work. I also changed the steps to use scenes instead of switching the lights directly. It just sends out the notifications but does not switch anything.
I am using HA 0.36.1 on a RPi3 with Homebridge. Appdaemon is also running on the same RPi3.


#5

Found it out. You have to comment out the “test” variable instead of setting it to 0. Then it works.

Filed an issue :wink: