Hi all together,
I am pretty new to HA, I just switched from ioBroker 2 weeks ago.
At the moment I am working on my virtual AlarmSystem in HA. Since i already have a professional wired AlarmSystem in my House I just need to get the states to HA.
I have a Honeywell MB-Classic MB100 with DS6700 and this sends me all kind of states via VdS2465 protocol to ioBroker. From there I send mqtt messages to HA, since HA hasn’t a direct way to receive the data from the alarmsystem.
Anyhow, I can send basically any kind of message to HA and already got a virtual alarm_control_panel up and running in HA. This is shown me also in Homekit.
But in HA i can only set these states through automations:
disarmed
armed (away, home, etc.)
trigger
What i would like to be able is to distinguish the alarms, since there is more then just “alarm”.
Is it possible to set different states like burglary/intrusion, tamper, system fault, battery fault. etc…
With iobroker’s yahka adapter (for homekit) it was at least possible to set tamper and fault…
Maybe someone has an idea how to realize. Thank you very much for helping.
For example: what does “metadata” in the automations do?
- action: alarm_control_panel.alarm_trigger
metadata: {}
Here are some snippets of my configs for better understanding:
iobroker mqtt messages to HA (javascript):
on({ id: [].concat(EMA_Alarm_Datenpunkt), change: 'ne' }, async (obj) => {
let value = obj.state.val;
let oldValue = obj.oldState.val;
if (EMA_Alarm_Signal == true) {
// EINBRUCH Benachrichtigung
sendTo('mqtt.1', 'sendMessage2Client', { topic: 'Alarmanlage/MB100/alarm/intrusion', message: '{ "state": "intrusion", "details": "sensor_alarm" }', retain: true });
} else if (EMA_Alarm_Signal == false) {
sendTo('mqtt.1', 'sendMessage2Client', { topic: 'Alarmanlage/MB100/alarm/intrusion', message: '{ "state": "ok", "details": "" }', retain: true });
}
});
HA sensor for intrusion:
- name: "EMA Alarm Zustand"
unique_id: "EMA_alarm_zustand"
state_topic: "Alarmanlage/MB100/alarm/intrusion"
value_template: "{{ value_json.state }}"
json_attributes_topic: "Alarmanlage/MB100/alarm/intrusion"
Manual alarm system in HA:
- platform: manual
name: Alarmanlage
unique_id: EMA_01
code: "1234"
arming_time: 0
delay_time: 0
trigger_time: 120
arming_states:
- armed_away
- armed_home
disarmed:
trigger_time: 0
armed_home:
arming_time: 0
delay_time: 0
armed_away:
arming_time: 0
delay_time: 0
Automation HA:
alias: EMA Zustände schalten
description: ""
triggers:
- trigger: state
entity_id:
- sensor.ema_scharf_zustand
to: away
attribute: details
id: armed_away
- trigger: state
entity_id:
- sensor.ema_scharf_zustand
attribute: details
to: home
id: armed_home
- trigger: state
entity_id:
- sensor.ema_scharf_zustand
to: disarmed
id: disarmed
- trigger: state
entity_id:
- sensor.ema_alarm_zustand
to: intrusion
id: intrusion
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- armed_away
sequence:
- action: alarm_control_panel.alarm_arm_away
metadata: {}
data:
code: "1234"
target:
entity_id: alarm_control_panel.alarmanlage
- conditions:
- condition: trigger
id:
- armed_home
sequence:
- action: alarm_control_panel.alarm_arm_home
metadata: {}
data:
code: "1234"
target:
entity_id: alarm_control_panel.alarmanlage
- conditions:
- condition: trigger
id:
- disarmed
sequence:
- action: alarm_control_panel.alarm_disarm
metadata: {}
data:
code: "1234"
target:
entity_id: alarm_control_panel.alarmanlage
- conditions:
- condition: trigger
id:
- intrusion
sequence:
- action: alarm_control_panel.alarm_trigger
metadata: {}
data:
code: "1234"
target:
entity_id: alarm_control_panel.alarmanlage
mode: single