-
Notifications
You must be signed in to change notification settings - Fork 782
Feature Request: Check result (state UPDATE) of a COMMAND sent to an item #5309
Comments
There are several issues with your proposal:
The best solution to nonetheless provide some feedback about successful execution of commands is what has been started in #5011 - I'd suggest to follow up on that. |
My proposal already addresses most of the issue you list - and I think they all can be solved.
|
Most of your use cases sound like candidates for rules (e.g. through rule templates), but not like a feature that should be built into a new binding (as bindings are really meant to integrate with external devices / data sources). |
Yes, rules would be possible, but you need to spend a lot of time for repeating yourself. And if you change some items, you also need to change your rules. Please also remember that you need to register a rule for each item you want to monitor, as you cannot get the source of a rule trigger if you registered a Group. In my proposal I mentioned the "expire"-binding. The feature it offers could also be implemented by rules, but the binding makes the configuration much, much easier. |
Correct, the (1.x) Expire Binding is the worst example of what a binding should do and it better wouldn't exist at all... |
It may be a "bad example" from a pure architectural point of view, but it is also very useful, so many people use it. There is the analogy that "a dirt track is always a sign for mistakes in urban planning" That said, I don't think that the feature must be implemented as binding and if there is a better way to do it (as rule), it must be easily configurable for the user. No one want's to write the same rules over and over again for each item. So there should be a way inside the UI to
At the moment I don't see the infrastructure for this in ESH (nor openHAB), so is there any on the roadmap? |
In my opinion (based on professional experience), one of the core features of any automation system is to to readback and check the result of any action it does.
Speaking in ESH terms: For a command sent to an item there is usually (at least) one expected reaction in form of a state UPDATE.
I already searched for some easy implementation in Openhab, (see https://community.openhab.org/t/best-practice-to-check-state-as-result-of-command-jython/39756), but it seems there is no easy way.
I think such a feature could be realized as binding (the expire binding does something similar).
I don't have experience with writing bindings (and don't have the time to start getting experience), but I can help with specification and testing.
Some first ideas:
Sending a command should result in a corresponding state. This shall be checked by the binding.
--> here it starts to get very useful, because you will be able to monitor physical behaviour).
Error notification:
An error state should be send in another item (Switch or Text?)Update 2018-03-26: An action shall be triggered if a fault occurs.Timing: The time how long it takes to get a readback differs, so it should be configurable
Based on this, an item configuration for a "monitor"-binding may look like this:
The text was updated successfully, but these errors were encountered: