Heaty will die, Schedy be born!


I managed to install it very quickly, since I am not so good I agree that the installation is easy. Good job, and thanks!

Now for the configuration it would help, me and other newbs like me, some examples: like scheduler of a light, a switch, a climate component and also, if possible, how to put some elements of the scheduler in the front end


In general, there’s no frontend. Schedules are written in the config.

Regarding examples, have you worked through the documentation? It really is meant to be read as a book, so start with the concept and make your way through. Especially the Schedules chapter walks you through a simple schedule and has more advanced examples at the end.

EDIT: You can of course create some switches, sliders etc in HA and have your schedules based on them, but that’s something you’ll learn when reading the docs as well.


@roschi thanks for looking into this I get the problem now did not realize this. I will reinstall my docker containers tonight which hopefully resolves the issue.


@taste What are you using exactly? hassio or plain docker?

Maybe docker somehow has mangled the iptables rules and just rebooting the box would help.


@roschi Plain docker on Ubuntu server. Rebooted manu times did not help. Pruning the appdaemon container also had no effect. entering the container showed it could not resolve domain names. Needed to remove hass-apps else the container stopped automatically (this was why I could not enter)
resolv.conf was set to which was equal the hass-supervisor which could resolve.

After lot of Googling this brought the Solution: https://github.com/home-assistant/hassio/issues/497#issuecomment-401496769
It runs again :slight_smile:


This sounds fantastic, indeed a local cache when no connectivity

Please let me know if you need votes or real world examples. I now know what the risks are from experience. Lightning attack which kills your internet also breaks your smart home.


@taste I feel with you. These were my concerns as well. I’ll upload the script for you to test.


@taste Here you go. https://github.com/efficiosoft/hass-apps/tree/wheelstore

At the moment, this is just a workaround, but works fairly well. Read the comments in hass_apps_loader.py to get started.


@roschi I tried it but it does not seem to work in my installation.
If have replaced hass_apps_loader.py in my appdaemon/apps directory and placed wheelstore.py in appdaemon
If I start with internet connectivity I get this warning reported

2019-01-15 20:02:32.217351 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hass_apps_loader.py
env: can't execute 'python': No such file or directory
env: can't execute 'python': No such file or directory

I get the same error as before when starting without internet connectivity. It ends with
FATAL: Failed installing package https://github.com/efficiosoft/hass-apps/archive/master.zip

Any idea?


I think you didn’t invalidate the requirements.txt file.

And download the wheelstore script again.


I did remove requirements.txt completely.

I did and it is different now. I get this error in the log:

2019-01-15 20:33:00.908344 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hass_apps_loader.py
[establish] INFO - Created temporary directory '/tmp/tmpxphd85bg'.
[establish] INFO - Creating wheels ...
[establish] INFO - Removing temporary directory ...
Traceback (most recent call last):
  File "/config/appdaemon/apps/../wheelstore.py", line 192, in <module>
  File "/config/appdaemon/apps/../wheelstore.py", line 187, in main
    result = action.run()
  File "/config/appdaemon/apps/../wheelstore.py", line 45, in wrapper
    result = run(self, *args, **kwargs)
  File "/config/appdaemon/apps/../wheelstore.py", line 60, in wrapper
    return run(self, *args, **kwargs)
  File "/config/appdaemon/apps/../wheelstore.py", line 104, in run
    result = subprocess.call(cmd)
  File "/usr/lib/python3.6/subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pip': 'pip'
[install] ERROR - No record exists for package 'https://github.com/efficiosoft/hass-apps/archive/master.zip'.


Argh, what a environment is this…


Again please…


I am so sorry, downloaded wheelstore again and now get this:

[establish] INFO - Created temporary directory '/tmp/tmpu7iwikbt'.
[establish] INFO - Creating wheels ...
Looking in links: /config/appdaemon/.wheelstore/wheelhouse
Collecting https://github.com/efficiosoft/hass-apps/archive/master.zip
  Downloading https://github.com/efficiosoft/hass-apps/archive/master.zip
Building wheels for collected packages: hass-apps
  Running setup.py bdist_wheel for hass-apps: started
  Running setup.py bdist_wheel for hass-apps: finished with status 'error'
  Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-ipziz3a3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-x0if08z3:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  error: invalid command 'bdist_wheel'
  Failed building wheel for hass-apps
  Running setup.py clean for hass-apps
Failed to build hass-apps
ERROR: Failed to build one or more wheels


That’s not real… Then the wheel package is missing from the docker image you’re using and more work has to be done… will think about it later.


Ok, you’ve to download hass_apps_loader.py again.

EDIT: And wheelstore.py as well, please.


Okay we are getting there. It all start without errors and it looks like it caches the code. I see messages like:
Collecting daemonize (from appdaemon&gt;=3.0-&gt;hass-apps==0.20190105.0) Downloading https://files.pythonhosted.org/packages/45/ad/1b20db02287afd40d3130a218ac5ce2f7d2ab581cfda29bada5e1c4bee17/daemonize-2.5.0-py2.py3-none-any.whl Saved /tmp/tmpybjsfxmb/daemonize-2.5.0-py2.py3-none-any.whl

But should I do something special to use it because if I start without internet connectivity I get the same timeout. (Expected) and this cause the container to terminate. (unexpected)

Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /efficiosoft/hass-apps/archive/master.zip (Caused by NewConnectionError('&lt;pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd1703b2dd8&gt;: Failed to establish a new connection: [Errno -3] Try again',)) FATAL: Failed installing package https://github.com/efficiosoft/hass-apps/archive/master.zip [cont-init.d] 81-python-packages.sh: exited 1. [cont-finish.d] executing container finish scripts.


That’s what I tried to tell you yesterday. You still request to have packages installed by continit, which then makes the container start fail. Currently, two scripts try to install the same package. That seems to be hassio, so remove the "python_packages" from the addon config. requirements.txt has no effect on the hassio image anyway.


he said he is not using hassio but plain docker. :wink:


Also thought so, but he has an image based on continit… and that’s used by the hassio addons only AFAIK.

Anyway, he somehow told continit to install additional python packages, what causes startup to fail.