Home Assistant is an open-source home automation platform that you can run yourself on a Raspberry Pi or a spare computer in your home. Home Assistant is an open-source alternative to commercial smart home hubs like SmartThings. Hass.io is the most popular way to install and run Home Assistant on a Raspberry Pi.
After HASS version .60 or later we highly recommend the Konnected Component documentation on the Home Assistant website.
- Install Home Assistant using Hass.io or any other installation method.
- Edit your Home Assistant configuration.yml and add discovery: to enable discovery, and add a konnected section to configure your Konnected devices and the sensors attached to each zone/pin. The configuration structure looks like this:
# enable discovery by adding the following line discovery: konnected: access_token: insert-a-random-string-here devices: - id: 6001948bcd53 binary_sensors: - zone: 1 type: door name: 'Front Door' - zone: 3 type: motion name: 'Test Motion' switches: - zone: out name: siren - zone: 5 name: 'Beep Beep' momentary: 65 pause: 55 repeat: 4 - zone: 5 name: Warning momentary: 65 pause: 55 repeat: -1 - id: 5ccf7f438a38 binary_sensors: - pin: 1 type: motion name: 'Office Motion' - pin: 2 type: door name: 'Office Door' - pin: 3 type: smoke name: Smoke Alarm inverse: true switches: - pin: 5 name: 'Garage Door' activation: low momentary: 500 - pin: 8 name: LED Light
The access_token key can be any random string. This is used to ensure that only those devices which you have configured can authenticate to Home Assistant to change a device state. For security, we recommend using secrets.yaml to specify this.
The devices key under the konnected section represents a list of Konnected devices that you have on your network. Each NodeMCU WiFi module is considered a device.
The device id is based on the MAC address of the WiFi module with colons/punctuation removed. Must be the full 12-character MAC address with all lowercase letters and numbers. You can find the MAC address by looking in your router's listing of devices connected to your WiFi.
Nested under the devices list should be a section for binary_sensors and optionally switches.
For binary_sensors, use zone (for the Konnected branded Alarm Panel hardware) or pin (for the generic NodeMCU pinout) to specify the sensors connected to each zone/pin. Do NOT use both zone and pin in the same device configuration. Type can be any of the Binary Sensor types built in to Home Assistant. Name is a descriptive name that you choose that represents your device. Sensors can be attached to zones 1 - 6 on the Konnected branded hardware which correspond to pins D1, D2, D5, D6, D7 and RX respectively on the generic NodeMCU breakout board. Note that when specifying pins, use only the digit. Pin RX is represented as 9.
For switches, use zone or pin similarly to specify the device connected to each. In the case of actuators, a type is not needed, it will show up as a generic on/off switch in Home Assistant. You can also specify an activation key which can be either "low" or "high" (or 0 or 1) to specify the activation state of the attached device (default is high). On the Konnected branded boards, use zone: out to represent the dedicated siren output or OUT terminal. On the generic NodeMCU board, pins D1, D2, D5, D6, D7 and D8 are usable as actuators.
Set api_host only if you've also set base_url in your Hass configuration to an external facing hostname. This should be set to the internal host or IP address & port of Home Assistant using http (not https). For example: http://192.168.100.110:8123
This ensures that Konnected talks to Hass exclusively over your local LAN and isn't dependent on DNS or the internet. -
Ensure that your Konnected devices are connected to your WiFi network and restart Home Assistant. Within a minute or two Home Assistant should discover your devices on the network and automatically sync your configuration settings from Home Assistant to the Konnected device. Your configured sensors should appear automatically on the Home Assistant dashboard. After the initial sync, the Konnected device will instantly update Home Assistant any time the sensor status changes.
Normally Open vs Normally Closed sensors
By default, a binary sensor will report as closed/off when the sensor circuit is closed, and open/on when the sensor circuit is broken. This works for most security system sensors, but sometimes you may need to invert this logic. A common example is a normally open smoke alarm loop. Starting in Home Assistant 0.79, add inverse: true to the binary_sensor device configuration to invert the on/off states.
Momentary and Beep/Blink switches
In Home Assistant version 0.77 and above, configure a momentary or beep/blink switch using the momentary, pause, and repeat values in each switch config.
momentary is specified in milliseconds and defines the duration of a momentary switch actuation.
pause is specified in milliseconds and defines the pause between momentary actuations when used with momentary and repeat.
repeat defines the number of times to repeat the momentary pulse. For example, to make three beeps, set repeat to 3. Set this value to -1 for an infinitely repeating pulse until turned off. This is useful for a warning or alarm.
Configuring Home Assistant as an alarm system
Now that you've got your sensors and siren talking to Home Assistant, there are a few ways to use it as an alarm system.
Known Issues and Limitations
- Version 2.1.1 or newer of the Konnected device software is required for Home Assistant discovery to work.
- If base_url is set in your Hass configuration, this address must be accessible internally as well because Konnected will use this host to communicate with Hass. In Hass 0.72 an api_host configuration option was added to work around this.
- May not work with SSL/TLS enabled on Home Assistant itself. Use a reverse proxy to serve HTTPS instead.
Feedback & Questions
Don't be shy if you have questions, feedback or problems. First, try posting in the Home Assistant forum category. You can also contact us here.
Open Source Contributions
We welcome open source contributions from developers like you! If you're interested in helping with the Konnected Home Assistant integration, feel free to dive into the code and submit a pull request or contact us first for guidance and ideas of what to work on. Notable contributions will be rewarded with free Konnected swag, hardware, and/or public praise!
- Konnected's Home Assistant fork -- active development here
- Konnected Python library
- Konnected NodeMCU software