I’ve seen some interest in using Jasper (an open-source voice assistant similar to the Amazon echo) with HA. With a little work, I was able to get HA and Jasper working together (both ways).
To use this you will need to be using the dev version of Jasper (ie: Jasper 2.0).
To set up Jasper to HA
The following Jasper dev plugin can be used to call on HA’s conversation component. Note that HA’s conversation component is very basic in its current form. It only supports “Turn [device name] on/off”.
https://github.com/Theb-1/jasper-client/tree/jasper-dev-custom/plugins/speechhandler/homeassistant
Add the following to Jasper’s profile.yml:
HomeAssistant:
Host: [HA hostname or IP]
Password: [HA API password]
You should now be able to tell Jasper, “Turn the kitchen light on”, and have HA turn on the kitchen light.
To set up HA to Jasper
I have modified the Jasper dev branch to include a Restful API:
https://github.com/jasperproject/jasper-client/pull/439
Add the following to Jasper’s profile.yml:
restapi:
Host: 0.0.0.0
Add the following to HA’s configuration.yaml:
notify:
platform: rest
name: 'Jasper'
resource: 'http://Jaspers_hostname_or_IP:5000/jasper/say'
method: 'post_json'
message_param_name: 'text'
Example Automation
This will have Jasper announce an entry through the garage door if the alarm is currently set to Armed-Home mode (ie: when everyone is home and sleeping)
- alias: Alarm Entry Alert - Garage Door
trigger:
platform: state
entity_id: binary_sensor.garage_door
state: 'on'
condition:
- platform: state
entity_id: alarm_control_panel.alarm
state: 'armed_home'
action:
service: notify.Jasper
data:
message: 'alert, entry detected at garage door'
Hopefully someone else will find this useful. Happy Automating