jasonwilliams 29 Posted June 19, 2019 Share Posted June 19, 2019 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 More sharing options...
Luke 37060 Posted June 19, 2019 Share Posted June 19, 2019 Hi there, to do what exactly? Link to comment Share on other sites More sharing options...
jasonwilliams 29 Posted June 19, 2019 Author Share Posted June 19, 2019 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 More sharing options...
BillOatman 500 Posted June 19, 2019 Share Posted June 19, 2019 (edited) 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 June 19, 2019 by BillOatman Link to comment Share on other sites More sharing options...
jasonwilliams 29 Posted June 19, 2019 Author Share Posted June 19, 2019 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 More sharing options...
BillOatman 500 Posted June 20, 2019 Share Posted June 20, 2019 Took a quick look at that api and it should be possible for someone with the equipment. Link to comment Share on other sites More sharing options...
jasonwilliams 29 Posted June 20, 2019 Author Share Posted June 20, 2019 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 More sharing options...
BillOatman 500 Posted June 20, 2019 Share Posted June 20, 2019 That code would make an excellent jumping off point I would think. Link to comment Share on other sites More sharing options...
jasonwilliams 29 Posted June 21, 2019 Author Share Posted June 21, 2019 (edited) 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 June 21, 2019 by jasonwilliams Link to comment Share on other sites More sharing options...
BillOatman 500 Posted June 21, 2019 Share Posted June 21, 2019 Yes. For an example of a Hue plugin that taps into those events, look here. https://github.com/biofects/emby.plugin.HueControl Link to comment Share on other sites More sharing options...
harrv 88 Posted June 25, 2019 Share Posted June 25, 2019 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. 1 Link to comment Share on other sites More sharing options...
Solution jaaem 4 Posted June 26, 2019 Solution Share Posted June 26, 2019 (edited) 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 June 26, 2019 by jaaem 2 Link to comment Share on other sites More sharing options...
jasonwilliams 29 Posted June 26, 2019 Author Share Posted June 26, 2019 Thanks Jaaem! I just tried and it works perfectly. HA is really awesome, and so is Emby! 1 Link to comment Share on other sites More sharing options...
majorsl 20 Posted September 22, 2019 Share Posted September 22, 2019 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 More sharing options...
jasonwilliams 29 Posted September 23, 2019 Author Share Posted September 23, 2019 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: Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now