Jump to content

Vera Home Automation Plugin (Emby Vera)


chef

Recommended Posts

chef

post-27-0-90908900-1428539821_thumb.png post-27-0-27426000-1428540732_thumb.png

 

Emby sets the Scene with 'Emby Vera'

 

Vera lite Ui5 and Ui7 Compatible

 

 

 

Do you use Home Automation?

 

Do you use Vera Products to trigger z-wave Device events in your home? 

 

Then try playing with this plugin.

 

 See to it that you have the Emby Device you want to use to trigger the events in your Home Automation on, and some scenes created in your Vera Device.

 

 

Select your Emby Ready Network Device:

1.png

 

Add it to the List 

 

2.png

 

CLick on your newly saved Device item, and start  to add Vera Scenes to Media Browser Events.

 

Remember to Press Save!

3.png

 

 

 

Sweet, I tried to make it simple!

 

Yep, you bloody right it might be buggy! But, I've been having so much fun with this plugin I had to share it.

 

Tell me if you like it, or of you think it needs to be fixed. Well besides the obvious fixes which I am aware of.

 

https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip

 

Have fun.

Edited by chef
  • Like 7
Link to comment
Share on other sites

Xzener

Chef,

 

Congrats getting your plugin to a usable state! Although I am having issues.

 

First of all, not sure what this is??

5516e7c6ee7d4_Capture.png

 

I successfully saved a client, but when I select it to add Vera functionality, it wont save...

 

5516e87a9b409_Capture.png

Here is the client after clicking "Save" and returning to it...

 

5516e8cc4f48a_Capture.png

 

Also, it seems I have to click "Back" twice at the Vera Dashboard page in order to get back to the main plugin menu.

Edited by Xzener
Link to comment
Share on other sites

chef

Yeah, the radio button is going to be for ignoring music playback events.

Link to comment
Share on other sites

chef

So the saved playback scenes are not showing in the ui?

Did you select and set up the entire room before you clicked save?

I forgot to mention that you want to do that.

In other words, choose all the scenes you want for all the events listed, and then press save.

For example in this image, I have set up my playback Started events and Stoppped events. But have left the other two events empty before I press Save:

 

3.png

 

 

 

You can delete the device entry from the main config page and start it again.

I hope that is what you mean.

Edited by chef
Link to comment
Share on other sites

Xzener

I did not click an unused selection... I simply clicked "Black Lights Off" for the play option and clicked save. Lemme attempt it again. May I recommend a "do nonothing" added to the drop down, otherwise others will have my same issue.

 

Edit: Just tried again... Its not saving my scenes to be used for playback triggers.

 

Any ideas??

Edited by Xzener
Link to comment
Share on other sites

chef

Okay, not saving them in the ui, when you return to the page? Or not saving to the "configuration" folder xml file properly.

 

I can not recreate this.

Link to comment
Share on other sites

wraslor

I'm only using the playback paused and unpaused part but I can confirm it doesn't save the unpaused trigger but the paused trigger does save.

 

"Edit" It does not save to the xml file nor show up in the ui.

Edited by wraslor
Link to comment
Share on other sites

Xzener

I cant explain it... But its working now. All I do know is Firefox in my theater room wasn't allowing the save. I logged in directly to my server, IE allowed it to save. That is all that was different.

 

Ok...

 

MBC, not working. I set the plugin to send the "Black Lights Off" command when playback starts, and "On" when it stops. Neither command is sent.

 

MBT working, although my video backdrops plugin is screwing things up. When I click "Play" while a video backdrop is already playing, the black lights come on while the movie starts. I guess the plugin senses the video backdrop playback stopping, sending the "Black Lights On" command. 

 

I know this may be difficult... But is there any way to ignore the video backdrop plugin??

 

By the way... BRILLIANT WORK CHEF!!!! Loving it!!

Link to comment
Share on other sites

chef

Here, I know why your not saving properly.

 

Once you have selected a Device on the main page, and it has been added to the main pages list of devices.

Press save.

 

1%20-%20Copy.png

 

 

 

 

Once the list of Devices has been saved on the main page, now you can click on them to enable Scene editing properly.

 

If you don't save the main pages list before you enter the Scene editing, the scene information will not save either.

 

I suppose I could auto save the main page...

Link to comment
Share on other sites

chef

I'm only using the playback paused and unpaused part but I can confirm it doesn't save the unpaused trigger but the paused trigger does save.

 

"Edit" It does not save to the xml file nor show up in the ui.

 

Playaback pause and Unpause might not work properly. PlaybackStart and Stop will work best at the moment.

 

I know about this. Thank you wraslor!

Edited by chef
Link to comment
Share on other sites

chef

So, we have found out that some of the Javascript and JQuery is not working the best in some browsers. Which means we'll have to look at the code, and write some cross browser code to make it work.

 

I have read articles which describe things like this happening.

 

In the meantime, perhaps it would be best to use Chrome browser which seems to be working best.

 

And yes we can ignore Intro plugin videos... I think.

Edited by chef
Link to comment
Share on other sites

wraslor

Playaback pause and Unpause might not work properly. PlaybackStart and Stop will work best at the moment.

 

I know about this. Thank you wraslor!

Does it read start and stop with play and pause?  What i mean is with my setup I have it set to lights off on mb start and on when you exit mb.  I want it to bring the lights up half when I pause and back off when I resume.

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

chef

Does it read start and stop with play and pause?  What i mean is with my setup I have it set to lights off on mb start and on when you exit mb.  I want it to bring the lights up half when I pause and back off when I resume.

 

Yeas You'll have to create a scene for your lights to be dimmed half way, but Once I wire up the Pause and Unpause events, that won't be a problem.

Link to comment
Share on other sites

chef

@@wraslor !! this one handles Playback Paused and Unpaused events!

 

https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip

 

There is a small delay because there isn't actually any formal events for Playback Paused and Unpaused. So, i check the Playback Progress to see if the server is reporting a stand still in media. If it is we trigger our own event, and the same for when the media has Unpaused.

 

This is why it wasn't wired up at first, we had to make sure we weren't polling for the wrong Progress and stuff.

 

 

I'll add the awesome plugin icons that xzener made next!

Edited by chef
Link to comment
Share on other sites

techywarrior

Is there anything in this plugin that allows the Vera to control MB?

 

For example, some LUA code on Vera to an HTTP receiver (no authentication) on the Emby Server to:

  • Launch Emby for WMC
  • Tune to Live TV Channel X
  • Play Music Playlist Y

I guess it would be mostly preconfigured "remote commands or Macros" that can be triggered from any HA system that can use an HTTP request to control Emby Server.

Cheers!

That would really require a plugin written for the Vera. It's a completely separate thing.

Link to comment
Share on other sites

chef

Sweet! Techy warrior. Even if the plugin is a little bit buggy right now, it could not have been even remotely possible with out your patients.

Edited by chef
Link to comment
Share on other sites

chef

Working on it.

 

and Intros too.

 

I think the only way to ignore video backdrops is to tell it to ignore video which has a runtime under a certain amount of ticks.

I think we can ask the api how long the media file is, and then ignore short/small media files.

Edited by chef
Link to comment
Share on other sites

chef

So you would like Vera to control mb.

 

I think we would have to authenticate a user to allow mb to listen to more then just pubic userdto requests, but if you could give me an example of a situation you would like to control mb with Vera, I ahave learned that anything is possible when writing code.

 

I should mention that I don't currently have a dedicated theatre room, but have the lights dim in my front room when a media item starts.

 

I was thinking about add some specific functionality to the plugin regarding TV, movies, audio.

 

Also perhaps time of day functions when certain scene request would be ignored by media browser.

 

I am up for anything really.

 

But I should mention also @@AgileHumor that current the ugin is only set up for 1 Vera device.

I was wondering if people ran two.

 

I could implement two, but just one for now I think.

Edited by chef
Link to comment
Share on other sites

chef

Working on it.

 

and Intros too.

 

I think the only way to ignore video backdrops is to tell it to ignore video which has a runtime under a certain amount of ticks.

I think we can ask the api how long the media file is, and then ignore short/small media files.

Oh but, with intros.. Do we do we wait for the feature film to start? Or do we ignore the feature film and run the scene when the intro starts?

 

Hmm... Or do we get super complicated and allow for a scene to run for both. Lol!

Edited by chef
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...