I have an old burglar alarm which I wanted to see if I could make smarter so without doing much research I bought a Fibaro Smart Implant FGBS222.
Alarm
The alarm I have is a C&K Securit 800L which is rebranded by a number of companies such as Honeywell. The installation manual explains the circuit board layout and how to program it, but the main features of interest are:
- a latching circuit which goes to +12V when the alarm is set (normally used when multiple sensors are on one zone) but handy as a way of detecting whether the alarm is armed or not
- AUX + and Ground - connections to the remote panel which i can use to power the smart implant
- connections to the siren/alarm
- a zone 8 which is reprogammable to a momentary keyswitch
Alarm Programming
Enter the engineering code then type 4 8 4 * to change zone 8 from the default personal attack alarm to a keyswitch. # exits.
Cabling Connections
Implant was attached to the alarm’s terminals as per below…
Implant | Alarm Connection |
---|---|
P (red) | AUX + |
GND (blue) | Ground - terminal |
IN1 (yellow) | L+ latching circuit |
IN2 (green) | ST - |
OUT2 connections | Zone 8 terminals to act as a key switch |
OUT1 connections | Nothing |
Implant Woes
I wished I’d read up on the smart implant before I bought it as as there’s a few posts here saying it’s a pig to get working and my experience was no different. It can operate in a variety of input modes (alarm, voltage, switch) and by default the state of the inputs triggers the outputs to do something. For example if IN1 goes +ve then output terminals switch on.
Step 1: Adding it to HA
Added it in secure mode - big mistake as you hardly get any entities. No idea why. Removed it and added again in non-secure mode and you should see loads of entities (voltage, alarm, switches) and three devices (!) in HA.
Step 2: Separating the outputs from inputs
Buried in the back of the manual and mentioned elsewhere in the community is an option to set zwave protection command class 0x75 to split outputs from inputs. Not obvious how to set this from HA using the built in ZWave integration so I used the SiLabs PC software and the aeotec stick to set protection cc to Local 2 RF 0
which then allows the outputs to be controlled independently of the value of the inputs. So now you can use the switch entities in HA to enable/disable the outputs without caring about the value of the inputs.
Step 3: Setting the mode
It is a very versatile piece of kit with a variety of modes, but the only way of getting it to do what I needed was to set config parameter 20 & 21 to option 4 (voltage sensor). Other modes (1 & 2) didn’t pick up any change in state on the inputs. Option 4 should report input state changes using basic reports but didn’t.
Step 4: Reports on state change
This was the tricky bit - the implant wouldn’t send any notification reports at all when inputs changed voltage but a manual refresh would pick up the changed voltages. Over on the Fibaro forum there’s a discussion on multisensor reports on the implant (Nasty Bug with Periodic Reports) but the gist is:
- When the implant is added to HA, the controller gets added as node 1
- To get the implant to report state changes, node 1 endpoint 1 needs to be added to the lifeline group, group 1 and group 2.
- No easy way of doing this in HA so used the SiLabs software by sending these commands to the implant
remove association : raw data 85040101
remove association : raw data 85040201
remove association : raw data 85040301
remove multichannel association : raw data 8E0401
remove multichannel association : raw data 8E0402
remove multichannel association : raw data 8E0403
add multichannel association : raw data 8E0101000101
add multichannel association : raw data 8E0102000101
add multichannel association : raw data 8E0103000102
which gives you this in HA (example for group 2):
After this the state change reports burst into life.
Putting it all together
We now have the voltage sensors reporting their state properly without resorting to polling, and the ability to control the outputs independently of the inputs so we’re almost there
- option 154 - set outputs to normally closed to match what the alarm expects
- option 156 (auto off) - set to 10 to pulse the outputs for one second to set the alarm properly
- write some templates to look at the voltages on the inputs to detect the alarm state.
- voltage_2 is the siren voltage. Normally about 3 volts but falls close to zero when the alarm is going off
- voltage is the latching circuit and is normally 0 volts but rises to 12v when the alarm is set
sensor:
- platform: template
sensors:
burglar_alarm:
friendly_name: "Burglar Alarm Status"
value_template: >
{% if (states('sensor.fibaro_system_fgbs222_smart_implant_voltage_2') | float < 1) %}
triggered
{% elif (states('sensor.fibaro_system_fgbs222_smart_implant_voltage') | float < 8) %}
disarmed
{% else %}
armed_away
{% endif %}
And set the switch corresponding to output 2 to on to set and unset the alarm. Setting switch to on will pulse output 2 for one second.
Hope this is useful info.