The Vera Community forums have moved!

General => Temperature Monitoring & HVAC Control => Topic started by: Nutron on May 16, 2016, 11:04:23 pm

Title: Keen Smart Vent
Post by: Nutron on May 16, 2016, 11:04:23 pm
Update: I now have 4 of the Keen Smart Vents paired with my VeraPlus. Here is the step by step process that has worked for me. It is a copy of the email I sent to the Keen Support Team:

Here is the process for successfully pairing and operating your smart vent with Vera Control Ltd. (formerly Mia Casa Verde Inc.)

From Vera's main screen go to 'Devices'
Select 'Add Device'
Select 'Generic ZigBee' and begin Vera's three step process
Step 1: Select Your Device
         Click 'next' to get started.
Step 2: Pair Your Device
         Pull the teal battery strip to power the vent
         Click 'next' to begin the pairing process
         Once the device is discovered and added you will be prompted to name the device and assign it to a room.
Step 3:        Give it a name and assign it to a room.

At this point the VeraPlus will restart its Luua and you should see the device in the room you placed it in, however it has been incorrectly configured as a Door Sensor. You must refresh your browser?s screen to reload the Vera control panel. (I am using Google?s Chrome on a Surface 3 Pro). If you do not refresh the browser you will see the device and can access its settings screen but it will NOT have the correct options.

Once refreshed, access the devices' 'settings' and select the 'Advanced' tab. Locate and change the following two items from this:

device_file = D_DoorSensor1.xml
device_json = D_DoorSensor1.json

To this:

device_file = D_WindowCovering1.xml
device_json = D_WindowCovering1.json

You must click outside the field's input box for the changes to be sent to the controller. Once done, click the 'Back' button and select 'Save Changes'. You should now see the device's icon has changed to the Window Covering icon and you will have full control of your vent using the 'Open', 'Close' buttons as well as the percentage slider. The 'Up', 'Down', and 'Stop' buttons have no functionality. If I knew how to modify the json an xml files, I'm sure those buttons could be removed.
 
I have four of your vents and all of them were discovered and paired almost immediately (distance from VeraPlus hub approx. 15'). For unknown reasons, once or twice I have needed to pop the battery tray out of one of the vents in order to reestablish its connection to my Vera. Other than that they work flawlessly.

Here is what I would like to ask for help on. I understand that the vents have both a temperature sensor as well as a pressure sensor built into them. When I look at the device's variables under the 'Advanced' tab, I do not see anything I recognize at a 'current temperature' or a pressure reading. Perhaps there a 'capabilities' item that I could add that would allow those two items to be accessed or perhaps they are there and I don't realize it. Any insight would be greatly appreciated.

I did NOT utilize a Keen Hub, ONLY the VeraPlus.

Again, the "Up", "Stop", and "Down" buttons do not work which is okay as they don't seem applicable for an air vent anyhow.

Perhaps someone more knowledgeable than me could modify the .xml or .json files to remove those controls and we could rename the files D_AirVent1.xml and D_AirVent.json. If that is even possible??? 
Title: Re: Keen Smart Vent
Post by: konradwalsh on May 17, 2016, 06:55:40 am
Do you mean so that the Up Stop and Down are not shown or that its correctly recognised?
If its the former, then you can easily edit the JSON file in the device simulator to remove the offending buttons and save that code into a new JSON file.. then use that one
Title: Re: Keen Smart Vent
Post by: Nutron on May 17, 2016, 09:11:41 pm
The Buttons are displayed per the stock Window Covering files. They simply do not correspond to an action or function of the Keen vent. That said, I shall spend a little time tonight on my file modification learning curve and see if I can remove the buttons.

Thanks for the direction.
Title: Re: Keen Smart Vent
Post by: jmarty32 on May 26, 2016, 07:31:34 pm
Hi, just received my vent but every time i try to pair, it shows as a generic Zigbee device. There is no advanced settings to make the proper changes for it to work. Every time i try to click any tab i get an error message. Any suggestions? Thanks

Title: Re: Keen Smart Vent
Post by: Nutron on June 09, 2016, 11:34:29 pm
Did you try changing the parameters I outlined in the beginning of this thread?
Title: Re: Keen Smart Vent
Post by: jmarty32 on June 10, 2016, 07:53:35 pm
I couldn't because it would pair as an unknown device and when i closed the browser the device would disappear. Support did manage to pair it but now it states it cant connect to device. I looked at the settings and they are as stated at the beginning of this thread.

I have had this vent sitting in a corner collecting dust for weeks. If anyone can help i would very much appreciate it. Thanks :( 
Title: Re: Keen Smart Vent
Post by: Nutron on June 11, 2016, 06:14:06 pm
Once or twice for unknown reasons I have had to pop the battery holder out to reset the vent. The symptom was the device not responding once I had installed the vent -vs- operating it on my counter top. My guess was that the air pressure while my AC system ran was causing a malfunction (I think the vent has a pressure sensor). At any rate, I simply popped the battery tray out and clicked it back in. Haven't had a problem since.

Hope that helps.
Title: Re: Keen Smart Vent
Post by: rafale77 on June 13, 2016, 11:09:06 am
I had edited the Window covering json to add a subcatecory and specific icons for vents for the econet. You would just have edit the subcategory of your vent so that it reports to it. Never made the up and down/stop worked since... there is no reason I could see I would need that. If you want I can email you the json I created.
Title: Re: Keen Smart Vent
Post by: rafale77 on June 21, 2016, 09:56:43 pm
Well tried to pair one and I am not sure what version of firmware you used but the latest on my vera plus is not very kind.
The Zigbee portion seems to work fine and it pairs but the device is not recognized. As a result it seems to show up as a generic app with reviews option.
Once you reload the browser though unlike Nutron's case, it does not default to treat it like a sensor. Instead, it wipes it out of the UI. I am sure it is still paired but the UI won't allow me to access it.
Seems like I need to go through some tricks to change the parameters.
Title: Re: Keen Smart Vent
Post by: jmarty32 on June 23, 2016, 07:48:39 pm
I have the same issue as above. Don't know what Nutron could be doing different but i have tried on multiple occasions including having tech support remote in but still no luck. I have  tried everything.  Please help.

I now own an $80.00 paperweight.
Title: Re: Keen Smart Vent
Post by: Nutron on June 27, 2016, 09:20:49 pm
Don't know if this has anything to do with it but it slipped my mind that at one point while I was trying to get a few of the Lowe's Iris door sensors to work, under the Zigbee Advanced Settings, I changed the Network Channel from whatever it was to channel 16. I did this because I saw in some online document that the door sensors used that Zigbee channel. ????
Title: Re: Keen Smart Vent
Post by: jmarty32 on June 30, 2016, 09:24:24 pm
Hi Nutron,

Installed the new beta firmware hoping that at least I could add it and it would recognize the device as a sensor. To my surprise it worked, I was then able to follow your instructions and now I have a perfectly working vent.

Thanks for all your help.
Title: Re: Keen Smart Vent
Post by: rafale77 on July 02, 2016, 09:17:19 am
I can confirm that indeed the beta firmware has enabled the pairing of generic zigbee devices and therefore the Keen vent work. I did not even have to refresh my browser and the vent showed up as a door sensor on its own.

4 things I did: change the device type to "urn:schemas-micasaverde-com:device:WindowCovering:1"
changed both the device file and the json per Nutron and changed the device category to 8, subcategory of 0 will bin the device as a "window covering". The vent has a temperature sensor.


One can create a temperature sensor device to export the temperature:
Procedure :
o App/Develop App/Create device
o Enter "D_TemperatureSensor1.xml" in the field "Upnp device filename"
o Enter whatever you want in the field "Description" -> it will be the virtual sensor name...
o Choose a room if applicable
o Click 'Create Device'
o Reload luup
o Open the newly created device, go to 'advanced' tab.
o Enter "urn:upnp-org:serviceId:TemperatureSensor1" in the field 'New service'
o Enter "CurrentTemperature" in the field 'New Variable'
o Enter "0" in the field 'new value', click 'Add'
o Reload luup



=> Then you must create a scene that runs every few minutes (like 5 minutes).
o In the scene luup code, enter :
Code: [Select]
local function update (src,tgt)
local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", src)
luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", temp, tgt)
end

update (x,y) --x is the device number of the keen vent, y is the device number of the newly created device. repeat the update function call for as many devices as you need here.

return true
o Save the code, finish the scene (name, room etc), save


Also noticed that the voltage and the battery level on this device is not reported correctly. I am ready to bet it is a variable format problem.
Title: Re: Keen Smart Vent
Post by: Nutron on July 02, 2016, 05:13:48 pm
Thank you rafale77 for the improved step by step guide.

Once the Device category and subcategory have been successfully changed to 8 ad 0, should I be able to see the variable 'CurrentTemperature' in the vent's advanced settings? I have a couple Monoprice Motion sensors that have the built in temperature sensor and am familiar with how their Advanced Variables show this CurrentTemperature reading.

I followed your instructions for creating a new device. And also created a scene as suggested but no temperature readings yet in the newly created device. I do recall that when using the iDoor app that creates additional temperature devices, you often had to wait overnight for them to actually begin pulling the CurrentTemperature variable from the desired device.
Title: Re: Keen Smart Vent
Post by: rafale77 on July 02, 2016, 05:27:46 pm
Well you also need to create a scene to update the variable as per the second part of my previous post. run the scene yet? I was able to see the "CurrentTemperature" variable from the inclusion on without having to do anything.
Title: Re: Keen Smart Vent
Post by: Nutron on July 02, 2016, 07:09:25 pm
Yes I ran the scene a couple of times. I initially created the Vent devices on whatever firmware came on the Plus. Earlier today I updated the firmware to this new Beta. Wonder if I need to delete the devices and recreate them under the newer Firmware??? I have two more vents that I've yet to add to the system. I'm gonna go unbox one and try it.

Nope! Not that. I just paired a new vent on new Beta firmware following the blend of both our instructions. I am still not obtaining the Variable 'CurrentTemperature' in the list of variables available through the Advanced tab. Hmmmm... Now it's my turn to wonder what is different between your system and mine.  ;)
Title: Re: Keen Smart Vent
Post by: rafale77 on July 02, 2016, 10:22:41 pm
Stupid question but are you sure you are looking at the variables list and not the parameter list?
Title: Re: Keen Smart Vent
Post by: Nutron on July 03, 2016, 11:24:09 am
 :) There are no stupid questions. What I discovered was we had (Key word being had) different firmware versions. I had not gone to the new beta yet. So what did I do you ask? I installed the new beta firmware and have been losing my mind since. Lost connectivity with ALL vents, Lost access to PLEG's interface. Cannot seem to re-pair even a single vent. Should have stuck with the ole motto 'If it aint broke, don't fix it!" I was so determined to get those temperature readings from the vent. Errrrrrrrrr >:(

Update: Figured out how to reset each vent via the little black button right behind the louvers clicked a couple times. Have been able to re-pair vents and yes I now have the CurrentTemperature variable. Now if I can only figure out how to get the PLEG Next Gen UI to work I could actually use the vents as I had planned.
Title: Re: Keen Smart Vent
Post by: rafale77 on July 06, 2016, 11:49:36 am
The firmware is the difference. I found out that before the beta, I was on the latest official firmware which is 1.7.1754 and you were on 1.7.1786 which was an accidental leaked firmware on some VeraPlus shipment. The beta seems to improve the 1.7.1975 seems to improve the handling of the generic zigbee device pairing but broke a few things. I will probably downgrade to 1.7.1754 or 1786 once all my zigbee devices are added since in the short term, I will not be adding any more and I need a few apps using javascript to work.

PS to Nutron: I noticed the signature... lol.
Title: Re: Keen Smart Vent
Post by: Nutron on July 12, 2016, 10:08:03 pm
Just a quick update: I was able to get PLEG Next Gen UI to work after installing the 'NewAndOld' file. Only issue seems to be intermittent loss of connection to ALL vents. I've not had the time or strength in the last few days to ferret out a pattern or clue to why all the vents will suddenly be blinking yellow and they do not reconnect to the VeraPlus on their own. I have to reload the Luup engine and all vents will suddenly flash green 3 quick times and be back to functional. I'm tempted to get a Keen Hub and just observe how well the vents function. 
Title: Re: Keen Smart Vent
Post by: rafale77 on July 14, 2016, 01:32:13 pm
Strange, I have not seen this problem except for one vent but that was because it is a little further than the others. Zigbee range is significantly worse than Zwave and it is not Vera's fault. The vents are battery operated so they don't act as network repeaters. I just had to take the vent out and walked 3 ft closer to the vera and it joined the network again without me having to do anything.
The fact that it is 2.4GHz makes it interfere with home wireless phones, BT, Wifi (and sonosnet) and a sludge of other devices (for me ecobee, plantlink and philips Hue). Keep your Zigbee channel at 25 so that at least it is further away from any Wifi frequency. The higher frequency Vs Zwave also makes it consume a lot more power to go through walls and reduces its range so plugged in devices like the hue work ok using a more powerful radio but battery operated ones are much more unstable. The worse is that every one is implementing their own proprietary zigbee network with its own level of protocol customization (Xbee for irobot roomba, some version for ecobee, philips hue controlling lights only etc...Ones who use the generic HA stack for zigbee tend to want to use their own hubs too: hue, plant link and keen.) so we end up with several networks clogging the spectrum and not being compatible with one another.
I am currently scratching my head on the implementation of another zigbee device: The plant link which has to reach a wider area in my yard. Similar problem: range and interference problems... Zigbee is really flawed in this regard. Much better designed for proprietary closed network than a general home automation hub concept.
Title: Re: Keen Smart Vent
Post by: verso on October 18, 2016, 02:34:38 am
I've got a few Keen vents I'm trying to connect, but I can't find anything after July (where the issue was solved with a new firmware). My firmware on my VeraPlus is 1.7.2138 and when I try the instructions at the top of this thread, I get nowhere. As much as I enjoy waiting for a device that never replies, I'd really like to mix it up and get one of the vents working. Any ideas anyone has here are appreciated. So far I have:

- Reloaded luup
- Disconnected Hue hub and bulbs (to see if Zigbee had too much noise)
- Restarted the computer before trying to add
- Trying a different browser to add
- Moving the vent everywhere from an inch to 8-10 feet away
- Putting VeraPlus in different positions to see if there's a reception issue with the location
- Chanting the contents of a luup file at the stroke of midnight  :)

(Sorry, I've been trying to connect these for so long I might have gone a bit silly)

Open to all suggestions, up to and including actual chanting.
Title: Re: Keen Smart Vent
Post by: bohemian on July 06, 2017, 08:14:23 pm
I managed to get my vents working by following the Window Covering modification referenced above. But now I'm having trouble controlling the vents.

Controlling them them via the device slider in Vera let's me open them to any amount I please. But trying to programmatically control them through PLEG, the only way to get them to open or shut seems to be to manipulate the urn:upnp-org:serviceId:Dimming1 SetLoadLevelTarget variable. The only problem is that setting this to any non zero value just opens the vent up all of the way - there's no ability to open only to 50% for example.

Attempts to do the same thing in PLEG through this code yields the same results:

local service_id = "urn:upnp-org:serviceId:Dimming1"
local action = "SetLoadLevelTarget"
local args = {newLoadlevelTarget=50}
local dev_num = 160 -- Vent device number
luup.call_action(service_id, action, args, dev_num)


What seems odd to me is that the same variable when viewed under the Advanced tab for the device itself corresponds exactly to the slider level and mirrors desired levels between fully open and fully closed. So what he Vera device code is ultimately sending to the vent versus PLEG is a mystery to me.

Poking around online, someone has code up on Git to add Keen Vents to Smarthings but, other than some Zigbee idiosyncrasies, nothing jumped out at me, so I am stalled for now.

Any suggestions on how to proceed? For the record, I'm not a LUA wiz but am capable of some cut and paste if there's some analogs out there.
Title: Re: Keen Smart Vent
Post by: rafale77 on July 13, 2017, 09:47:42 pm
I managed to get my vents working by following the Window Covering modification referenced above. But now I'm having trouble controlling the vents.

Controlling them them via the device slider in Vera let's me open them to any amount I please. But trying to programmatically control them through PLEG, the only way to get them to open or shut seems to be to manipulate the urn:upnp-org:serviceId:Dimming1 SetLoadLevelTarget variable. The only problem is that setting this to any non zero value just opens the vent up all of the way - there's no ability to open only to 50% for example.

Attempts to do the same thing in PLEG through this code yields the same results:

local service_id = "urn:upnp-org:serviceId:Dimming1"
local action = "SetLoadLevelTarget"
local args = {newLoadlevelTarget=50}
local dev_num = 160 -- Vent device number
luup.call_action(service_id, action, args, dev_num)


What seems odd to me is that the same variable when viewed under the Advanced tab for the device itself corresponds exactly to the slider level and mirrors desired levels between fully open and fully closed. So what he Vera device code is ultimately sending to the vent versus PLEG is a mystery to me.

Poking around online, someone has code up on Git to add Keen Vents to Smarthings but, other than some Zigbee idiosyncrasies, nothing jumped out at me, so I am stalled for now.

Any suggestions on how to proceed? For the record, I'm not a LUA wiz but am capable of some cut and paste if there's some analogs out there.

I just tested your code and it works perfectly fine on my Keen vents...
Title: Re: Keen Smart Vent
Post by: bohemian on July 13, 2017, 10:20:09 pm
I just tested your code and it works perfectly fine on my Keen vents...

Thanks for checking. And of course, it's now working for me too.

Sometimes I think just posting on the forum makes things work. Some hidden super secret API between this forum and my Vera no doubt ;)
Title: Re: Keen Smart Vent
Post by: Don Phillips on July 14, 2017, 07:05:29 pm
Naw, no API. We just hack into your system and fix things  8)
Title: Re: Keen Smart Vent
Post by: bohemian on July 14, 2017, 07:17:35 pm
Now that things are all happy between Vera and my Keen vents, I now have something that ties my vents together nicely with my Ecobee thermostat and its various climate settings. The Keen app claims to do some of that, but the degree of control isn't very granular (six hour windows) and it's really just leveraging the Ecobee's remote sensors (admittedly a strong suit of the Ecobee) as an input.

Minus the inevitable ongoing scope creep that is home automation, at this point I've put all of my vents under Vera control and relegated the Keen hub to (hopefully) a Zigbee repeater.

I've also created what I think is a low battery alert for the vents, which looks at a power level variable which may (or may not)  represent some 0-31 scale representation of battery power for the vent. I will see if that variable actually changes over time.
Title: Re: Keen Smart Vent
Post by: questusa on July 20, 2017, 04:18:24 am
 :o
Can't pair Keen vent to my VeraPlus.
Controller doesn't see Vent at all.

I downgraded to 1.7.1754 - same thing
I upgraded to 1.7.1975(beta) - same thing
I upgraded to "latest and greatest" 1.7.2935 - same thing

Is there any trick?

Really like these vents and want them to be paired...

Please help.

Thanks
Title: Re: Keen Smart Vent
Post by: rafale77 on July 20, 2017, 11:01:57 pm
:o
Can't pair Keen vent to my VeraPlus.
Controller doesn't see Vent at all.

I downgraded to 1.7.1754 - same thing
I upgraded to 1.7.1975(beta) - same thing
I upgraded to "latest and greatest" 1.7.2935 - same thing

Is there any trick?

Really like these vents and want them to be paired...

Please help.

Thanks

How are you attempting to pair? You know you have to go into the zigbee devices and add a generic zigbee device right?
Title: Re: Keen Smart Vent
Post by: questusa on July 23, 2017, 06:57:28 am
Issue solved.
I migrated from Vera2 to VeraPlus about a 3 months ago and seems like ZigBee doesn't work properly on my unit.
Vera support provided HTTP link to enable ZigBee pairing and now I have paired 5 Vents.

Another problem: Vera lose connection to Vents very often and I have to reload it :/
Title: Re: Keen Smart Vent
Post by: bohemian on August 15, 2017, 11:58:59 am
The only other residual weirdness I'm seeing is that Vera seems to think that my Keen Vent 'Window Coverings' are in fact smoke sensors. At least when I view devices by type. Doesn't impact anything but sure looks odd.
Title: Re: Keen Smart Vent
Post by: rafale77 on August 15, 2017, 07:10:42 pm
I am not and have never seen this. Are you sure you have your device category and subcategory set correctly?
Title: Re: Keen Smart Vent
Post by: bohemian on August 15, 2017, 08:21:57 pm
device_type = urn:schemas-micasaverde-com:device:WindowCovering:1
device_file = D_WindowCovering1.xml
device_JSON = D_WindowCovering1.json


So, nothing jumps out as 'Smoke Sensor' to me.
Title: Re: Keen Smart Vent
Post by: Don Phillips on August 16, 2017, 09:19:24 pm
You have to look at the advanced properties of the device: http://wiki.micasaverde.com/index.php/Luup_Device_Categories
Title: Re: Keen Smart Vent
Post by: bohemian on August 16, 2017, 09:46:25 pm
You have to look at the advanced properties of the device: http://wiki.micasaverde.com/index.php/Luup_Device_Categories

Yeah, category_num and subcategory_num were both set to 4 for all vents. Odd, since I didn't set them manually.
Changed them to match the respective window covering categories for what it was worth. Thanks for the pointer.
Title: Re: Keen Smart Vent
Post by: Teken on August 17, 2017, 03:02:23 pm
For those having used these automated vents. Would you purchase them again? Any pros and cons of these vents not already listed in this thread?


Sent from my iPhone using Tapatalk
Title: Re: Keen Smart Vent
Post by: bohemian on August 24, 2017, 04:01:42 pm
For those having used these automated vents. Would you purchase them again?

I would purchase them again. Keep in mind that I'm solving a very specific problem - vents working with my Ecobee to send more airflow to our small second floor for pre-bed cooling / heating. Other than that, I'm not getting too sophisticated.

Once set up, the seem to work well although it would nice if we could get battery access to things like battery level and other Keen Vent variables. So, a specific Keen device for Vera, rather than 'tricking' Vera into thinking these are window blinds. That's less on  the vents than it is some smart Vera developer though.
Title: Re: Keen Smart Vent
Post by: jadragescu on September 05, 2017, 05:12:59 pm
Has anyone had a problem pairing more than 6 - 8 vents (like the forum link below)?  I had no problem pairing 5 of these vents, but after that, VeraPlus would not add anymore.  Vera support had no clue, and mentioned this forum and just said that they don't support this keen vent on there website.  :(

I did a work around with Wink 2 hub, and its plugin, but I personally don't like that solution as it isn't that seamless, and there is a delay of course.  Lastly, whats the point of VeraPlus Zigbee controller then?....

Any thoughts/help?  It would be greatly appreciated!

http://forum.micasaverde.com/index.php/topic,49059.msg321957.html#msg321957
Title: Re: Keen Smart Vent
Post by: bohemian on September 05, 2017, 05:52:27 pm
I'm running exactly 5 vents right now and they work fine.

I'll be adding a couple more when they start shipping again and will update this thread with the results. I was originally going to go the Wink route, but had trouble getting it to work with my VeraPlus.
Title: Re: Keen Smart Vent
Post by: rafale77 on September 06, 2017, 02:02:52 am
I am running 6 of these and have not had any issues. I did read somewhere of a strange limitation to 8 zigbee device though but never observed it myself.
Title: Re: Keen Smart Vent
Post by: jadragescu on September 07, 2017, 08:28:40 pm
Can you tell me what your Zigbee channel you use perhaps?  I am not to familiar with Zigbee (veraPlus/settings) and how to tweek it/etc.

Mine stop pairing/including after 6 vents, so please beware (if your getting more than 6 or so.  I have a total of 16 of these vents, and would love to just use Vera, but forced to use Wink because of this limitation.

If you have any news on this, that would be great. 

I asked Vera support to see what they could do to help, unfortunately they mentioned they don't officially support this device, and pointed me to this forum.  :(

Unfortunate that Smartthings and Wink and Iris support this device fully, but not Vera thus far (without limitation).

Cheers!

Title: Re: Keen Smart Vent
Post by: rafale77 on September 08, 2017, 01:43:24 am
Well I added my 9th Zigbee device tonight and it appears to work just fine so I am not seeing any limitations. I also have 6 keen vents and did add a 7th one at some point I did not see any problem at that time as I was thinking the limitation was at 8.
Title: Re: Keen Smart Vent
Post by: jadragescu on September 08, 2017, 05:32:41 pm
Thank you for your feedback.  I don't believe the limitation is with other zigbee devices.  So you can have several other devices paired/included.  The limitation is on these vents.  I believe my limitation was 6, only because I had 2 other Keen vents paired/included before, but had issues with them, so I excluded them.  I am guessing, those 2 still have residual in my Vera controller (even if excluded), hence that I only have 6 included.  :(

I will try to perhaps exclude them all and try again from scratch.  I am afraid that if I exclude them, I won't be able to add anymore (from above analysis).  This just boggles my mind, why/how a limitation would even be such a thing on a controller (unless lack of memory on unit/etc).

Any other help here, would be greatly appreciated.

Thanks again!
Title: Re: Keen Smart Vent
Post by: bohemian on October 11, 2017, 01:05:01 am
Just added two new Keen vents and things were a little different this time around. My previous five vents behaved as described in the first post on this thread. But new vents are now defaulting to a Stelpro STZB402+ ZigBee Thermostat device type. This has two interesting side effects.

First, Vera now creates a companion temperature device in addition to the thermostat. Second, I know have to change the device_type schema as well or the device won't save or configure properly. After a bunch of trail and error, here's the revised steps that now work for me (copying an abridged version of Nutorn's more through steps):

From Vera's main screen go to 'Devices'
Select 'Add Device'
Select 'Generic ZigBee' and begin Vera's three step process
Step 1: Select Your Device
         Click 'next' to get started.
Step 2: Pair Your Device
         Pull the teal battery strip to power the vent
         Click 'next' to begin the pairing process
         Once the device is discovered and added you will be prompted to name the device and assign it to a room.
Step 3:        Give it a name and assign it to a room.
Step 4: Refresh browser window

Step 5: Access the devices' 'settings' and select the 'Advanced' tab. Locate and change the following to match these entries:

     device_type = urn:schemas-micasaverde-com:device:WindowCovering:1
     device_file = D_WindowCovering1.xml
     device_json = D_WindowCovering1.json

You must click outside the field's input box for the changes to be sent to the controller. I also had to change the following to match the values shown below:

     category_num = 8
     subcategory_num = 1

Once done, click the 'Back' button and select 'Save Changes'. You should now see the device's icon has changed to the Window Covering icon and you will have full control of your vent using the 'Open', 'Close' buttons as well as the percentage slider.

Step 6: Delete the phantom temperature sensor device that was created along with the initial thermostat device. Doing so before you make the other changes seems to make the vent disappear from the Vera UI. This was a big chunk of the trial and error I encountered.

I'm not sure if this change in initial device type is due to some new firmware on later Keen vents, or a change in Vera firmware since then (I'm currently running Version 1.7.3232 on my VeraPlus) but both of my last two vents (received due to a wrong part being sent by Keen) behaved the same way. Hopefully this will save someone else some grief down the road.

it sure would be nice if these vents could be supported as first class devices some day, but these hacks seem to work for now.
Title: Re: Keen Smart Vent
Post by: treetop777 on October 12, 2017, 06:43:54 pm
Nice how-to.  Thanks.
Title: Re: Keen Smart Vent
Post by: rafale77 on August 05, 2018, 10:30:42 pm
These instructions are no longer working and I don't know since when. I am on 1.7.26 and found a mountain of problems with the very buggy vera plus.
The main issue is if you try to follow these instructions, at the first refresh of the browser the device disappears. It is now disappearing because it is invalid since it is missing the device_json attribute. If you try to run the edits, before you get to them a luup reload will occur and wipe out the device completely (not just invisible anymore) and will go into infinite luup reload with a reload every 20s preventing you from saving any of the parameters before they get reset again. MCV, your autoconfigure scripts are creating invalid devices!! The device also never shows up as a door sensor or a thermostat any more. It shows up as generic zigbee device which again is invalid.

I have been troubleshooting the problem and found the solution, you will need to have ALTUI installed because ALTUI displays invalid and hidden devices which UI7 ignores.

New instructions:

1. Add the generic device to the vera.
2. Once Vera sees the device and does its first reload (watch the vera plus LEDs, they will be all lit up) remove the batteries from the vent. Why? because the vent sends data to the vera and causes it to reload because the vera does not know what to do with it. The vera code definitely abuses luup reloads I found most to be unjustified. Taking the battery out will enable us to configure the device manually before syncing them.
3. Go into the device under settings and set the device to not autoconfigure (auto configure to no instead of use default behavior). You will see under advanced/attributes of the device that the device_json field is missing. At this step, it is very likely that the device disappeared, especially if you reloaded the browser page. This is when I switch to ALTUI.
4. note the device number you just created and go into app/lua test code on the vera or ALTUI.

Code: [Select]
local devnum = **your device number**
luup.attr_set ("device_json","D_WindowCovering1.json",devnum)
luup.attr_set ("device_file","D_WindowCovering1.xml", devnum)
luup.attr_set ("device_type","urn:schemas-micasaverde-com:device:WindowCovering:1", devnum)
luup.attr_set ("category_num","8", devnum)
luup.attr_set ("subcategory_num","1", devnum)

I personally created my own device_json to show vent icons instead of window covering but for the sake of just fixing the problem, this is what is needed for now.

5. Now the device should show that it is waiting for the device to wake up to configure. Do a luup reload first (you can go to App/Serial Port Configuration and hit save, you can also go under settings/zwave/advanced/reload engine). Then go back to the device and verify that the attributes have been created and set. It is likely that the name you previously set got wipped so you will have to rename it and it should now show again on UI7 if it had disappeared before.
6. Now insert the batteries back into the device. The UI will show "configuring" and the vera will do another luup reload when complete. The vent should now be functioning.
Title: Re: Keen Smart Vent
Post by: rafale77 on January 21, 2019, 09:13:06 pm
I just somehow managed to make the device report its battery level to the vera. It seems like the initial inclusion was buggy (after all not officially supported) and some fixes were accidentally made in the latest firmware version on the zigbee battery reporting endpoint.
For those who do not want to exclude and reinclude their devices, here is the luup code to make the battery report correctly

Code: [Select]
local devnum = **your keen device id**
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "SupportedOutClusters", "0019", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "PowerSourceLevel", "100", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "ReportAttrib", "0001:4c00=1;0006:0000=0;0008:0000=1;0402:0000=0", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "VoltageRate", 25, devnum)
luup.variable_set("urn:micasaverde-com:serviceId:HaDevice1", "BatteryLevel", "", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:HaDevice1", "BatteryDate", "", devnum)
Title: Re: Keen Smart Vent
Post by: jadragescu on January 28, 2019, 04:26:31 pm
This is a great find rafale77.  Thank you for sharing.

My Keen vents always get disconnected with Vera "Can't find Device" as they either have battery drain quick in these vents, or I lose Zigbee connection, or "battery compartment" on these vents are not the best.  Not sure if you have this same issue.  Any help/experiences/tips/tricks with these vents, would be much appreciated!!!!

When you say firmware was updated, is that on the Vera controller side, or do we have to update the firmware on these vents itself.  If so on the vents, is there a howto perhaps you can enlighten us with? 

Thanks again!

Title: Re: Keen Smart Vent
Post by: rafale77 on January 28, 2019, 04:54:41 pm
The disconnections in my experience were due to a poor zigbee mesh. The range and reliability of zigbee is easily compromised if you do not pick the right channel for your environment. It functions on the overly crowded 2.4GHz band. I ultimately made it 100% reliable by... adding relays in the form of zigbee outlet plugs.
Title: Re: Keen Smart Vent
Post by: jadragescu on January 29, 2019, 01:35:50 pm
@rafale77: Can you send me the link of the Zigbee relays you got to make it 100% reliable?  I have a lot of these vents, but I presume Zigbee doesn't act like a repeater as the Zwave Mesh does.  Any suggestions on the channel to use for Zigbee to not interfere as much with 2.4Ghz crowded signal.  I read up on channel 26 is best, but Vera doesn't support this channel.  I believe I have it on channel 16.  I have a mesh router for Wifi, so I can't control the channels as I used to with an Apple router.  Any other recommendations/tips/tricks would be greatly appreciated!!!

Lastly, regarding battery, I followed your lua code to put it in dev - test code.  It worked!  The only thing I notice is every device is reporting 100% battery.  Does that update?  I presume the Zigbee device updates the Power level of battery, then updates the Vera variable/etc????

Thank you again!!!
Title: Re: Keen Smart Vent
Post by: rafale77 on January 29, 2019, 04:49:05 pm
I am using some centralite square plugs which originally were also not supported by vera, but since they are simple plugs, they included without trouble. I used these because they were on fire sale at some point last year.
Like zwave though, zigbee does mesh but not for battery operated devices and both the vera and the keen have smallish antennae. Even a single plug made a huge difference for me. The value of the battery does change. Mine which are at least a year old are starting to show some different values. That value is what the keen vent is reporting. Not something the vera is processing. Note that my code sets that value as empty... so the 100 came from the vent.
Title: Re: Keen Smart Vent
Post by: jadragescu on January 29, 2019, 07:06:50 pm
@rafale77:  Thank you once again!  I have purchased a few of these.  I am hoping they are as successful as in your setup.  I will keep this forum posted.

Appreciate your help!!!
Title: Re: Keen Smart Vent
Post by: rafale77 on January 29, 2019, 07:30:04 pm
Sorry I was replying with my phone so I forgot to answer one of the questions. This link shows the overlap of the different channels:

https://www.metageek.com/training/resources/zigbee-wifi-coexistence.html

I geeked myself out and actually got myself a spectrum analyzer to identify 2.4GHz network problems. My sonos system for example occupies a lot of bandwidth when it is playing. The microwave in the kitchen can cause complete havoc. Channel 26 for zigbee is rather unusual. I have Hue in my setup as well which is also on Zigbee but on a proprietary protocol... It is just a very crowded band. I personally have mine on 25. You would have to see what channel your mesh wifi occupies...
Title: Re: Keen Smart Vent
Post by: rafale77 on February 04, 2019, 09:38:56 pm
Having decided to get rid of the ecobee, to go all local processsing, got me thinking about how to create the perfect HVAC automation and make better use of these vents.
I am already automating these vents by shutting them off upon opening of windows and varying their opening by housemode and thermostat mode (whether heating or cooling).
I am thinking about moving them further by using the various temperature sensors in the house as inputs to tune these vents... I've just started to build the logic on paper. Could make things interesting...
Title: Re: Keen Smart Vent
Post by: jadragescu on February 05, 2019, 02:18:38 am
@rafale77:  I have already wrote some Lua to automate these vents to open and close, depending on the temperature in each room.  Let me know if you are interested in my ideas/code that I have implemented already for these temperature sensors/thermostats/etc.

Cheers!
Title: Re: Keen Smart Vent
Post by: rafale77 on February 06, 2019, 03:01:29 am
Thank you. I was thinking about doing this with scenes which would have gotten fairly complex but am now looking at using Rigpapa's AVT plugin with some enhancements to make it more scalable and shareable...
Title: Re: Keen Smart Vent
Post by: jadragescu on February 06, 2019, 09:27:12 pm
@rafale77:  I was looking at AVT plugin as well, but didn't like how you couldn't actually pick a heating source, you needed an on/off device, so I just did scenes and made my own virtual thermostats to utilize "Auto", "Heat", and "Cool"

I agree about making it shareable on a larger scale, but didn't have the time for a plugin creation yet and perhaps the expertise quite yet.  Should be straight forward though, once I get the Lua code solidified.  Any support or assistance would be appreciated.  Let me know if you ever want me to share some of the lua as you tinker with this!!!

Cheers!
Title: Re: Keen Smart Vent
Post by: rafale77 on February 06, 2019, 11:26:01 pm
I would have no problem modifying the plugin to make it work with a thermostat rather than an on/off load. I don't think this would be very difficult to do... I may not be very fast at doing these but I am pretty comfortable writing these codes these days. Will work with rigpapa on it though when we both get back. Stay tuned...