在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:fdegier/homebridge-jablotron-alarm开源软件地址:https://github.com/fdegier/homebridge-jablotron-alarm开源编程语言:JavaScript 100.0%开源软件介绍:Enabling Homekit and Siri for Jablotron AlarmsIn the beginning of 2017 I bought and installed a Jablotron JA-100 alarm system in my home, it was easy to install, works great and offers a lot of options for automation which is great since Ive automated 90% of the stuff I do in my house. However it was missing 1 feature, Homekit. Let’s fix that! If you are unfamiliar with Homekit, it’s Apple’s home automation integration, it basically bundles all of your smart devices in the Home app and lets you control it from 1 app, share access to family and friends, but most importantly provide a secure gateway for remote access and location based automation. See: https://www.apple.com/ios/home/ The objective for the Jablotron Homekit integration is: Arm, disarm or partially arm the alarm based on location Control PGM Jablotron devices based on location Have other devices perform actions based on the status of the alarm Include the alarm in scenes Control Jablotron from the Home app Control Jablotron with Siri Since Homekit isn’t enabled on Jablotron we need a bridge to connect Jablotron to Homekit, we will be using Homebridge for this. Most of this README is written for first time users of Homebridge so feel free to skip most parts if you already have it. What is Homebridge?Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices. See: https://github.com/nfarina/homebridge ComponentsComponents used in this instructions:
The above components can be changed out to your preferences, just make sure you check the compatibility with Homebridge. Homekit dependenciesIn order to use Apple Homekit you need to make sure you meet Apple’s requirements, most notably the requirements on automation and remote access. See: https://support.apple.com/en-us/HT207057 Installation options
Preparing the OSFor our OS we will be using Jessie Lite, get the latest version from: http://downloads.raspberrypi.org/raspbian_lite/images/ Follow the instruction on how to install it on your SD card: https://www.raspberrypi.org/documentation/installation/installing-images/ Please read the included README.txt After installing the OS on the SD card, perform the following steps: Open the SD card in Finder or Explorer and go the root / home folder Create an empty file called “ssh.txt”, this will enable us to SSH into the Pi Create a second file called “wpa_supplicant.conf” with the following contents:
This will make sure that the Pi connects to your WiFi. Alternatively you can use the command line to perform these commands. Prepping the PiInsert the SD with OS into the Pi, close the case and hook the power up. Verify that it works, by checking if the Pi’s light is blinking. Lets get started Now that we have all our components and software its time to boot up the Pi for the first time, installing the plugins and connecting it your Homekit. If you have downloaded the prepped OS then skip until the next steps and go straight to “Connecting to Homekit”, if you have an existing Homebridge installation skip to “Installing Jablotron plugin” Connecting to the PiAfter the Pi has booted, open the terminal on MacOs or use an SSH client such as putty on Windows. On MacOS connect via the terminal with the following command: The default password should be “raspberry”. After logging in the first thing we will do is change the password by executing:
Installing Homebridge and required packagesAllright installing Homebirdge can sometimes be a bit difficult, mostly due to different versions of Pi’s, OS’s, etc. So the following steps should help you to get it up and running but its best to check the latest installation guide on and preferably follow that guide: https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi Make sure you are connected to the Pi and execute the following commands one by one:
Install Git:
Install Node:
Set up NPM:
Install Avahi
Install Homebridge
Start Homebridge at boot of the Pi
Edit the file by executing:
Add this line before the exit 0 line:
Press CRTL + X to save and exit. Installing Jablotron pluginAt this moment the package isn’t on npmjs so we will install it from Github by executing the following command:
Creating the homebridge configOn the command line and create the config file:
If the config is empty, add the following to the file, otherwise proceed to changing the credentials:
Configuring Jablotron servicesBased on the output of the configuration tool you can decide what services you add to the configuration. Typically there is single service configured (eg for home) but some people might have more services defined (eg home & office) MAKE SURE YOU HAVE ACCEPTED THE JABLOTRON TERMS OF SERVICE OR YOUR ACCOUNT WILL NOT WORK. Each service needs to be configured following attributes:
Configuring Jablotron sections & accessoriesFor each service there needs to be at least one accessory defined. The available accessories can be obtained using configuration tool The accessories are of 3 types:
The configuration above defines:
Each accessory needs to be configured using following attributes:
Support for partially armed stateIf your Jablotron alarm was configured to support partially armed status, ie where single click on segment's arm key partially arms segment and double click on segment's arm key arms segment fully, you are able to configure the same in Homebridge as well. All you need to know is keyboard key of segment's keyboard. To obtain this information proceed with steps for identifying Jablotron services and devices. Mapping of Security System StatesFor sections you can now override mapping of armed/partially armed states to Homekit states. By default armed state is mapped to Away and partially armed state is mapped to Home in Homekit. For each section you can now define additional 2 attributes:
Each section will appear in Homekit with the right number of states. Without partially armed state it would always appear with Off/"Armed" states With partially armed state it would appear as Off/"Partially Armed"/"Armed" Connecting to HomekitOn the command line, execute:
On your iOS device open “Home”, click on the plus icon in the top right corner, click “add accessory” and scan the QR code displayed in on the command line. Exit homebridge on the command line by pressing CTRL + Z, followed by executing the command:
The Pi will now reboot and after a couple of minutes it will be back online and Homebridge will be up and running. Homekit integrationThe alarm integrates into Homekit as standard security alarm device. Homekit supports 4 states:
Home/Away/Night are all of "On" state and indicate an armed alarm Off indicates disarmed alarm Jablotron alarm supports 3 states only:
Disarmed is mapped to Off in Homekit. Partially armed is mapped to Home in Homekit. Armed is mapped to Away UsageNow that we have connected the Pi to Jablotron and our Homekit we can start to control Jablotron via Homekit but also automate it. The current setup of Jablotron as an Alarm System in Homekit requires user authentication when executing automations. For example when the first person arrives home, turn the alarm off. This will prompt a notification on your iOS device or watch asking if you want to execute this command. This works every time and has the added benefit of being more secure, alternatively it is possible to make the Jablotron alarm appear as a switch and then the automation will work without confirmation. If you want to use Siri for controlling the alarm, you need to create a scene, which switches the alarm on or off and then ask Siri to set that scene. Identify Jablotron services and devicesMake sure all the segments on the Jablotron unit are disarmed prior running this utility - this will ensure keyboard detection for partially armed state works as expected: To identify Jablotron services and devices (segments and PGMs) run the config-helper.js, this will get all services and related segments that are assigned to your account. In case you have an Oasis, add the option
Alternatively you can use the config helper that is deployed on Heroku: Heroku app: https://jablotron-config-helper-api.herokuapp.com Troubleshooting
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论