Heaty will die, Schedy be born!

Two small typos:

ontop should be on top

aggree should be agree

Cheers

1 Like

@nickrout Thanks, fixed them.

Cool, I didn’t think it worthy of a PR.

Any plans to make it a component (to be used by those less technical users)?

Is there an easy way to put everything locally? I already tried with master.zip but it tries to pull other components of the internet. It would be nice to have that as a backup because no it also does not work if your internet connection is down. No internet=no heating :open_mouth:

@taste Well, that depends on the way you deploy it. You have hassio, right? The way they let you install additional packages doesn’t survive a container recreation. I already opened an issue about this for the appdaemon addon, but no need was seen. I must admit that it’s not too simple to change this behaviour the way they implemented it…

You can create an offline backup copy, although the process isn’t straightforward. Maybe I’ll write some script that generates an offline copy.

@Klagio That isn’t possible, because it uses AppDaemon and doesn’t hook into Home Assistant directly. But I think the installation methods described in the docs aren’t too complicated. What can be a bit demanding is the configuration, but that would also be if it was a native component.

@taste Such functionality should be contained in the docker image framework used by the hassio addons.

I now wrote a script which establishes a local store of wheels (the format python packages are shipped in) and, when upgrading fails (e.g. due to network outage), installs from the previously fetched store.

It still needs some cleaning and - of course - will need to be integrated into the addons framework, which I don’t know will happen or not.

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 127.0.0.11 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>
    main()
  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…