Started to use Ocusim late last year so no it’s the first time I use Ocusim in the summer. And now I inf out that the sequence has some issues. For example my ‘day’ starts when sunrise +15 but in the summer this is before ‘morning’ resulting in the fact that day never starts (and the morning lights stay on…).
Now I could change everything to be relative to sunrise/sunset but the I cannot build in the fixed moments we also have (like getting up in the morning always around the same time and going to bed).
My solution to this has been to use a combination of occusim and light levels.
In my normal operation I have day and evening triggered by specific light levels. When Occusim is active, I leve them in place and use Occusim to emulate human interactions like “morning” (usually triggered by motion first thing) and “night time” (manually triggered when we are tired) - everything else is automated anyway so why change it when on vacation, and make it look different?
Also, in my regular setup, I treat morning as optional. If Day occurs (due to light levels) then that locks out morning, as there is no need for morning lighting if it is already light.
That is a good point but in my house the set morning lights does not work that well. Guess there is no possibility to add day of the week (or weekday vs weekend)? With that option I can solve it also as my main objective (issue) is that I want the lights to stay on longer in the morning in the weekend.
Alternatively I could build an automation outside Appdeamon (I’m just a user of apps, can’t build them) that checks if the lights is till on on a certain time I don’t want that (while I’m on vacattion)
I’m thinking of an OccuSim v2 that would use YAML instead of the current config - I think adding weekday constraints to each step or random would be fairly easy to do as I already have schedule day constraints in AppDaemon.
No promises, but I’ll see about getting around to it!
Problem: I don’t seem to be able to get HA 0.50.1 + appdaemon 2.0.8 +OccuSim 1.1.2 to work (on RPI Hassbian, PIP installs, no Docker). The problem seem to be what format I should use for the config.
Question: how should I configure appdaemon so that I can use occusim? Should I try a full “.cfg” old style config?
Note: hello world app for appdaemon has no problems working.
2017-08-05 23:18:56.007698 INFO /home/homeassistant/.homeassistant/conf/appdaemon.yaml modified
2017-08-05 23:18:56.064277 INFO App 'Occupancy Simulator' changed - reloading
2017-08-05 23:18:56.065049 DEBUG Clearing callbacks for Occupancy Simulator
2017-08-05 23:18:56.065648 INFO Loading Object Occupancy Simulator using class OccuSim from module occusim
2017-08-05 23:18:56.068261 WARNING ------------------------------------------------------------
2017-08-05 23:18:56.068845 WARNING Unexpected error:
2017-08-05 23:18:56.069350 WARNING ------------------------------------------------------------
2017-08-05 23:18:56.074368 WARNING Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/appdaemon/appdaemon.py", line 846, in check_config
new_config[name]["module"], new_config[name]
File "/usr/local/lib/python3.4/dist-packages/appdaemon/appdaemon.py", line 584, in init_object
module = __import__(module_name)
ImportError: No module named 'occusim'
2017-08-05 23:18:56.075151 WARNING ------------------------------------------------------------
So basically, I tried the yaml format for appdaemon in 2 ways. one: DIY, and one converting the sample config file from occusim into the yaml format.
Either way, appdaemon starts without errors, but if I change anything (a single minute in the config), I get that error.
Thanks!
Terry (trying to set some somewhat random lights / on/off to simulate presence: a perfect fir for occusim )
Self-solved. (writing the answer here in case someone else has the same issue).
While trying many things, I changed the config folder location, and basically once I moved the files around, I had the application files in the conf folder instead of conf/apps
Looking at the appdaemon.py file (near the end) showed that it appends “apps” to the config path.
i.e. the bug was between my chair and my keyboard.