Mi Casa Verde Vera2

Got a good idea? You can suggest new features here.

Mi Casa Verde Vera2

Postby Killedbyalbany » Fri Apr 01, 2011 3:08 am

Anybody been messing around with EG and Vera at all? I'm not very good with TCP/IP stuff, but it seems like the best way to send and receive events between the two.

I'm definitely interested in helping out if I can. Any of you TCP/IP ninjas have a suggestion n a place to start?

Thanks!
Killedbyalbany
 
Posts: 6
Joined: Thu Apr 29, 2010 2:36 pm

Re: Mi Casa Verde Vera2

Postby Livin » Thu Jun 02, 2011 1:15 am

I've considered getting a Vera but the support from the devs looks very poor and there are tons of complaints on bugs, etc so I have avoided it.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby radengr » Sat Sep 17, 2011 6:42 am

I have a Vera and I've been trying to figure out how best to integrate it into EventGhost. Right now I have a little perl program that I run that polls the Vera and generates and responds to xPL events. I can see these events in EventGhost and turn on a light by sending an xPL message from EventGhost. That is one option. I think it would be nice to create a plugin that interfaces with the Vera directly though. I want to make this more generally usable and having to have a full Perl and the related plugins installed for people who don't need Perl otherwise is not ideal.

Also, @Livin, I wouldn't characterize the Vera support as poor or the devices as buggy. I have been running one for about six months with no problems, controlling 20 z-wave lights, and 25 door/window & motion sensors, a bunch of IP cams, etc. The only times I have interacted with MiCasaVerde staff is for some programming advice and they were very helpful. I am not sure if I am just lucky or if people buying the Vera thinking it will require zero setup and don't spend the time to figure it out. Maybe a bit of both?

Anyway, I pulling events from the Vera is only a few dozen lines of Perl. I'm sure its about as easy in Python.
radengr
 
Posts: 18
Joined: Sat Sep 17, 2011 6:31 am

Re: Mi Casa Verde Vera2

Postby Livin » Sun Sep 18, 2011 2:37 am

I've been monitoring things and I will likely be buying a Vera3 when it releases.

Doesn't MiOS have a web interface you can use to send/receive commands, status, etc? This is what I'd be using as HTTP is very easy to use.

Also, can you ask the Vera devs if MiOS 5 will have a way for it to push (vs polling) status updates via an API, HTTP, etc - this would be best.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby radengr » Sun Sep 18, 2011 3:38 pm

The web interface is quite nice, but it is also very easy to control a device via HTML skipping the web interface altogether.

For example, this request will dim a light to a set level:

http://<VERA_IP>:3480/data_request?id=lu_action&DeviceNum=<ID>&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=<level>

(Where <VERA_IP>, <ID>, and <level> need to be changed to the appropriate values).

You can also write a small plugin that will send out commands when something happens (right now I'm sending out xPL messages but you could take this code and in about 5 min change it to anything else you want). I don't think that Vera necessarily does that 'out of the box', but it is pretty simple to write a plugin, or just modify mine which will be posted and then tweak it as needed.

I think I almost have this figured out with xPL, not sure if that is the best way to handle messages between Vera and EventGhost, but it seems to be working.

EDIT: Just to be clear, you can do 'push' rather than 'pull' status updates now.
radengr
 
Posts: 18
Joined: Sat Sep 17, 2011 6:31 am

Re: Mi Casa Verde Vera2

Postby Livin » Sun Sep 18, 2011 4:19 pm

Cool. btw, the method (and code) you included is a known commonly as a 'web' or 'HTTP' interface/provider - not something that could create a displayable web page; vs 'HTML' would be code that could be used to create a displayable web page.

What does using xPL give you with the Vera that the HTTP interface would not provide? (I used xPL a long time ago but abandoned it when most apps started including robust HTTP interfaces)

Eventghost has an HTTP interface (via the Webserver plugin)... why not use that? ... http://www.eventghost.org/mediawiki/ind ... =Webserver

Push & Pull updated... in the Vera, how does it do Push?
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby radengr » Sun Sep 18, 2011 7:10 pm

The push is done by writing a bit of Lua code that runs on the Vera. Basically you create a callback function that runs when a variable changes, and then in that callback do some action.

It sounds like what I might want to do is make that action execute a call to the EventGhost HTTP interface? That sounds a bit easier than using xPL. Besides, EventGhost can still monitor xPL and then issue Vera commands right?

So basically, EventGhost calls Vera's HTTP interface to execute things there, and Vera calls EventGhost's HTTP interface to generate events that can trigger EventGhost actions. Thank you for that suggestion! :D

Do you know of a good plugin I can look at that interacts with an HTTP interface as a starting point?
radengr
 
Posts: 18
Joined: Sat Sep 17, 2011 6:31 am

Re: Mi Casa Verde Vera2

Postby radengr » Tue Sep 20, 2011 3:29 am

I wrote a basic plugin that does one way control (EventGhost -> Vera) that can turn on and off lights and dim them. It is on the micasaverde forums. If there is any more interest in this I will keep developing it and I guess post a thread in the plugin support section of this forum.
radengr
 
Posts: 18
Joined: Sat Sep 17, 2011 6:31 am

Re: Mi Casa Verde Vera2

Postby Livin » Tue Sep 20, 2011 3:52 am

Im definitely interested... Please post the plugin and if you decide to expand it, Ill be getting my vera when v3 releases.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby Livin » Sun Jun 03, 2012 6:42 am

radengr
it have been quite a while... can you post your plugin? thx
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby blaher » Thu Jun 21, 2012 3:40 am

I think the plug-in is probably this one here:

http://forum.micasaverde.com/index.php?topic=7881.0
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

Re: Mi Casa Verde Vera2

Postby Livin » Thu Jun 21, 2012 3:08 pm

good catch... I'll jump over there to see about it and ask him to post it here too.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby radengr » Sat Jul 28, 2012 7:03 pm

@Livin, I finally got around to messing with this plugin again. Please find a copy here:

https://github.com/naething/vera-eventghost

I should probably make a new topic for this code. The exciting thing about the changes I made this morning is now the code both commands vera AND generates events based on Vera's state. Right now the only events I'm generating are for BinaryLights/Switches or DimmableLights changing state (turning on/off or dimming level changing). The framework is all there though so I'll be adding other things like motion sensors in the near future.

I'm accepting requests so let me know what isn't working for you!
radengr
 
Posts: 18
Joined: Sat Sep 17, 2011 6:31 am

Re: Mi Casa Verde Vera2

Postby Livin » Sat Jul 28, 2012 7:30 pm

radengr wrote:@Livin, I finally got around to messing with this plugin again. Please find a copy here:

https://github.com/naething/vera-eventghost

I should probably make a new topic for this code. The exciting thing about the changes I made this morning is now the code both commands vera AND generates events based on Vera's state. Right now the only events I'm generating are for BinaryLights/Switches or DimmableLights changing state (turning on/off or dimming level changing). The framework is all there though so I'll be adding other things like motion sensors in the near future.

I'm accepting requests so let me know what isn't working for you!


nice!

I'll install/play this weekend and let you know how it goes.

Also, I noticed you are making it work for non-vera apps... I wonder how it could be adapted to work with XBMC?
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Mi Casa Verde Vera2

Postby radengr » Sat Jul 28, 2012 8:47 pm

Livin wrote:I'll install/play this weekend and let you know how it goes.


I appreciate that! Remember I just got this working myself earlier today so there may be a few rough edges. Now that I know more or less what I'm doing it shouldn't be too hard to extend this.

As far as XBMC... I wrote this so that the VeraClient class is abstracted away from both the event loop code and the code that grabs http data. For someone that knows what they are doing it shouldn't be hard to get a XBMC plugin for Vera based on this.
radengr
 
Posts: 18
Joined: Sat Sep 17, 2011 6:31 am

Next

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest