Jump to content

Home Assistant


jasonwilliams
Go to solution Solved by jaaem,

Recommended Posts

jasonwilliams

Hello,

 

I see there is a integration to control Emby from HA and I'm wondering if anybody would consider writing a plugin to control HA from Emby.  

Link to comment
Share on other sites

jasonwilliams

To do pretty much exactly what Chef's Vera plugin does.   Example would be trigger a script in HA when you press Play in Emby to turn off the lights, close the blinds, etc...

Link to comment
Share on other sites

BillOatman

I assume you mean google home assistant?

Does it allow programs to send it non verbal commands?  I have the amazon echo devices, and they don't.

I have seen people have apps that when sent commands, speaks the command that the echo or HA   Not sure how else you would do this.

 

Probably better off having the Emby plugin control the lights, blinds, etc directly. Some lights have plugins already that do that.

Edited by BillOatman
Link to comment
Share on other sites

jasonwilliams

Looks like it should be possible through the API:

 

https://developers.home-assistant.io/docs/en/external_api_rest.html

 

My lights and blinds are Z-Wave, so they can only be controller through a Z-Wave Compatible controller (like Vera or SmartThings).  I'm migrating from Vera because of long term stability issues with the platform.  There also seems to be a vibrant developer community for HA and its completely open.

Link to comment
Share on other sites

BillOatman

Took a quick look at that api and it should be possible for someone with the equipment.

Link to comment
Share on other sites

jasonwilliams

I might take a stab at this, although I'm rusty.  Perhaps @@chef might be interested in some collaboration since he already has this working for Vera?

Link to comment
Share on other sites

BillOatman

That code would make an excellent jumping off point I would think.

Link to comment
Share on other sites

jasonwilliams

I'll post over in the HA community forum and gauge the interest, althought I might just build it for myself :)

 

I'm rusty, so please forgive terminology, but I have a question:

 

Is the Emby api two-way?  Can it notify when an action occurs (like play, pause) through an exposed requester?

Edited by jasonwilliams
Link to comment
Share on other sites

harrv

I assume you mean google home assistant?

 

You probably know this already now, since your conversation continued, but Google Home and Home Assistant are two different things. Home Assistant is an opensource project that helps integrate and control a lot of things/devices in the home and isn't directly related to Google Home.

  • Like 1
Link to comment
Share on other sites

  • Solution

If you do mean homeassistant (https://www.home-assistant.io/), then there is no need for a new plugin. As you stated, Emby is already supported. https://www.home-assistant.io/components/emby/

 

If you want to "control HA from Emby", all you need to do is create an automation to trigger off a state change. I did a quick test and it works fine.

Setup Emby in Homeassistant.

 

Make a new automation in the homeassistant gui: Configuration->Automations

Trigger Type: State

entity: media_player.emby_androidtv_livingroom_firetv (or whatever the your emby player is called)

from: paused

to: playing

 

You may need to add another trigger from standby to playing.

 

 

Trigger

Action Type: Call Service

Service: light.turn_off

data:

{

  "entity_id": "light.living_room"
}

 

repeat this for anything else you want to turn off.

Edited by jaaem
  • Like 2
Link to comment
Share on other sites

jasonwilliams

Thanks Jaaem!  I just tried and it works perfectly.  HA is really awesome, and so is Emby!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Funny, I was just looking to do this today with my new HA build and here is this thread.  Thanks!  Is there a list of state changes somewhere?  Obviously above, "playing", "paused"....

Link to comment
Share on other sites

jasonwilliams

Yup. It uses the media_player service, so you can create automations in the GUI based on those events.  For example, I have an automation to turn off the lights when the media player state changes from "idle" to "playing".   Here's a screenshot:

 

5d88ec4397125_Capture.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...