Package: bosch-control-panel-cc880p
Bosch Control Panel CC880PLibrary to interface with the old CC880P Bosch Alarm Control PanelsExplore the docs »View Demo·Report Bug·Request FeatureTable of ContentsAbout The ProjectThe Reason BehindInterfaceWiringUart Pinout and ConfigurationProtocolFramesGetting StartedPrerequisitesInstallationUsageRoadmapContributingLicenseContactAcknowledgmentsAbout the ProjectThe Reason BehindThe reason behind the the development of this library, was the need turn the old Bosch Control Panel into a smart device without the need to replace it.Home Assistant is the home automation I use, and I wanted to integrate also the Bosch control panel into it.Because there wasn't any integration I could use for that purpose, I decided to implement the library myself and use it as dependency for the custom componentbosch_control_panel_cc880also developed by me for Home Assistant.(back to top)InterfaceThanks tothiswebpage, it was possible to figure out that the interface with the control panel can be done through the UART accessible through the auxiliary module pins (see theUART Pinout).
As mentioned in the website, it is possible to completely replace thedirect linkcable usually needed to configure the control panel through the computer using theA Link Plussoftware.(back to top)WiringTo sniff and decode the packets supported by the control panel, it was followed the wiring as in the following diagram:The information about A-Link Plus can be foundhere.
The USB-TTL converter can be a device similar tothis.To make the alarm remotely accessible, it was used a TCP/IP to UART bridge.
The current and tested solution was wired as following:The librarybosch-control-panel-cc880pis part of this repository.
TheESP8266represents any device using that chip such asESP1.
Note that it should be flashed with a software likeESP-Linkto create a bridge between TCP/IP and UART.
SinceESP1operates at3.3VandCC880Pcontrol panel operates at5V, there's the need to use a level shifter, or something similar (seethissite for examples).A better solution would be wiring the system as the diagram below:Using a device likeElfin-EW10would prevent the usage of level shifter as it also operates at5V, as well as remove the need to flash any firmware as the device already provides everything needed.(back to top)UART Pinout and ConfigurationThe pinout of theCC880Pcontrol panel is:TX: Auxiliary ModulePin3(Note:Thewebsitedescribes thePin7by mistake)RX: Auxiliary ModulePin7(Note:Thewebsitedescribes thePin3by mistake)GND: Auxiliary ModulePin4VCC(5V): Auxiliary ModulePin6The baud rate the control panel operates is300.(back to top)ProtocolSince there was no information about the protocol used to send commands to the control panel and receive the corresponding responses, the approach was to connect the control panel using theA Link Plusand then sniff and decode the packets being transferred back and forth.
the following steps were followed:Wiring (seeWiringchapter)Execute the A Link Plus and connect the Alarm (see A Link Plus manualhere)Monitor and decode the packets (using a software similar tothis)The result is presented in theframessection.(back to top)FramesBelow are presented the decoded frames that are used by this library so far:Send Keys CommandCommand used to send keys to the control panel simulating the pressing of the keypad keys.'Send Keys' Command

C0 <k1> <k2> <k3> <k4> <k5> <k6> <k7> <area> <nKeys> <crc>

Byte    Identifier  Comments
-------------------------------------------------------------------------------
1       C0          Hexadecimal representation of the 'Send Key' command
2-8     k<n>        Each byte is represents the key of the keypad. Can be sent
                        from 1 up to 7 keys in a single command
9       area        If the alarm is configured to have multiple areas, then
                        this byte identifies the target area that the key(s)
                        will be sent to. Otherwise set it to '00'.
10      nKeys       Number of keys being sent in this command
11      crc         Frame checksum (excluding the 1st byte)Set Siren Command (Special Command)Command used to enable/disable the siren'Set Siren' Command

0E <on> 00 00 00 00 00 00 00 00 <crc>

Byte    Identifier  Comments
-------------------------------------------------------------------------------
1       0E          Hexadecimal representation of the special commands
2       on          Sets the siren on or off:
                      - 0x05 if is to set siren on
                      - 0x06 if is to set siren off
3-10    XX          Not used and thus, set to 0.
11      crc         Frame checksum (excluding the 1st byte)Set Arm Command (Special Command)Command used to arm/disarm the alarm'Arm/Disarm' Command

0E <arm> 00 00 00 00 00 00 00 00 <crc>

Byte    Identifier  Comments
-------------------------------------------------------------------------------
1       0E          Hexadecimal representation of the special commands
2       on          Arm/Disarm the alarm:
                      - 0x01 if is to arm the alarm
                      - 0x02 if is to disarm the alarm
3-10    XX          Not used and thus, set to 0.
11      crc         Frame checksum (excluding the 1st byte)Set Output CommandCommand used to set (enable/disable) outputs of the control panel.'Set Output' Command

0E <on> <out> 00 00 00 00 00 00 00 <crc>

Byte    Identifier  Comments
-------------------------------------------------------------------------------
1       0E          Hexadecimal representation of special commands
2       on          Special function to be executed:
                        Set Output On: Set this byte to 0x03
                        Set Output Off: Set this byte to 0x04
3       out         This byte represents the index of the target output.
                      Supports setting the outputs 1-5, which values in this
                      byte are 0-4 respectively.
4-10    XX          All those bytes should be set to 0.
11      crc         Frame checksum (excluding the 1st byte)Get Status CommandCommand used to request the overall status of the control panel.
After sending this command is expected the control panel to answer with theGet Status Response.'Get Status' Command

01 00 00 00 <c2c1> <c4c3> <c6c5> <c7> 00 00 <crc>

Byte   Identifier   Comments
----------------------------
1       01          Hexadecimal representation of the 'Get Status' command.
2-4     XX          This bytes are not used and thus set to 0.
5-8     c1..c7      Corresponds to the installer code needed to have permissions
                      to get the alarm status. Each digit occupies a nibble.
                      Not used digits should be set to 0xF.
9..10   XX          This bytes are not used and thus set to 0.
11      crc         Frame checksum (excluding the 1st byte)Get Status ResponseResponse ofGet Status Command. This frame contains all the relevant information about the status of the control panel.'Get Status' Response

04 <out> <out> <zone> <zone> <en> <en> XX XX <area> <s/h> <m>

Byte   Identifier   Comments
----------------------------
1       04      :   Hexadecimal representation of the 'Get Status' response
2-3     out     :   Each bit set indicates whether an output is on.
                        Maximum number of outputs is 14.
                        Bits 1-8 of byte 3 correspond to the outputs 1-8 of the
                        control panel.
                        Bits 1-6 of byte 2 correspond to the outputs 9-14 of the
                        control panel.
                        Bits 7-8 of byte 2 are not used.
4-5     zone    :   Each bit set indicates whether a zone is triggered.
                        Maximum number of zones is 16.
                        Bits 1-8 of byte 4 correspond to the zones 1-8 of the
                        control panel.
                        Bits 1-8 of byte 5 correspond to the zones 9-16 of the
                        control panel.
6-7     en      :   Each bit set indicates whether a zone is enabled (only
                        applied when the mode of the alarm is set to `STAY`, as
                        in this mode is possible to have only a subset of zones
                        enabled).
                        Bits 1-8 of byte 6 correspond to the zones 1-8 of the
                        control panel.
                        Bits 1-8 of byte 7 correspond to the zones 9-16 of the
                        control panel.
8-9     XX      :   Unknown and not used bytes.
10      area    :   Indicates whether the stay status as well as the away
                        status of the control panel is enabled for each area.
                        Maximum number if areas is 4.
                        Bits 1-4 correspond to the away status of the areas 1-4
                        Bits 5-8 correspond to the stay status of the areas 5-8
11      s/h   :   Indicate the status of the siren (1 bit) + the current hours.
                        Bit 6 if set mean the siren is triggered.
                        Bits 0-4 represents the hours (0h-23h)
                        Other bits are not used and thus unknown.
12      m   :   Indicate the current minutes.
                        Bits 0-5 represents the minutes (0m-59m).
                        Other bits are not used and thus unknown.(back to top)Getting StartedThis library provides a CLI (Command Line Interface) to interact with the
control panel.PrerequisitesInstallationThe installation of the library, including the CLI, is as simple as run:$ pip install .After that, the library is ready to be used, and now the CLI can be used.
To get help how to use it type in the terminal the following:$ control_panel -h(back to top)UsageAfter following theInstallationsection, now the usage of
the CLI can be found by running:$ control_panel -h
usage: control_panel [-h] [-v] -c IP -p PORT {cmd} ...

Connects to the Control Panel

positional arguments:
  {cmd}
    cmd                 Execute a command

options:
  -h, --help            show this help message and exit
  -v, --version         Gets the current version
  -c IP, --connect IP   the host ip
  -p PORT, --port PORT  the host portThere are 2 options to run the CLI as shown in the following sections.Run in Listen ModeIn this mode, the script will connect to the control panel in listening only mode, where it will output any kind of change on the control panel.To run it the minimum should be:$ control_panel -c 192.168.1.22 -p 23Run in Commanding ModeThis mode, allows the user to send commands to the control panel.
To see the list of available commands the user can do:$ control_panel -c <ip> -p <port> cmd -h
usage: control_panel cmd [-h]  {sendKeys,setMode,setSiren,setOut} ...

positional arguments:
  cmd
  {sendKeys,setMode,setSiren,setOut}
    sendKeys            Sends a set of keys to the control panel. Currently supports the following: [0-9*#]{1,7}
    setMode             Change the control panel mode like arm, disarm, etc
    setSiren            Change the control panel siren status
    setOut              Change the output status of the control panel

options:
  -h, --help            show this help message and exitThe following are some examples:$ control_panel -c <ip> -p <port> cmd setSiren off
Before: Siren(on=True)
After: Siren(on=False)$ control_panel -c <ip> -p <port> cmd setSiren 1
Before: Siren(on=False)
After: Siren(on=True)$ control_panel -c <ip> -p <port> cmd setSiren 1
Before: Siren(on=False)
After: Siren(on=True)$ control_panel -c <ip> -p <port> cmd setOut 3 on
Before: Output(on=False)
After: Output(on=True)(back to top)RoadmapComplete documentation:Hardware UsedBlock diagram of the involved hardwareTable of the packets (commands and responses)OtherConfigure precommit and linterImplement the battery of unit/integration testsImplement a commandline interfaceGracefully shutdown when a signal is received (e.g. A keyboard Interrupt)See theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingTo contribute to this project, you need to execute the following steps:InstallCreate a virtual environment (see how tohere):Activate the virtual environment (see how tohere):Install all the requirements for development:pip install -e ".[dev]"Install pre-commit:pre-commit installCreate new feature and commit the changesCreate a new feature branch based from the main branch:git checkout -b feature/<feature_name>Implement the changes for the featureRun formatters/linters:Autopep8:autopep8 src/ tests/Flake8:flake8 src/ tests/Mypy:mypy src/ tests/Commit the changes (this should run pre-commit to format/lint anyway)(back to top)LicenseDistributed under the Apache License Version 2.0. SeeLICENSE.txtfor more information.(back to top)ContactHugo Gomes -hgomes88@gmail.comProject Link:https://github.com/hgomes88/bosch-control-panel-cc880pPipy Releases:https://pypi.org/project/bosch-control-panel-cc880p(back to top)Acknowledgments[othneildrew] Best Readme Template[Yes Thomas] Programming Bosh Alarm Panel without direct link cable(back to top)