@jossuar Thanks you once again for a great Binding. Have managed to get a decent system running - now just adding some noce to haves - maybe you can give some advice?
I have looked at the Channels etc, but don’t seem to see anything that can tell me what Zone last triggered a Partition - these seem to be switches ( partition_previous_alarm and partition_alarm_memory).
Is there anything I can use to get that information?
Do you know of anyway to prompt for the PIN when doing a DISARM? Don’t like th eidea of the PIN being hardcoded. Don’t seem to find an easy way to have a Popup to enter pin in Basic UI - bearing in mind I have zero coding knowledge.
I suppose you will be able to see it from the log panel messages. The panel exposes all the info from the panel. Many of the channels i don’t know what they are exactly. Feel free to experiment and share your findings.
I also thought of that and I’m thinking of writing a custom widget for the habpanel.
Hi. @jossuar So I decided to try an use the details at Input field for number/free text for openHAB UIs to input my PIN number. Have got the input part working just fine (minor formatting isue with Basic UI when switching between Mobile and Browser.
I am however having issues passing by PIN number to the alarm system. My Rule is:
rule "Partion 1 DISARM"
when
Item Partition1_Disarm received command ON
then
if (Partition1_Armed.state == ON) {
logWarn("actions", "Alarm is not armed")
}
else {
val actions = getActions("caddx","caddx:partition:e59e4935:partition1")
if (null === actions) {
logWarn("actions", "Actions not found, check thing ID for bridge")
return
}
logWarn("actions", "Ready to ARM is ON ")
//var EnteredPin = "1234"
var EnteredPin = ScriptServiceUtil.getItemRegistry.getItem("Pin_Number")
//val String EnteredPin = ScriptServiceUtil.getItemRegistry.getItem("Pin_Number")
logInfo("", "EnteredPin " + EnteredPin.state )
actions.disarm(EnteredPin.state)
}
end
And when I activate I get the following in the logs:
07:38:31.950 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Partition1_Disarm' received command ON
07:38:31.950 [WARN ] [clipse.smarthome.model.script.actions] - Ready to ARM is ON
07:38:31.950 [INFO ] [org.eclipse.smarthome.model.script. ] - EnteredPin 1234
07:38:31.950 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'Partion 1 DISARM': An error occurred during the script execution: Could not invoke method: org.openhab.binding.caddx.internal.action.CaddxPartitionActions.disarm(org.eclipse.smarthome.core.thing.binding.ThingActions,java.lang.String) on instance: null
Variable seems to be getting correct value but not passing correctly.
Any advice?
Thanks
Mark
EDIT: Found my error:
var EnteredPin = ScriptServiceUtil.getItemRegistry.getItem("Pin_Number")
logInfo("", "EnteredPin " + EnteredPin.state.toString)
actions.disarm(EnteredPin.state.toString)
I have made some great progress with the Caddx sytem and have even implemented a keypad type solution for the PIN number to DISARM with. Added a bit or error checking for Arming etc. to ensure smooth operation.
Used the following:
I am now struggling with getting STATUS information from the Panel to be able to see logs and Alarm Memory.
The Log Files seems to offer functionality by using the Panel_LogMessage. Most recent seems to be in Panel_LogMessage10, that entry moves to Panel_LogMessage9, etc as events occur.
The issue seems to be that some entries are “Unknown log event type received”. The only one I seemed to get correctly is the Auto-Test. Do you think they could be some issue with the Binding - the logs display correctly on the LCD Keypad using *90
Restults as follows:
Alarm Log (*90 [Master])
Close 98
01/10 13:53 P3 *
Open 1
01/10 13:49 P3 *
Auto test
01/10 13:00
Open 1
01/10 6:09 P3 *
Bypass Rest 6
01/10 6:09 P1 *
Bypass Rest 23
01/10 6:09 P1 *
Open 1
01/10 6:09 P1 *
Bypass Rest 21
01/10 5:20 P4 *
Open 3
01/10 5:20 P4 *
Log Extract from OpenHab:
2020-10-01 13:00:46.105 [vent.ItemStateChangedEvent] - Panel_LogMessage10 changed from Unknown log event type received to 01-10 13:00 Auto-test
2020-10-01 13:49:53.839 [vent.ItemStateChangedEvent] - Panel_LogMessage10 changed from 01-10 13:00 Auto-test to Unknown log event type received
2020-10-01 13:49:57.261 [vent.ItemStateChangedEvent] - Panel_LogMessage9 changed from NULL to 01-10 13:00 Auto-test
2020-10-01 13:49:57.370 [vent.ItemStateChangedEvent] - Panel_LogMessage8 changed from NULL to Unknown log event type received
2020-10-01 13:49:57.464 [vent.ItemStateChangedEvent] - Panel_LogMessage7 changed from NULL to Unknown log event type received
2020-10-01 13:49:57.558 [vent.ItemStateChangedEvent] - Panel_LogMessage6 changed from NULL to Unknown log event type received
2020-10-01 13:49:57.667 [vent.ItemStateChangedEvent] - Panel_LogMessage5 changed from NULL to Unknown log event type received
2020-10-01 13:49:57.761 [vent.ItemStateChangedEvent] - Panel_LogMessage4 changed from NULL to Unknown log event type received
2020-10-01 13:49:57.870 [vent.ItemStateChangedEvent] - Panel_LogMessage3 changed from NULL to Unknown log event type received
2020-10-01 13:49:57.964 [vent.ItemStateChangedEvent] - Panel_LogMessage2 changed from NULL to Unknown log event type received
I am using the following Sitemap entries to display the Information from the binding:
I also can’t seem to find an option to View the Alarm Memory using the Binding (This would be a Partition specific string I would suspect). There are no STRING values available - only SWITCHES.
The information is retrieved using *3 in each Partition. I have checked and the correct information for each Partition is displayed using the LCD Keypad.
The API has a mapping of event numbers to descriptions which has been implemented in the binding. Obviously this mapping is not complete. I would need the debug log and the messages displayed so that i can amend this mapping.
Last time i checked I did get in my installation “Zone bypass” and “Zone restore” events. Maybe a bug has crept in. I have to check it. Can you send me a debug log and the respective messages from the panel?
There is currently no such string. I suppose it can be constructed from the flags. For each zone you have zone_partition1, zone_partition2, … zone_partition8 and zone_alarm_memory flags.
To check i would need a debug log of the last ZoneStatusMessage which has the Alarm Memory bit set and also can you send me what is displayed on the keypad. I’m currently remote working away from home and do not have physical access to my panel to check by myself.
Another question. What openhab version are you running?
I have enabled OpenHab debug logging as per article I found. I presume you would liek me to PM you the logs (openhab.log and events.log)? I will have to manually retrieve entries off the panel - unless there is a better/easier way?
Not 100% sure how to get you the relevant information.
You are running on windows.
First try the following to access the console:
On the console enter the following:
log:set DEBUG org.openhab.binding.caddx
When you take an action that changes a log message e.g. Auto Test, Bypass a zone, Restore a zone, Arming,… you will see DEBUG entries in openhab.log like the following:
I’m curious about your panel model and firmware version.
The Log event message is according to the manual 10 bytes long, but your panel sends 17 bytes. Fortunately the 10 first bytes are the same as far as i can tell.
Also are you located in the US, Europe or elsewhere?
Thanks so much for getting back to me so quickly. I will download the new version and give it a try and feedback.
I am is South Africa and the Panel Details are: NZ-8-ZA-TK and from the binding the Firmware Version is 5.38
I have a copy of the Installation Manual and could send you a scan of any info that might help?. Just not sure where to look.
Cheers
Mark
EDIT: The logs now seems to display correctly - only weird this is there is now a special character after the Firmware Version? - 5.38�
EDIT 2: The special character resolved after restarting the OpenHab services on Windows… Also battled with the new version till then. Seems to hold the older bindings etc till the service is restarted. Was getting all sorts of errors with sending commands etc. Will have to remember to restart after any upgrades etc.
Just wanted to thank you again for the great work. I have been very happy with what I have been able to achieve with your assistance and the community in a short while. Had been really frustrated with my previous solution - especially since the plugin was no longer supported.
With your latest build I am now able to see the log entries. I have also upgraded openHAB to 2.5.9 with no issues.
My current challenges (for which any feedback/advise would be appreciated are:
To be able to see the “Triggered Alarm” information such as:
a) Triggered Partition
b) Triggering Zones
c) Time of event (though not sure this is available as I do not see on *3 on Keypad
I have looked at the status messages etc, but these all seem to be switches and not messages back - so not sure where to get the information
Display an alarm event similar to above and also send notification. I presume the notification would involve the openHAB cloud connector which I have not looked as as yet.
Find a reliable and usable User Interface for use on PC as well as Mobile Device. Both my sitemap and HABpanel attempts have shortcomings. The SiteMap/Basic UI seems most functional - though limited to 2 columns and on mobile have to set the browser to use “Desktop” mode each time. My HABpanel attempt looks great on PC and then terrible on mobile - so no happy medium so far.
Integrate with Google Assistant - though concerned about security etc.
I have managed to implement two different keypad solutions (BasicUI and HABpanel) using the following:
I suppose you could put all the zones in a group and iterate the members to find which zones have the Alarm Memory flag set. From this info you could build a string for display.
Appreciate the suggestion. Have had a read through and looked feasible. However I still am not getting any results.
For testing I have Partition 3, which has a single Zone connected (Zone 18). This Partition has recent alarm activity (*3 on Keypad gives Zone 18).
I have created items for Partition 3 Alarm Memory as well as Zone 18 Alarm Memory (PIRCEILING) and displayed them. Both are switches which are OFF. Did the same test with Partition 2, which also has recent alarm when checked with *3, however both the Partition and Zone Alarm Memories are OFF.
IS there not a possibility that maybe some of these switch items should be STRING maybe? (See that under a Zone there is a Name item - would expect this to be a STRING possibly?)
EDIT: This is a STRING and is now displaying the correct name