openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 69 forks source link

[Community] Add Eos Lighting extension #196

Closed CrazyIvan359 closed 4 years ago

CrazyIvan359 commented 4 years ago

Eos

Like the goddess of the dawn, Eos will bring light to your home with intuitive control and custom scenes.

2019-08-04 I have now added a Python script to make editing Eos metadata much easier. There are a few requirements for it to work however, it must be run from automation/lib/python/community/eos/editor which is where it is packaged. You must also insure you have prompt_toolkit==2.0.7, click, pygments, and requests installed as well, and I have tested it on Python 3.7.4 x64 and Python 3.5.3.

2019-08-09 After starting to implement Eos for my own setup I discovered some issues, which have been fixed, but also that the original settings search pattern was inadequate. The search pattern now looks in more locations and in a more logical order. The editor has been completely revamped, after adding the new search pattern it became apparent that it needed a rewrite. Next steps are to include more of my own lights in Eos to make sure it works and needed features are there, and I will be starting to write some documentation as I do this.

2019-08-11 Added motion triggers to scene settings. They don't necessarily have to be used with motion sensors, but for lighting that will be the most common use. Settings for what to consider active, and you can provide a fixed state or a scene to apply when motion is active. I have also pushed various minor improvements and bugfixes for things I've found along the way.

2019-08-17 As I continue to roll Eos out in my openHAB I have made some tweaks and bugfixes, notably I have changed the scene rule to trigger on received command because scene changes would not propagate through groups that already had their scenes set to parent. Documentation is coming soon, I have been working on it slowly all week, but this weekend I will be focusing on it. I hope to have something uploaded before the end of the weekend, even if it's not complete.

2019-08-18 Documentation Day The docs are written and included in the latest commit. I've also made some more minor tweaks and bugfixes over the weekend. As I expect a bit more interest in Eos now, I will be updating the version and change log when I make changes from now on. If you are looking for an html copy of the docs and don't feel like compiling them yourself, I will temporarily have a zip of the HL docs that includes the Eos docs available here.

If you have any suggestions or improvements please let me know!

This is a work in progress, but I now consider it a beta release. If you find any problems please contact me on this thread, do not open an issue for problems with it until it has been merged into the repo.

Things left to do:

The Eos Editor includes software from questionary (https://github.com/tmbo/questionary), under the MIT License. Please see the NOTICE file under Community/Eos Lighting/automation/lib/python/community/eos/editor/.

Signed-off-by: Michael Murton 6764025+CrazyIvan359@users.noreply.github.com

5iver commented 4 years ago

What does EOS stand for?

CrazyIvan359 commented 4 years ago

Eos is the Greek goddess of the dawn ;)

5iver commented 4 years ago

I figured... but I thought I'd seen you use it in all caps, so thought it may be an acronym.

CrazyIvan359 commented 4 years ago

If I used it in all caps it was a typo

tavalin commented 4 years ago

Hi @CrazyIvan359

Could you point me to some documentation as to how to set up the items/config to test this please?

Thanks

CrazyIvan359 commented 4 years ago

@tavalin I am working on the documentation, keep an eye out for upcoming commits.

If you downloaded it already, update your download. I just pushed a commit of some changes I made last night that change the search order for settings.

For the time being check out the configuration.py.example file as a starting point. Every group you want Eos to handle needs to have a scene item, which is just a StringItem with a name matching the prefix/suffix you configured. Groups should all be under the master group, but can be nested as deep as you like. Run the editor in Python 3, it does not work with Python 2, poking around in it will help you see how Eos thinks. If you look at an item with the editor it will highlight what settings will be used for a scene and which may be missing, there is also an option to test a scene by name.

Here is an example of the master group with a scene item and a switched light:

Group eos_master_group
  String eos_master_scene (eos_master_group)
  Switch eos_test_light (eos_master_group)

Feel free to ask me more questions about setup, they will help me fill in gaps in the documentation.

CrazyIvan359 commented 4 years ago

@openhab-5iver @tavalin the documentation is now up!

If you don't feel like compiling them I have a zipped copy in my Google Drive that I will make available temporarily while I finish testing and work to get this PR merged.