homebridge-homeassistant-schmittx v1.0.2
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 choicehomebridge_model
set to your choicehomebridge_name
set to your choicehomebridge_serial
set to your choicehomebridge_firmware
set to your choicehomebridge_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 Assistantfault
set totrue
orfalse
tampered
set totrue
orfalse
Binary Sensor
Required Attributes
device_class
set togas
,moisture
,motion
,occupancy
,opening
, orsmoke
Optional Attributes
homebridge_gas_type
set toco2
orco
co
will be assumed ifhomebridge_gas_type
is not set
homebridge_occupancy_type
set tooccupancy
ordoorbell
occupancy
will be assumed ifhomebridge_occupancy_type
is not set
active
set totrue
orfalse
fault
set totrue
orfalse
tampered
set totrue
orfalse
low_battery
set totrue
orfalse
Required Attributes for Optional Battery Tracking
battery_level
set to percentage value, 0-100battery_charging
set totrue
orfalse
Optional Attributes for Optional Battery Tracking
low_battery
set totrue
orfalse
Climate
Required Attributes
- None
Optional Attributes
homebridge_climate_fan
set totrue
for manual control of fan (applicable to Nest thermostats only at the moment)homebridge_climate_type
set tonest_thermostat
for full support of Nest thermostats
Cover
Required Attributes
device_class
set togarage
orwindow
homebridge_window_type
set towindow
orwindow_covering
ifdevice_class
is set towindow
Optional Attributes
obstruction_detected
set totrue
orfalse
- For garage doors only,
false
will be assumed ifobstruction_detected
is not set
- For garage doors only,
Device Tracker
Required Attributes
- None
Optional Attributes
active
set totrue
orfalse
fault
set totrue
orfalse
tampered
set totrue
orfalse
low_battery
set totrue
orfalse
Required Attributes for Optional Battery Tracking
battery_level
set to percentage value, 0-100battery_charging
set totrue
orfalse
Optional Attributes for Optional Battery Tracking
low_battery
set totrue
orfalse
Fan
Required Attributes
- None
Optional Attributes
speed
set to percentage value, 0-100direction
set toclockwise
orcounter_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 valuehomebridge_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-100battery_charging
set totrue
orfalse
Optional Attributes for Optional Battery Tracking
low_battery
set totrue
orfalse
Media Player
Required Attributes
- None
Optional Attributes
homebridge_media_player_type
set toon_off
,play_pause
, orplay_stop
Required Attributes for Optional Speaker Control
homebridge_speaker_type
set tomute
orvolume
is_volume_muted
set totrue
orfalse
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 toair_quality
,co2
,co
,humidity
,light
,nest_protect
, ortemperature
active
set totrue
orfalse
fault
set totrue
orfalse
tampered
set totrue
orfalse
low_battery
set totrue
orfalse
Required Attributes for Optional Battery Tracking
battery_level
set to percentage value, 0-100battery_charging
set totrue
orfalse
Optional Attributes for Optional Battery Tracking
low_battery
set totrue
orfalse
Switch
Required Attributes
- None
Optional Attributes
homebridge_switch_type
set tofan
,light
, oroutlet
outlet_in_use
set totrue
orfalse
Vacuum
Required Attributes
- None
Optional Attributes
- None
Contributions
- Fork
- Create a feature branch
- Open a pull request