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-schmittxOnce 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: trueNote, 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_manufacturerset to your choicehomebridge_modelset to your choicehomebridge_nameset to your choicehomebridge_serialset to your choicehomebridge_firmwareset to your choicehomebridge_hardwareset to your choice
Automation
Required Attributes
- None
Optional Attributes
- None
Alarm Control Panel
Required Attributes
- None
Optional Attributes
homebridge_alarm_codeset to the code as defined in Home Assistantfaultset totrueorfalsetamperedset totrueorfalse
Binary Sensor
Required Attributes
device_classset togas,moisture,motion,occupancy,opening, orsmoke
Optional Attributes
homebridge_gas_typeset toco2orcocowill be assumed ifhomebridge_gas_typeis not set
homebridge_occupancy_typeset tooccupancyordoorbelloccupancywill be assumed ifhomebridge_occupancy_typeis not set
activeset totrueorfalsefaultset totrueorfalsetamperedset totrueorfalselow_batteryset totrueorfalse
Required Attributes for Optional Battery Tracking
battery_levelset to percentage value, 0-100battery_chargingset totrueorfalse
Optional Attributes for Optional Battery Tracking
low_batteryset totrueorfalse
Climate
Required Attributes
- None
Optional Attributes
homebridge_climate_fanset totruefor manual control of fan (applicable to Nest thermostats only at the moment)homebridge_climate_typeset tonest_thermostatfor full support of Nest thermostats
Cover
Required Attributes
device_classset togarageorwindowhomebridge_window_typeset towindoworwindow_coveringifdevice_classis set towindow
Optional Attributes
obstruction_detectedset totrueorfalse- For garage doors only,
falsewill be assumed ifobstruction_detectedis not set
- For garage doors only,
Device Tracker
Required Attributes
- None
Optional Attributes
activeset totrueorfalsefaultset totrueorfalsetamperedset totrueorfalselow_batteryset totrueorfalse
Required Attributes for Optional Battery Tracking
battery_levelset to percentage value, 0-100battery_chargingset totrueorfalse
Optional Attributes for Optional Battery Tracking
low_batteryset totrueorfalse
Fan
Required Attributes
- None
Optional Attributes
speedset to percentage value, 0-100directionset toclockwiseorcounter_clockwise
Group
Required Attributes
- None
Optional Attributes
- None
Input Boolean
Required Attributes
- None
Optional Attributes
- None
Light
Required Attributes
- None
Optional Attributes
homebridge_max_miredsset to integer valuehomebridge_min_miredsset to integer value
Lock
Required Attributes
- None
Optional Attributes
homebridge_lock_codeset to the code as defined in Home Assistant
Required Attributes for Optional Battery Tracking
battery_levelset to percentage value, 0-100battery_chargingset totrueorfalse
Optional Attributes for Optional Battery Tracking
low_batteryset totrueorfalse
Media Player
Required Attributes
- None
Optional Attributes
homebridge_media_player_typeset toon_off,play_pause, orplay_stop
Required Attributes for Optional Speaker Control
homebridge_speaker_typeset tomuteorvolumeis_volume_mutedset totrueorfalsevolume_levelset 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_typeset toair_quality,co2,co,humidity,light,nest_protect, ortemperatureactiveset totrueorfalsefaultset totrueorfalsetamperedset totrueorfalselow_batteryset totrueorfalse
Required Attributes for Optional Battery Tracking
battery_levelset to percentage value, 0-100battery_chargingset totrueorfalse
Optional Attributes for Optional Battery Tracking
low_batteryset totrueorfalse
Switch
Required Attributes
- None
Optional Attributes
homebridge_switch_typeset tofan,light, oroutletoutlet_in_useset totrueorfalse
Vacuum
Required Attributes
- None
Optional Attributes
- None
Contributions
- Fork
- Create a feature branch
- Open a pull request