So I paired an RC531 remote to the W193 panel, and used the codes to create switches within HA to trigger the different states on the W193 panel:
- platform: mqtt
name: 'Kerui Away'
command_topic: cmnd/rfbridge/Backlog
payload_on: "Rfsync 9930; Rflow 300; Rfhigh 890; Rfcode #A33EC4"
payload_off: "Rfsync 9930; Rflow 300; Rfhigh 890; Rfcode #A33EC2"
- platform: mqtt
name: 'Kerui Home'
command_topic: cmnd/rfbridge/Backlog
payload_on: "Rfsync 9930; Rflow 300; Rfhigh 890; Rfcode #A33EC1"
payload_off: "Rfsync 9930; Rflow 300; Rfhigh 890; Rfcode #A33EC2"
- platform: mqtt
name: 'Kerui Panic'
command_topic: cmnd/rfbridge/Backlog
payload_on: "Rfsync 9930; Rflow 300; Rfhigh 890; Rfcode #A33EC8"
payload_off: "Rfsync 9930; Rflow 300; Rfhigh 890; Rfcode #A33EC2"
I have also created a binary sensor that tells me the state of the control panel:
- platform: mqtt
state_topic: "tele/rfbridge/RESULT"
name: 'Kerui Alarm Panel'
value_template: '{{value_json.RfReceived.Data}}'
payload_on: '30FE34'
payload_off: '30FE32'
device_class: power
So I now have this is HA:
Now, using a node-red automation, not only can I control the HA alarm from the W193, but the W193 will also reflect the state of the HA alarm if changed from withing HA.
[{"id":"a0c040da.28d9f","type":"comment","z":"f9a8a8ea.c4b0f8","name":"Kerui","info":"","x":110,"y":1260,"wires":[]},{"id":"fdbccc98.cad0d","type":"server-state-changed","z":"f9a8a8ea.c4b0f8","name":"HA Control Panel","server":"1b36a1cc.1e72ee","version":1,"entityidfilter":"alarm_control_panel.house","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":140,"y":1320,"wires":[["94faf8f8.ee8658"]]},{"id":"15078091.e13d1f","type":"switch","z":"f9a8a8ea.c4b0f8","name":"Alarm State","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"armed_away","vt":"str"},{"t":"eq","v":"armed_home","vt":"str"},{"t":"eq","v":"disarmed","vt":"str"},{"t":"eq","v":"triggered","vt":"str"},{"t":"eq","v":"warning","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":590,"y":1320,"wires":[["965ec797.8f9058"],["21b1c476.b6050c"],["c4746548.ea26d8"],[],[]]},{"id":"94faf8f8.ee8658","type":"traffic","z":"f9a8a8ea.c4b0f8","name":" ","property_allow":"payload","filter_allow":"on","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"1","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":450,"y":1320,"wires":[["15078091.e13d1f"]]},{"id":"c4746548.ea26d8","type":"api-call-service","z":"f9a8a8ea.c4b0f8","name":"Disarm","server":"1b36a1cc.1e72ee","service_domain":"switch","service":"turn_off","data":"{\"entity_id\":\"switch.kerui_away\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":1400,"wires":[[]]},{"id":"965ec797.8f9058","type":"api-call-service","z":"f9a8a8ea.c4b0f8","name":"Away Mode","server":"1b36a1cc.1e72ee","service_domain":"switch","service":"turn_on","data":"{\"entity_id\":\"switch.kerui_away\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":1280,"wires":[[]]},{"id":"21b1c476.b6050c","type":"api-call-service","z":"f9a8a8ea.c4b0f8","name":"Home Mode","server":"1b36a1cc.1e72ee","service_domain":"switch","service":"turn_on","data":"{\"entity_id\":\"switch.kerui_home\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":1340,"wires":[[]]},{"id":"400f89b9.4743b8","type":"server-state-changed","z":"f9a8a8ea.c4b0f8","name":"Kerui Panel","server":"1b36a1cc.1e72ee","version":1,"entityidfilter":"binary_sensor.kerui_alarm_panel","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":130,"y":1520,"wires":[["3388c4c9.9d9b7c","d9ec3677.a49518","8246317d.7d13"]]},{"id":"3388c4c9.9d9b7c","type":"switch","z":"f9a8a8ea.c4b0f8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":570,"y":1520,"wires":[["ef3d5c42.610ec"],["901291a8.5f68c"]]},{"id":"ef3d5c42.610ec","type":"api-call-service","z":"f9a8a8ea.c4b0f8","name":"Arm Away","server":"1b36a1cc.1e72ee","service_domain":"bwalarm","service":"alarm_arm_away","data":"{\"entity_id\":\"alarm_control_panel.house\",\"code\":\"6659\",\"ignore_open_sensors\":\"true\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":1500,"wires":[[]]},{"id":"901291a8.5f68c","type":"api-call-service","z":"f9a8a8ea.c4b0f8","name":"Disarm","server":"1b36a1cc.1e72ee","service_domain":"bwalarm","service":"alarm_disarm","data":"{\"entity_id\":\"alarm_control_panel.house\",\"code\":\"6659\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":1560,"wires":[[]]},{"id":"d9ec3677.a49518","type":"trigger","z":"f9a8a8ea.c4b0f8","op1":"1","op2":"on","op1type":"str","op2type":"str","duration":"10","extend":false,"units":"s","reset":"","bytopic":"all","name":"10s","x":310,"y":1400,"wires":[["94faf8f8.ee8658"]]},{"id":"8246317d.7d13","type":"change","z":"f9a8a8ea.c4b0f8","name":" ","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1460,"wires":[["94faf8f8.ee8658"]]},{"id":"1b36a1cc.1e72ee","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
Very neat!