Jump to content

Server- Home Automation (HA) Plugin


Xzener

Recommended Posts

Xzener

I know for a fact this is possible. If EG can do it, why not MBS. Is it possible to see how the EG python script is sending commands by looking at the code??

Link to comment
Share on other sites

I also have a vera and was looking for an easy HA integration solution from MBT.  I was looking at the program launcher app with seperate scene commands for every action that I would want.  This would require a seperate icon and seperate command for each scene you wish to automate.

 

However I am starting to watch OpenHab http://www.openhab.org// as it is growing very quickly.  It is open source and platform independent.  Some vera developers already have developed vera integration into it.  It also supports many different protocols / bindings

If I was to dream, I would wish for a MediaBrowser Theater user interface into OpenHab

Link to comment
Share on other sites

snazy2000

I currently use Vera to control about 300 devices in my home to control and monitor power Z-Wave + Other devices via plugins (IR Blaster for TV's, Motorized Blinds, Philips Hue). It's a cheap but powerful device. Motion controls 100% of my home. I'm also transitioning to OpenHab, but it's not as easy as Vera or a Vera Addon PLEG. I'm using it for reporting and graphing primarily to keep the load off the Vera.

 

I have the MB Server + WMC + MBC fed to all the TV's in every room in the house via a 1x8 HDMI switch to provide the "main" feed that follows you through the home. Also, each TV is a Samsung so I can push DLNA using Mobile Client or use the Samsung App if I want discreet TV to a particular room.

 

Overall, my main desire is to control MB from the Vera using simple HTTP commands (mentioned on this thread). My end goal would be for me to start a Media Browser Plus Smart List when I arrive home. I thought VoxCommando would do this and donated $250 to get it working...sadly, it doesn't talk to MB Plus and there is no way to run a SmartList.

 

As for an HA UI in MB, I think so many have tried and failed. It's just so much quicker to use a smartphone or $50 tablet to turnoff the backyard light than the 20+ clicks your TV remote will need. I had MControl which had a WMC interface when I installed my HA system and never used it (YMMV). Most HA has the concept of scenes, so one HTTP request to an HA controller will then set multiple devices to pre-configured values.

 

For those looking to control HA (like Vera) from MB (as mentioned by most folks in this thread), I think the best options for HA integration would be more:

  • Allowing Each Device (TV, MBC, DLNA TV) to have the ability for custom commands (just HTTP request with a specifically formatted URL works for 99% of HA I've seen):
    • Replace Command - Volume Up or Down in Mobile Client actually replaced with HTTP command to Vera that controls a receiver via IR. (i.e. it wouldn't change the volume of the DLNA device, it would be replaced with X http command)
    • In Addition to Command - Play/Pause can fire other commands in addition to performing the normal MB functionality.
  • Have specific events state fire an HTTP request (Play, Pause, etc). I honestly don't do anything for play pause. MB Plus next episode would go nuts turning lights on and off or raising blinds of the pause/stop between episode.
  • Add some "wildcard buttons" to the device remotes in the mobile cleints. At the end of the day, most folks want predictaility. Having 4 buttons (red, yellow, green, blue) to control 4 types of scenes desired would be swell for each device your controlling (i.e. when controlling living room tv device in remote client, the red button would run HA scene X.
Cheers!

 

PS - CastleOS is no where near a mature platform in the HA world. I wouldn't depend on any one provider to expose some HA functionality.

 

PSS - Vera plugins I use (all free):

  • Philips Hue 1.4*
  • Nest Thermostat and Protect 1.8*
  • Russound Whole Home Audio
  • Wunderground Weather Plugin
  • Garage Door Virtual Switch
  • Global Cache GC100 IT Blaster
  • IP Camer
  • Somfy Universal RTS Interface Motirized Blinds
  • Virtual ON/OFF Switches
  • Program Logic Core
  • Ping Sensor
  • Program Logic Event Generator
  • Day or Night
  • WakeUp Light
  • Simple Alarm Plugin
  • Battery Monitor
  • System Monitor
  • VeraAlerts
  • OpenSprinkler
  • and many more @ https://apps.mios.com/

PSSS - I've attached some samples of the Vera/PLEG logic that control my home. You'll notice a lot of HTTP requests to WMC to show camera on motion or doorbell, camera recording, and TTS to the whole home audio. Hopefully this will show you what the potential is to control the home and how HTTP requests help tie you to external systems (when plugins are not available).

 

http://1drv.ms/1FZZp7V

You should make a thread about your house! sounds really intresting!!
Link to comment
Share on other sites

@@Xzener

 

It looks a as though binding to server events through a plugin isn't possible... ??

 

Unless perhaps snazy knows of a way...

 

So in other words, we could produce a standalone app which binds to server events and runs as a service, communicating events to zwave/ Vera/ Eventghost.

 

Is that a good idea? Should we proceed in this direction, or not? It would take long to get something together, but it would take time to write.

 

What is the consenus here from the people in the is thread?

 

A standalone app, not a server plugin.

Edited by chef
Link to comment
Share on other sites

@@chef and @@Xzener, VoxCommando might be a good bet. @@jitterjames (the dev) would just need to add the event parts to take action. I know VOX already is an Event Engine (integrates with Vera, MB, etc) and already has control of MB.

 

However, I just wanted to ask again...what MB events would you use to control your HA? (vs using your HA to control your MB).

 

The only thing I would like is something telling me when a video program is playing (vs music) so that I would suppress IR blaster to turn the TV on on motion...and just turn on the overhead speakers.

 

It sounds cool, but in my experience, unless it's a dedicated theater room....changing the lights when the EVERY time the program ends/pauses automatically is normally not desired by most wives. However, using VoxCommando "hook" plugin today, I can take over buttons on the MCE remote (i use the numbers) to replace them with HA commands (i.e 1 disables motion control, 2 turns on lights, 3 dims lights, etc).

 

Just my two cents.

VoxCommando does a good job, but I thought is was based on speech recognition.

 

I was under the impression we were attempting to build an app that watched for playback commands from MB and made an action.

Link to comment
Share on other sites

techywarrior

My HA setup at the moment is rather simple. I'd be happy with having MB pass a command to the Vera when play/pause is pressed to always run a specific scene.

 

If Chef is correct and you can't tap into the play/pause event in MBS then the plugin route wouldn't work at all though.

Link to comment
Share on other sites

@@chef and @@Xzener, VoxCommando might be a good bet. @@jitterjames (the dev) would just need to add the event parts to take action. I know VOX already is an Event Engine (integrates with Vera, MB, etc) and already has control of MB.

 

However, I just wanted to ask again...what MB events would you use to control your HA? (vs using your HA to control your MB).

 

The only thing I would like is something telling me when a video program is playing (vs music) so that I would suppress IR blaster to turn the TV on on motion...and just turn on the overhead speakers.

 

It sounds cool, but in my experience, unless it's a dedicated theater room....changing the lights when the EVERY time the program ends/pauses automatically is normally not desired by most wives. However, using VoxCommando "hook" plugin today, I can take over buttons on the MCE remote (i use the numbers) to replace them with HA commands (i.e 1 disables motion control, 2 turns on lights, 3 dims lights, etc).

 

Just my two cents.

VoxCommando does a good job, but I thought is was based on speech recognition.

 

I was under the impression we were attempting to build an app that watched for playback commands from MB and made an action.

Link to comment
Share on other sites

techywarrior

Well, I think the whole point is to remove the extra app from the equation. There already seem to be apps that could be used. To me at least, the benefit is in removing an extra app and just integrating into MBS. Is this something that Luke can expose to allow these sorts of plugins? (that's a question for Luke to answer)

  • Like 1
Link to comment
Share on other sites

You can monitor server events.  Exactly which ones I'm not positive but you can definitely monitor several via a plug-in.  You would just need to inject the proper manager in your server entry point constructor and then subscribe to events on that item.

Link to comment
Share on other sites

jitterjames

VoxCommando already generates events based on MB server/clients.  For example any time a new media item starts playing an event is generated.  We are using this to announce when a new music track starts playing, but you can also use this with various plugins in VoxCommando to control home automation stuff.

 

There are also events generated when playback stops but there does not appear to be any event for pause.  Perhaps this could be added to the MB api, but I don't know what would be involved.  It is quite possible that the server does not know when a client has paused so it would require changes to the server and api and to all clients.

 

The events generated may vary somewhat depending on which client you are using.  For example, dashboard does not generate an event when a preview trailer starts playing before a movie, but MBC does.  When you queue up a bunch of music, most clients will generate a stop event followed by a start event for each track, but MBC only generates one for the first song.

 

Playback start events generally carry additional information such as the media type, the title, the library ID, and in the case of music the album and artist.

 

If the MB api provides more events I will be happy to add them to VoxCommando.

 

There may be some events still that I have not tapped into such as for volume changes (I'm really not sure, need to check) but nothing major AFAIK.

Link to comment
Share on other sites

jitterjames

 

My dream is for me to come homand for my my HTPC ask if I want to watch comedy reruns (and MB Plus Smartlist)....if @[member="ebr" ever exposes MB Plus smartlists as native playlist to be used in other clients or apps like VOX).

 

Hopefully we will eventually get access to this, although I think it requires more than an update by ebr because the server API currently makes no provisions for communication with plugins, if I understand correctly.

 

However, to some extent it should be possible to define our own smart playlists in VoxCommando (without the need for any other plugins) and call them up directly.  It is going to be a challenge to come up with a format that allows for all the possible combinations of things, so that may take some time, however if you want to give me a short list of the types of smart playlists you would want to define I will use this as inspiration, and since you were the biggest supporter of the VC/MB plugin I can probably also come up with a quick test that hard-codes one or two test smart-playlists for you.

Edited by jitterjames
  • Like 1
Link to comment
Share on other sites

jitterjames

VoxCommando does a good job, but I thought is was based on speech recognition.

 

That's not all it does, although it was originally built around this concept. VoxCommando communicates with all sorts of programs and devices and can generate and receive information (events, timers etc) in lots of different ways.

 

http://voxcommando.com/home/features/

Edited by jitterjames
Link to comment
Share on other sites

I DID IT! I DID It!

 

I made an event listener!  You guys will love this!

 

 

I need examples of IP command lines for zwave and Vera! please!

 

This is awesome.

  • Like 3
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...