1.0.2 • Published 6 years ago

homebridge-homeassistant-schmittx v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 years ago

Home Assistant for Homebridge

Control your accessories from Home Assistant with Siri and HomeKit. Set it up and poof, all of your supported accessories will be instantly controllable via Siri.

Device Support

Home Assistant is a home automation platform already, so this plugin aims to just expose your devices in a way that you can control them with Siri. While you can integrate your accessories into HomeKit for automations, the goals of this plugin are strictly to allow Siri to be a frontend for your accessories.

When you set up the Home Assistant plugin, all you have to do is point it at your Home Assistant server. The plugin pulls all your devices and exposes them automatically. Easy peasey.

The following components are currently exposed:

  • Automation
  • Alarm Control Panel
  • Binary Sensor
  • Climate
  • Cover
  • Device Tracker
  • Fan
  • Group
  • Input boolean
  • Light
  • Lock
  • Media Player
  • Remote
  • Scene
  • Script
  • Sensor
  • Switch
  • Vacuum

Installation

After installing and setting up Homebridge, you can install the Home Assistant plugin with:

npm install -g homebridge-homeassistant-schmittx

Once installed, update your Homebridge's config.json.

You can run sudo npm upgrade -g homebridge-homeassistant-schmittx to upgrade your installation at any time.

Configuration

As with other Homebridge plugins, you configure the Home Assistant plugin by adding it to your config.json.

"platforms": [
  {
    "platform": "HomeAssistant",
    "name": "HomeAssistant",
    "host": "http://127.0.0.1:8123",
    "password": "yourapipassword",
    "supported_types": ["automation", "binary_sensor", "climate", "cover", "device_tracker", "fan", "group", "input_boolean", "light", "lock", "media_player", "remote", "scene", "script", "sensor", "switch", "vacuum"],
    "default_visibility": "hidden",
    "logging": true,
    "verify_ssl": true
  }
]

Components

You can optionally whitelist the components which are exposed to HomeKit with the supported_types array. Just remove a component that you don't want and they will be ignored.

If supported_types is not specified, all supported components will be exposed to HomeKit.

Entities

You can set the default behavior (whitelist vs. blacklist) for how entities are exposed to HomeKit with default_visibility, see example below for usage.

Example

"I want all of my entities to be hidden by default and I'll choose which ones are visible to Homebridge."

"platforms": [
  {
    "default_visibility": "hidden"
  }
]
customize:
  switch.example:
    homebridge_visible: true

"I want all of my entities to be visible by default and I'll choose which ones are hidden from Homebridge."

"platforms": [
  {
    "default_visibility": "visible"
  }
]
customize:
  switch.example:
    homebridge_hidden: true

Note, that visible will be assumed if default_visibility is not set within config.json.

Logging

To avoid too much information in your log, set logging to false as soon as everything works smoothly.

Using with self signed SSL certificates

If you have set up SSL using a self signed certificate, you will need to to set verify_ssl to false in your config.json file to allow bypassing the Node.js certificate checks.

Customization

For proper function within Homebridge, certain attributes must be set for each entity within Home Assistant using the customize feature.

All Components

Required Attributes

    • None

Optional Attributes

  • homebridge_manufacturer set to your choice

  • homebridge_model set to your choice

  • homebridge_name set to your choice

  • homebridge_serial set to your choice

  • homebridge_firmware set to your choice

  • homebridge_hardware set to your choice

Automation

Required Attributes

  • None

Optional Attributes

  • None

Alarm Control Panel

Required Attributes

  • None

Optional Attributes

  • homebridge_alarm_code set to the code as defined in Home Assistant

  • fault set to true or false

  • tampered set to true or false

Binary Sensor

Required Attributes

  • device_class set to gas, moisture, motion, occupancy, opening, or smoke

Optional Attributes

  • homebridge_gas_type set to co2 or co

    • co will be assumed if homebridge_gas_type is not set
  • homebridge_occupancy_type set to occupancy or doorbell

    • occupancy will be assumed if homebridge_occupancy_type is not set
  • active set to true or false

  • fault set to true or false

  • tampered set to true or false

  • low_battery set to true or false

Required Attributes for Optional Battery Tracking

  • battery_level set to percentage value, 0-100

  • battery_charging set to true or false

Optional Attributes for Optional Battery Tracking

  • low_battery set to true or false

Climate

Required Attributes

  • None

Optional Attributes

  • homebridge_climate_fan set to true for manual control of fan (applicable to Nest thermostats only at the moment)

  • homebridge_climate_type set to nest_thermostat for full support of Nest thermostats

Cover

Required Attributes

  • device_class set to garage or window

  • homebridge_window_type set to window or window_covering if device_class is set to window

Optional Attributes

  • obstruction_detected set to true or false
    • For garage doors only, false will be assumed if obstruction_detected is not set

Device Tracker

Required Attributes

  • None

Optional Attributes

  • active set to true or false

  • fault set to true or false

  • tampered set to true or false

  • low_battery set to true or false

Required Attributes for Optional Battery Tracking

  • battery_level set to percentage value, 0-100

  • battery_charging set to true or false

Optional Attributes for Optional Battery Tracking

  • low_battery set to true or false

Fan

Required Attributes

  • None

Optional Attributes

  • speed set to percentage value, 0-100

  • direction set to clockwise or counter_clockwise

Group

Required Attributes

  • None

Optional Attributes

  • None

Input Boolean

Required Attributes

  • None

Optional Attributes

  • None

Light

Required Attributes

  • None

Optional Attributes

  • homebridge_max_mireds set to integer value

  • homebridge_min_mireds set to integer value

Lock

Required Attributes

  • None

Optional Attributes

  • homebridge_lock_code set to the code as defined in Home Assistant

Required Attributes for Optional Battery Tracking

  • battery_level set to percentage value, 0-100

  • battery_charging set to true or false

Optional Attributes for Optional Battery Tracking

  • low_battery set to true or false

Media Player

Required Attributes

  • None

Optional Attributes

  • homebridge_media_player_type set to on_off, play_pause, or play_stop

Required Attributes for Optional Speaker Control

  • homebridge_speaker_type set to mute or volume

  • is_volume_muted set to true or false

  • volume_level set to decimal value, 0-1

Remote

Required Attributes

  • None

Optional Attributes

  • None

Scene

Required Attributes

  • None

Optional Attributes

  • None

Script

Required Attributes

  • None

Optional Attributes

  • None

Sensor

Required Attributes

  • None

Optional Attributes

  • homebridge_sensor_type set to air_quality, co2, co, humidity, light, nest_protect, or temperature

  • active set to true or false

  • fault set to true or false

  • tampered set to true or false

  • low_battery set to true or false

Required Attributes for Optional Battery Tracking

  • battery_level set to percentage value, 0-100

  • battery_charging set to true or false

Optional Attributes for Optional Battery Tracking

  • low_battery set to true or false

Switch

Required Attributes

  • None

Optional Attributes

  • homebridge_switch_type set to fan, light, or outlet

  • outlet_in_use set to true or false

Vacuum

Required Attributes

  • None

Optional Attributes

  • None

Contributions

  1. Fork
  2. Create a feature branch
  3. Open a pull request