I enter the code in the BasicUI and then use your rule to delete the code.
I think event channel would be the best for such purpose. In case of an error in command response an event would be triggered with error code. You could then react for such event in a rule, for example displaying a message to the user.
Hi @druciak
Thanx for your hard workâŠ
I have problems reading logsâŠ
My config files:
Bridge satel:ethm-1:home âSATEL ETHM-1 bridgeâ âŠ
Thing event-log SatelLog [ ]
Number iSatelEVENT_LOG_IDX { channel=âsatel:event-log:home:SatelLog:indexâ }
when I sending value
smarthome:send iSatelEVENT_LOG_IDX -1
I am receiving this info in logs:
01:02:05.478 [INFO ] [smarthome.event.ItemCommandEvent ] - Item âiSatelEVENT_LOG_IDXâ received command -1
01:02:05.482 [INFO ] [arthome.event.ItemStatePredictedEvent] - iSatelEVENT_LOG_IDX predicted to become NULL
All items are NULL:
Number iSatelEVENT_LOG_IDX âLog - aktualny indeks [%d]â (Satel) { channel=âsatel:event-log:home:SatelLog:indexâ }
Number iSatelEVENT_LOG_PREV âLog - poprzedni indeks [%d]â (Satel) { channel=âsatel:event-log:home:SatelLog:prev_indexâ }
DateTime iSatelEVENT_LOG_TIME âLog - czas [%1$tF %1$tR]â (Satel) { channel=âsatel:event-log:home:SatelLog:timestampâ }
String iSatelEVENT_LOG_DESC âLog - opis [%s]â (Satel) { channel=âsatel:event-log:home:SatelLog:descriptionâ }
String iSatelEVENT_LOG_DETAILS âLog - detale [%s]â (Satel) { channel=âsatel:event-log:home:SatelLog:detailsâ }
generally I cannot read any logsâŠcould you put here any âworking exampleâ?
Hi @Roberto2
âworking exampleâ is presented in the docs. I have it currently in my OH2 config and besides small inconvinince, it generally works. Try to copy/paste the example from the docs and see if it helps. You might have a typo or you did some changes that cause troubles.
This is for sure no an excerpt from the doc, so it look like you have made some modofication to it or you just created your own rules.
@druciak yes I modified names only as you can see in my *.items file
but donât want any rules now ⊠just would like trigger logs read so I put -1 (per doc) to
[satel:event-log:home:SatelLog:index]
and looking for logs here:
[satel:event-log:home:SatelLog:description]
Question: logs are populated during alarm condition only?
Hi @druciak ,
Iâve set up a small test environment to test the integration. All things are online and Iâm able to arm/disarm a partition but OH doesnât receive any zone/output event. Is there any special configuration on Satel/OH side required to receive these events? E.g. Zone type? Data option/telephone/external modem/ethm?
Th only thing I see in the logs is this:
2011-01-01 03:17:20.423 [DEBUG] [.satel.internal.protocol.SatelModule] - Sending message: Message: command = 7F, payload =
2011-01-01 03:17:20.627 [DEBUG] [.satel.internal.protocol.SatelModule] - Got response: Message: command = 7F, payload = FF FF FF FF FF
2011-01-01 03:17:20.628 [DEBUG] [satel.internal.event.EventDispatcher] - Distributing event: NewStatesEvent: changed = [00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F,10,11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F,20,21,22,23,24,25,26,27]
The firmware version is 1.18
Thanks
Without rules you wonât be able to read the log. By changing index item you set offset of the record you will get the data for. So by sending -1 youâll get the most recent record only.
Regarding your issue. Please enable DEBUG logging level for the binding, because I am not able to guess what is wrong from this little information you have provided.
Hi Gabor
If you were able to communicate with the system, all configuration on the alarm system side is correct and sufficient. For sure on OH side you need things and items configuration for zones you would like to monitor, like for all other bindings.
If this all you see in the logs, it seems that you have not linked any items to channels of your things.
Please provide more details about your OH configuration, as I cannot help further without it.
Things and items are linked. It can be seen in PaperUI as well. These are the test items:
Group Satel
Group:Switch:OR(ON,OFF) Alarms "TerĂŒletek [(%d)]" <siren>
Switch PARTITION_ARMED "TerĂŒlet Ă©lesĂtve" (Satel) {channel="satel:partition:bd9c6598:1:armed"}
Switch PARTITION_ALARM "TerĂŒlet riasztĂĄs" (Satel,Alarms) {channel="satel:partition:bd9c6598:1:alarm"}
Switch LIVING_VIOLATION "Nappali terĂŒletsĂ©rtĂ©s" (Satel) {channel="satel:zone:bd9c6598:17:violation"}
Switch LIVING_ALARM "Nappali riasztĂĄs" (Satel) {channel="satel:zone:bd9c6598:17:alarm"}
Switch BEDROOM_VIOLATION "HĂĄlĂł terĂŒletsĂ©rtĂ©s" (Satel) {channel="satel:zone:bd9c6598:18:violation"}
Switch BEDROOM_ALARM "HĂĄlĂł riasztĂĄs" (Satel) {channel="satel:zone:bd9c6598:18:alarm"}
Switch ZONE "Zone" (Satel) {channel="satel:output:bd9c6598:4:state"}
Switch ZONE7_ALARM "Zone7 Alarm" (Satel) {channel="satel:zone:bd9c6598:7:alarm"}
Switch ZONE7_VIOLATION "Zone7 Violation" (Satel) {channel="satel:zone:bd9c6598:7:violation"}
Switch SYSTEM_TROUBLES "Rendszer problémåk" (Satel)
Number EVENT_LOG_IDX "Eseménynapló - aktuålis [%d]" (Satel) {channel="satel:event-log:bd9c6598:index"}
Number EVENT_LOG_PREV "EsemĂ©nynaplĂł - elĆzĆ [%d]" (Satel) {channel="satel:event-log:bd9c6598:prev_index"}
DateTime EVENT_LOG_TIME "EsemĂ©nynaplĂł - idĆ [%1$tF %1$tR]" (Satel) {channel="satel:event-log:bd9c6598:timestamp"}
String EVENT_LOG_DESCR "Eseménynapló - magyaråzat [%s]" (Satel) {channel="satel:event-log:bd9c6598:description"}
String EVENT_LOG_DET "Eseménynapló - részletek [%s]" (Satel) {channel="satel:event-log:bd9c6598:details"}
And this is the sample site map:
sitemap alarm label="Alarm" {
Frame label="Alarm system" {
Switch item=Alarms mappings=[OFF="Clear"]
Switch item=PARTITION_ARMED mappings=[ON="Arm", OFF="Disarm"]
Frame label="Status" {
Switch item=SYSTEM_TROUBLES mappings=[OFF="Clear"]
Switch item=LIVING_VIOLATION
Switch item=LIVING_ALARM
Switch item=BEDROOM_VIOLATION
Switch item=BEDROOM_ALARM
}
Frame label="Zone" {
Switch item=ZONE
Switch item=ZONE7_VIOLATION
Switch item=ZONE7_ALARM
}
Frame label="Events" {
Text item=EVENT_LOG_DESCR
Text item=EVENT_LOG_TIME
Text item=EVENT_LOG_DET
}
}
}
Iâm able to arm/disarm the system from browser (BasicUI) but no state changes returned (e.g. I arm the system from Satel keypad - the BasicUI switch doesnât reflect thearmed state . Also no switch state changes for zones/outputs.
What about things? Do you have all the things defined either in PaperUI or in files?
Yes. Things are all from the Inbox after accepting the discovery results. BTW are you sure about the Satel side? I mean shoudnât the status polling be showing some status change - e.g. zone 17 and 18 violation from the items above (simple door magnets). The response payload of the polls in the logs doesnât reflect any change whatever I do on Satel sideâŠ
Hmm, thatâs weird.
This response tells you what has changed since tha last poll and from your log it looks that all state types have changed - this normal thing for the first request. However there should be more requests for each of state type defined in the configuration. So for example zones violation is â00â and there should be request to get violations for all the zones. But if you donât have channel âViolationâ linked for any thing - this request will be skipped as the result would be useless. Since you donât have further requests it seems that you donât have any channels linked in the configuration.
Or maybe there is another bug that I am not aware of.
Shall I define my things in files?
On the other hand, since you are able to arm/disarm it looks that at least partition definition is correctly linked. So it should at least get partition alarm state after the first request. But for some reason it does not issue any more request.
You could also try setting TRACE logging level see if something more appears in the log.
This shouldnât be necessary, both ways (UI and files) should work. But you could give it a try if everything failed.
There was nothing extra info with TRACE level. Can you suggest an entry point in the code to debug?
I would start with this method:
However you should get âHandling incoming eventâ log message on TRACE level, but it seems this method is not fired. This is really weird. What version of OH are you using?
My oh version is 2.5.0 M1
And what version of the binding are you using? The one that comes with OH or that from the marketplace attached to this thread?
The version comes with OH: org.openhab.binding.satel:2.5.0.M1
Hey Gabor,
did you make any progress? If it still does not work, I suggest to make a try with file-based configuration.
What is also very strange, that you did not get any more logs with TRACE level. Did you change it for the binding for sure?