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.

Vera Plugin (Retired)

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

OK here goes,


I have attached a copy of the plugin. it now sends and receives data from Vera.

at the current moment it will send to binary switches and dimmer switches as per modifications made by m19bradon

Thank You m19bradon for motivating me help with making this plugin actually work properly.

what I have done:

I have modified the Lua code that has to be placed in the Vera Unit (Instructions are included in the plugin file at the top). So it will now respond with state changes to dimmers as well as switches. I do have code in place to send pretty much everything but it's ugly and I have not included it in this version of the plugin until i find a better way to find the data in the vera unit. I am no Lua person I am waiting for a response from the Vera forums for a more efficient way of doing that including the actual device names and room names. I am hoping that information will arrive soon.

I have also added the ability to receive information sent from the vera unit without the need for the webserver plugin. I felt the webserver plugin was far to bloated with other features that weren't needed.

I also added a GUID. And added the GNU license agreement at the top. As well as set the Multiloading

The configure panel for the plugin needs some help but it's a beta version so i guess deal with it?? LOL

the 3 user definable boxes are as such but not labeled yet.

box 1 = IPAddress
box 2 = Port of the vera (almost always 3480)
box 3 = receiving port on the computer that hosts EventGhost

the last box is crucial the number that is put into here is the same number that has to be included in the vera code (directions are in the top of the plugin file).

Suggestions and criticism are really needed and appreciated, that is how we can make changes to make a better plugin.

Thanks again

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

well being as one person downloaded it.

first bug found and fixed.

newest is attached
If you like the work I have been doing then feel free to Image
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Vera Plugin

Post by blaher »

That was me. :) Thanks for working on this. I'll give it a try shortly.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

blaher wrote:That was me. :) Thanks for working on this. I'll give it a try shortly.


No worries m8, let me know what needs to be fixed and or improved upon.

I know there are a lot of different things the vera has the ability to control. and i will be adding them over the next few days.

but the lights are the first step.

Thanks again

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

ok Here goes.

Added reporting of Security Sensors:

if they are armed or disarmed
if a sensor gets tripped

Added reporting of HVAC:

mode changes
current temperature (applies to all temp sensors indoor or out)
current humidity (applies to all humidity sensors indoor or out)
heat set point
cool set point

Added reporting of Door Locks:

if they are locked or not


Added reporting of Window Coverings:

if they are open or closed

Added reporting of Light Sensors:

if they see light or not

Added reporting of Energy Use:

if the variable is set on the device for the amount of watts used it will report it if it's a light on a dimmer it will report the calculated watts used while the device is in an on state


As i do not have all of these devices it is up to the people that use them to tell me if something is incorrect.

I am trying to make this as full featured as possible.


Thanks again

K
Last edited by kgschlosser on Thu Oct 08, 2015 3:41 am, edited 1 time in total.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

If there is a special Vera plugin that someone would like to have report to EG I will be more than happy to add it. as there are so many possibilities I have only started to include the core Vera items...



send me a message or reply in this forum and if i can get it done i will add it.


thanks again

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

Update


**** Not Tested because I don't have any attached to my Vera***

Fixed the Security Sensors

Fixed the Light Sensors


Added support for Day or Night Plugin

Added support for World Weather Plugin

Also added the ability to apply room names and device names.
you will have to edit the file and set the DEVICELIST variable to True (you have to have the capital T)

and right below it is a sample list.


to have the added features work and the fixed ones as well you will have to update the Lua Startup code.


I am sorry that I do not have the ability to test all of the individual types of devices. maybe some of you can help out in that department.


I plan to add the ability to have reporting for Scenes as well.

There are some added Actions. they are in development at the moment. but they are in place change the speeds of diming the lights and raising the lights.

it's a work in progress.

Thanks again

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

OK Here it is, Completely re written. and I am sorry for losing backwards compatability.

No need to add anything to the Vera Unit anymore.

I deep sixed the asycore it's a crap way to do some kinda funky software based wanna be threading, and it doesn't work properly.

so I added full threading support.

Vera updates take 100 Miliseconds now.
and that runs in it's own thread, I also added threading to device updates and building the database from the vera unit.

it has full room and device name support with real time updateing and notifications of the updates.


example, change the room for a device on the vera and it will notify you of the room change in EG

full support for all HVAC, ALARM, Dimmers, Switches, Scenes, Temp Sensors, Weather Forcasts, and a whole crap load of others.

Energy Monitering

blah blah blah.

runs like a champ.

all the config panels work properly. tho I am still tinkering around with getting some right proper device lists working in it, I am almost there tho. but for now you will have to rely on device ID's

if someone wants to spear head the config panels that would be awesome. as I really suck at wx.

it's some pretty compressed code with only 3 imports and about 800 lines of code.

nice and clean for the most part.

the way the vera dishes out the data is horrendous. so most of the code is for parsing that crap. but it's fast.


there may be a couple of bugs, I know it's got an issue when disabeling the plugin I have to work that one out.

Oh and all the above mentioned devices control is 2 way, receive and also control.

again the best part is no need to bog down the slow pokey vera with that startup code anymore, I couldn't stand the up to 5 seconds for it to notify on a change.

so 100 ms is a HUGE improvement.

I have the payload set to a dict for mat as such, it's nice to be able to use it on a global dictionary and have something like an on screen menu system pull from that dictionary to get the current states of things

here is how the data is layed out

EVENT: MiCasaVerdeVera.Home-Theatre.Theatre-Front-Light.Dimmable Light.watts.250

PAYLOAD: {
'key3': 'Theatre Front: Light',
'key2': 'Home Theatre',
'key1': u'MiCasaVerdeVera',
'value': {
'status': '1',
'comment': 'Theatre Front: Light: Transmit was ok',
'watts': '250',
'subcategory': 0,
'parent': 1,
'altid': '8'
'catID': 2,
'name': 'Theatre Front: Light',
'state': 4,
'level': '100',
'roomID': 8,
'id': 9,
'category': 'Dimmable Light',
'room': 'Home Theatre'
}
}

I have it arranged by room and then device

if you find a bug go ahead and fix if you want and post the fix, or just lemme know and i'll fix it up as soon as i get the time.

I had yesterday and today off so i rewrote the thing in 2 days so there is bound to be a problem i am sure.

thanks again K


OH and one thing, IT Has support for world weather plugin for the vera, but just to inform you ahead of time of you use that plugin it has an army of sensors so when it has a change it throws something like 100 events out. I just wanted to let you know that. I am thinking about adding a check box to stop or minimize the reporting of that thing, on the todo list i guess.

when it bothers me enough i will do it.

thanks K
If you like the work I have been doing then feel free to Image
WinoOutWest
Posts: 24
Joined: Wed Dec 09, 2009 10:49 pm

Re: Vera Plugin

Post by WinoOutWest »

Nice - Installed it and tested some basic switching and status updates and it is working like a charm.
I have a VeraPlus on order so I am waiting for that before I do any major updates but this will really help me with my plans.

Thanks for your contribution!
Darren
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

Kewl. I added some new Features. I added that checkbox to ton down all the events, I corrected an issue with the honeywell wifi thermostat plugin for the vera, so now it works like a champ.

i also added another action to tell the current dim level of a dimmer switch, it doesn't throw an event but but the eg.result or use it as a return. kind of a nice feature to have for something like what i have going on where it auto dims the lights when a movie plays, but if i turn them up manually then stop the movie if the lights are brighter it would turn them down, so having the ability to pull that data so it won't do that is a nice feature.


i corrected some of the event names so they were alittle more user friendly instead of just using the data that comes from the vera. it was kind of cryptic on some things.

I am going to re add the configurable ramping for dimmer switches with adjustable increments down to a tenth of a percent with an adjustable speed. it's kind of a large undertaking because i will have it launch a thread for the ramp and if it's a slow one it and you want to change the light direction for some reason i have to make it so that it will keep track of the threads and be able to terminate it.

I know how to add any call to any plugin so if there is a plugin that you would like to have control over lemme know i will add support for it. there are just to many of them to do them all at once.


K

I have attached the newest version
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

ok here goes again, fixed the threading shutdown, so now the plugin config panel doesn't hang if you go into it after the initial setup.

I also added a check box in that config panel to either turn on the payload or shut it off.

I also added On and Off as the suffix for the lights, instead of a 1 or a 0

in that main config panel there is another check box to trim down the number of events and to only show the major ones, if something is missing lemme know i will add it.


here is the newest and bestest version

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

ok, another large addition.


I added Ramping ability for dimmers.

you can adjust the speed and the size of the brightness steps.

so you can slowly increase or decrease the light level.

down to .1 for the brightness steps and slowest i would go is a .1 on the speed.

it runs in it's own thread as not to interfear with other events and what have you.

if you launch something else on the same device while it's ramping it will stop and perfor the new task. er well it should neways.


we will see what happens i guess. i haven't tested that part of it.


another 250 lines of code.

latest and greatest is attached

K
If you like the work I have been doing then feel free to Image
WinoOutWest
Posts: 24
Joined: Wed Dec 09, 2009 10:49 pm

Re: Vera Plugin

Post by WinoOutWest »

well since you asked.... I'll toss this out there and see if you have any ideas for me.
:D
I have a home grown whole house audio set that utilizes a series of Integra and Onkyo amps all controlled via rs232 (and Serial to IP adapters)
I use multiple instances of this plugin viewtopic.php?f=9&t=1845&hilit=onkyo&start=30 to control them.

I used to use iRule for my Home Automation but iRule's support for all things Vera really sucked and so I recently stopped using iRule infavour of Imperihome for everything (Vera control, cameras, AV, media control etc)

I currently use http calls from a luup snippet on a scene to control them from vera to EG and from EG to the amps.

So far so good but my next wishlist is to somehow get the feedback from the amsp into a variable on my Vera so I can display it - in particular the volume feedback is what I am after as I have already rigged a virtual switch to the power so although its fake in terms of actual feedback on the power status it does work because all the amps are concealed and Imperihome/Vera is the only thing controlling them.
The Onkyo plugin supports all the feedback I just need to get it back to Vera.

I have 3 instances of the same plugin controlling 3 amps and 6 audio zones.

Any thoughts?
Cheers!
Darren

btw: I am technical but not a programmer but I do dip my toe into that world for stuff like this - it just takes me a long time to figure this stuff out and probably looks horrible to a real programmer.
:roll:
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

well this is what I have going on. I have 5 TV's all run by a central network server with over 5000 movies and about 20 thousand video games as well as music, and all of it can be brought up on any computer i have every thing centrally located in a rackmount system, i have an older Harman kardon run via rs232, i used arduino micro controllers through out my home for my remotes, in which i have only one brand but my house is room aware so where ever i am the remote will control that room, i just ordered a 120" screen and projector for my theatre i have a 7 channel setup,i finally got around to coding up the vera plugin so it works proper, it's all connected to my phone so when i leave the house the lights turn off and the doors lock, everything is controlled from my main server that is running eventghost and it handels all of the data as well as all the on screen menu systems i have made to control the vast majority of everything. I started programming about 9 months ago. i just have a wicked nack for it i guess. but i will have to say hands down eventghost is the best home automation software is you really get into the nitty gritty with it. it's extremely hard to code for something when it's not in front of me.i would be more than willing to help you out tho. I only have a few more things to code out, like a control system for my hottub it's been getting alot easier as time goes on. i actually wrote that vera plugin in 2 days, now, that being said, the vera units are actually crap it's what i bought a few years ago before the company burned they bridges with the 3 party programmers, and they in house people can't seem to get a thing right on it, it's only good for running lights.

I am not sure exactly what you are trying to acomplish through the vera for notification I also like the imperihome app, i have it as well. that is one of the other things i am going to replace i am going to code out a simple webserver for eventghost to host some the actual control system that i will replace imperihome with it will make it all centralized at that point, easier to manage, and i am sure i can code up a really sick front end that is web based, so i won't have to break the bank to have great speed on my touch panels. and i will also be able to load up the pages from anything that has web browsing capability, and stream TV right to any device through that system.

that is the route i would go if i were you to have the visual feedback of what is going on and to have control and make it light weight as well.

those microcontrollers are awesone if you learn c++ because they are about 5 bucks and a wifi card for it is about another 2 or 3, and you can stream serial data right to the thing and have it connected to any kind of device to control it without all the wires. that is what I have done for my remote control system. alittle bit bigger than a quater can run on batteries and it controls all the communications and IR to my TV's and picks up and decodes the ir from my remotes. and sends the data back to EG, which in turn will control the appropriate device.

if you tell me what your exact goal is with your system i can suggest some possible solutions and help code it out for ya.

i also have to code up a control for my APC i just got, i pucked up a 5000 watt one and replaced the 4 12 amp hour batteries with 4 100 amp hour ones, i have started re routing some of the electrical in my house to run on it, like all my theatre lighting but i want to have control through EG to shutdown the computers and all the gizmos if the batteries get low,


I have gone alittle overboard and stupid profed my remote control system for my wife, because EG knows what devices are turned on or off i have it store that state data and it will control correctly.



example if the surround sound is turned off it will automatically start controlling the volume on the TV instead, no matter what device button is pressed on the rmeote.


i also got lucky when i get my remotes and was able to hack them via the usb to make all the buttons work and also added a few extra features like pressing and holding will send a different ir code so my simple 42 button remote. is actually over 300 buttons because it can control 4 devices but i also added the ability to shift the buttons. doubling the number of buttons

big step i will make eventually is voice control i have hashed out a way to make the house aware of my location in the home which is really nice for something as simple as an alarm clock for instance, because no matter what room i fall asleep in it will set the alarm off in that room.

at some point i will ditch the vera and get a usb zwave dongle for my server and code out a direct control of zwave from eventghost. i want all the control from one central system. the hardest thing i have had to deal with is getting things to communicate to one another especially when i didn't write the code for it.


like adding the luup calls to the vera to send the data to EG. it would take sometimes upwards of 5 seconds for the vera to notify EG that something has changed.
now with the way i did it there is no code needed on the vera and the update time is like 100 millliseconds or so. i had to spend some time to learn how to code in python for multi threading because that is the only way you can make something for EG and have it non blocking. so it runs a thread for the call to get the data from the vera and then once it gets it it starts another thread up to process the data that way it can keep on collecting from the vera and if it's processing the data and another change comes in it starts yet another thread to process that data. so say you have 100 kids over all pressing the light switches. it will keep on pumping out the events with no lag.

and to do the ramping for the lights i wanted to have my theatre lights go up and down slower than what the programming on the switch would allow for. so it spawns threads for that as well that way if the lights take 10 seconds to dim my remotes will still function while it's dimming the lights.

i also made a centralized database for EG to store all the changing data. so it's all in one location. then only thing i have other instances of eventghost running for is for the on screen menu system on the TV's have i have one computer for each of the TV's and wan HDMI cables to each one from the rack.

i run mediaportal (highly modified version of it) for the front end and it has a central PVR system for my network attached mcard tuners. i have the whole guide data set up as well as the games and movies are all databased and stored on a server so no discs and i can stream the movies and cable tv to my phone. and the video games as well i can play on the phone from the system.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Vera Plugin

Post by kgschlosser »

and as far as volume indicator. i have my Harman Kardon set up that kinda like what i think you are looking for.

it shoots the data to EG and then displays a volume bar on my TV as well as all the different surround sound modes and speaker adjustments.

all 600+ different controls that my HK does i have report back to my TV, but could be very easly adapted to pump into a web page via EG and then that can be accessed from any device basically.
If you like the work I have been doing then feel free to Image
Post Reply