Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astrobinding for openhab 2 is not support all features of the openhab 1 version #310

Closed
Marty56 opened this issue Jul 25, 2015 · 17 comments
Closed

Comments

@Marty56
Copy link

Marty56 commented Jul 25, 2015

in Astrobinding in OPENHAB 1, one could create items like
"DateTime Sunset_minus_30_Time {astro="planet=sun, type=set, property=start, offset=-30"}"
and also for generating an event
"Switch Sunset_Event_minus_30 {astro="planet=sun, type=set, property=start, offset=-30"}"
that could trigger an rule ahead of the Sun Set (in my example).

Please add this feature to the version 2 of the binding.

@kaikreuzer
Copy link
Member

You are right, this has been left our deliberately for now, see #113 (comment)

I'd like to synchronize this with the new modular rule engine, so that such triggers will smoothly fit into it, so please allow some more time for these features to be added.

@dominicdesu
Copy link

Do I understand it correctly that this is not only about the offset, but also about the triggering of the Switch item in general?
I tried to add a Switch item similar as I use it in openHAB1:
Switch SunsetEvent {channel="astro:sun:782f244e:set#start"}
but this results in the following debug message:
[DEBUG] [s.c.internal.items.ItemUpdater] - Received update of a not accepted type (DateTimeType) for item SunsetEvent

@kaikreuzer
Copy link
Member

Correct, see https://community.openhab.org/t/astro-binding-issue/2011/6?u=kai.

@kaikreuzer
Copy link
Member

@gerrieg Since a few weeks, we finally have "event trigger channels" available in ESH - see eclipse-archived/smarthome#1936 and https://www.eclipse.org/smarthome/documentation/development/bindings/thing-definition.html#channels (search for "trigger channel").
I would hope that this provides the functionality that is needed for the astro events. It would be great if you could have a look and check if that works for you - and to provide feedback if anything is still missing from your point of view! (fyi: I guess for the Homematic binding you might also need eclipse-archived/smarthome#2226, which still has to be discussed and implemented, but your feedback on it would also be welcome!).

@gerrieg
Copy link
Contributor

gerrieg commented Nov 2, 2016

Thank you Kai for the information, i will take a look at it.

@micw
Copy link

micw commented Nov 26, 2016

I'd like to test it. At the moment I run homeassistant for my astro stuff (my switches use mqtt, so oh2 and ha can co-exists). I'd like to switch the rules to oh2. Could you please provide an example, how to switch on a light 30 minutes before sun set now?

Edit: optimally the example can be found in https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.astro ;-)

Thank you!

@kaikreuzer
Copy link
Member

@micw How do you want to test something that isn't yet implemented...?

@micw
Copy link

micw commented Nov 29, 2016

Sorry, I missunderstood this. Where can I find an example how to use the new event channel?

@LeDumpier
Copy link

@micw, I too would be interested in learning how to use this functionality. This difficulty is trying to find out if it's available yet, the information is often scattered.

Have you had any luck?

@toby200
Copy link

toby200 commented Dec 16, 2016

@gerrieg is working on it, but these things take time! In the meantime you can workaround it by setting up rules to trigger your own internal switch, or just use the astro 1 binding. See eg. https://community.openhab.org/t/astro-binding-issue/2011/22

@gerrieg
Copy link
Contributor

gerrieg commented Dec 17, 2016

I've already created a PR that contains the triggers, see https://github.com/openhab/openhab2-addons/pull/1519

@kaikreuzer
Copy link
Member

Yep, already on my todo list to test. Hopefully early next week!

@staehler
Copy link

staehler commented Feb 9, 2017

Does astro binding (version for openhab2) switch the events in openhab2 RC1? My installation (RC1) doesn't switch the events, which I recognized today morning :-(. My openhab2 runs since yesterday.

Do I need to downgrade to openhab1 binding?

EDIT: sorry, I finally found this, which I first have to try.
The Trigger has changed:

rule "example trigger rule" when Channel 'astro:sun:home:rise#event' triggered START then ... end

@kaikreuzer
Copy link
Member

Right, this is by now implemented, so I close this issue.

@staehler Why are you using RC1 and not the final release?

@staehler
Copy link

staehler commented Feb 9, 2017

@kaikreuzer I use this repo

deb http://dl.bintray.com/openhab/apt-repo2 testing main

This offers as latest version 2.0.0~RC1-1
Which would you recommend?
Should I use the daily snapshot repo?

@kaikreuzer
Copy link
Member

Better use stable or snapshot, at least until a new beta comes out.

@BClark09 & @theoweiss What is actually the best practice regarding apt repos there? Should the 2.0 release not better be available on testing as well, because otherwise, the version on testing is behind the latest version on stable...?

@theoweiss
Copy link
Member

Sounds reasonable to me. @BClark09 what do you think?

Flole998 pushed a commit to Flole998/openhab-addons that referenced this issue Dec 30, 2021
…ab#310)

Signed-off-by: Tanya D. Georgieva <tanya.dancheva.georgieva@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants