Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Mi Casa Verde Vera2
-
Killedbyalbany
- Posts: 7
- Joined: Thu Apr 29, 2010 2:36 pm
Mi Casa Verde Vera2
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!
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!
Re: Mi Casa Verde Vera2
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
Re: Mi Casa Verde Vera2
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.
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.
Re: Mi Casa Verde Vera2
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.
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
Re: Mi Casa Verde Vera2
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.
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.
Re: Mi Casa Verde Vera2
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?
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
Re: Mi Casa Verde Vera2
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!
Do you know of a good plugin I can look at that interacts with an HTTP interface as a starting point?
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!
Do you know of a good plugin I can look at that interacts with an HTTP interface as a starting point?
Re: Mi Casa Verde Vera2
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.
Re: Mi Casa Verde Vera2
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
Re: Mi Casa Verde Vera2
radengr
it have been quite a while... can you post your plugin? thx
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
Re: Mi Casa Verde Vera2
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
Re: Mi Casa Verde Vera2
@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!
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!
Re: Mi Casa Verde Vera2
nice!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!
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
Re: Mi Casa Verde Vera2
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.Livin wrote:I'll install/play this weekend and let you know how it goes.
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.