-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[satel] Action for reading the event log added #7282
Conversation
Travis tests were successfulHey @druciak, |
eventIdx = eventRec.get("prev_index") | ||
] | ||
logInfo("EventLog", "End") | ||
getActions("mail","mail:smtp:local").sendMail("[email protected]", "Event log", msgBody) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note seomwhere that this requires the mail binding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just an example. The purpose of the action is to read single record from the event log. It does not specify what one should do with the result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I was just thinking that someone installs satel
, adds this example and runs into an error. Maybe a comment in the line above this one like sending notifications via mail requires the mail binding
or something like that would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
/** | ||
* Represents single record of the event log. | ||
* | ||
* @author kgoworek |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a real name here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
...ing.satel/src/main/java/org/openhab/binding/satel/internal/handler/SatelEventLogHandler.java
Show resolved
Hide resolved
Travis tests were successfulHey @druciak, |
@@ -55,6 +55,8 @@ Example: | |||
Bridge satel:ethm-1:home [ host="192.168.0.2", refresh=1000, userCode="1234", encryptionKey="abcdefgh" ] | |||
``` | |||
|
|||
**NOTE:** There can be only one client connected to ETHM-1 module. It does not accept new connections if there is already a connection established. In case you have troubles connecting to the system using this module, please make sure there is no other client (for example installed 1.x version of the binding) already connected to it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a new line for each sentence. They are concatenated automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
### readEvent | ||
|
||
This action allows you to read one record from the event log placed at index given by input parameter. The result of this action is compatible with channels of `event-log` thing and contains following values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
eventIdx = eventRec.get("prev_index") | ||
] | ||
logInfo("EventLog", "End") | ||
getActions("mail","mail:smtp:local").sendMail("[email protected]", "Event log", msgBody) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I was just thinking that someone installs satel
, adds this example and runs into an error. Maybe a comment in the line above this one like sending notifications via mail requires the mail binding
or something like that would be good.
Signed-off-by: Krzysztof Goworek <[email protected]>
Travis tests were successfulHey @druciak, |
@J-N-K I think I resolved all your comments. Could you please look at the code if there's still something to fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the breaking change to this file: https://github.com/openhab/openhab-distro/blob/master/distributions/openhab/src/main/resources/bin/update.lst
Thanks for merging this PR so quickly.
The old way is still available, should I add breaking change in such case as well? |
Related to openhab/openhab-addons#7282 Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]> Signed-off-by: Hans-Reiner Hoffmann <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]> Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]> Signed-off-by: CSchlipp <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
Signed-off-by: Krzysztof Goworek <[email protected]>
This PR add a rule action for reading records from the event log. It replaces current way of reading the log using items linked to channels of
event-log
thing. This is still available but marked as deprecated.It also contains minor changes in README file.
Signed-off-by: Krzysztof Goworek [email protected]